From 17e7661ce132d8a0f6482215f339f704d78bfd4c Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Wed, 30 Oct 2024 10:13:09 +0000 Subject: [PATCH] fix(csr): Set type of node_props to float64 `dtype` of `node_props` passed from `csr_to_nbgraph()` to `NBGraph` was `float32`. This sets the type to explicitly be `np.float64` which matches the expectation of `csr_spec_float` passed to `numba.experimental.jitclass()`. --- src/skan/csr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/skan/csr.py b/src/skan/csr.py index bc310f1..b29f1a0 100644 --- a/src/skan/csr.py +++ b/src/skan/csr.py @@ -207,7 +207,7 @@ def csr_to_nbgraph(csr, node_props=None): csr.indices, csr.data, np.array(csr.shape, dtype=np.int32), - node_props, + node_props.astype(np.float64), )