Open ns-rse opened 2 days ago
Haha, well, shit. 😂
I'm on a bit of a conference tour for the next 4 weeks so I'm not 100% if I'll be able to fix quickly, but I'd be happy to quickly merge a fix and push a 0.12.1 tag. Looking at the error my guess is that on some systems skeleton_image.astype(float)
is interpreted float32. So the first thing I would try is skeleton_image.astype(np.float64)
, which would exactly match the NBGraph type annotations.
Thanks @jni
Gave the skeleton_image.astype(np.float64)
a whirl but no dice.
Spent a bit more time looking through and understanding the workflow though and think I've found the problem which was that node_props
in csr_to_nbgraph()
was float32
. Explicitly setting the type to .astype(np.float64)
seems to have solved it and PR is out (see #235).
Thanks for the pointer and enjoy the conference season. :+1:
Thanks for the new release @jni :smile:
Unfortunately I've found a problem with a type error being raised from within Numba stemming from initalising the
csr.Skeleton()
class inskan-0.12.0
.Traceback
The traceback is...
git bisect
I don't see this error with
skan-0.11.1
and so to investigate I undertookgit bisect
betweenv0.12.0
andv0.11.1
. To check each bisection I ran the test that is failing from the TopoStatsmain
branch.The error is different from that reported by
v0.12.0
though......and sure enough if I checkout
csr_to_nbgraph()
the only parameters it has arecsr
andnode_props
and ooking at this commit the only change tosrc/skan/csr.py
is...NBGraph()
csr.csr_to_nbgraph()
returnsNBGraph
which is anumba.experimental.jitclass()
withcsr_spec_float
...I thought perhaps the
numba.float64
types were the problem but looking at the numba documentation on types shows thatfloat64
anddouble
are equivalent. Regardless I tried switchingnumba.float64
>numba.double
but still get theTypeError: Can only insert double* at [4] in {i8*, i8*, i64, i64, double*, [1 x i64], [1 x i64]}: got float*
.Current installed packages...
A cleaner environment can be found in a failed GitHub workflow of the tests which failed.
I looked at the versions of
skan
/numba
/llvmlite
/scipy
/numpy
and checked whether they were passing...Not sure how to continue investigating this but please let me know if there is any more information I can provide or try/do.