Closed jo-mueller closed 1 month ago
This does not work:
It would be awesome if you could expand on this. Is there an error or are the results wrong? What does not work? When reporting bugs always try to minimize efforts on the other side in order to maximize outcome. Thanks!
Hi @haesleinhuepf , sorry - added the traceback above. Aside from that I'm afraid it's hard for me to guess what exactly is going wrong :/ My best guess is that regionprops/scikit-image relies on some property of numpy arrays that is somehow not handled by either the inheritance of the StackViewNDArray
or the way that the resulting StackViewNDArray
is initialized by nsbatwm
. Hope the minimal working example helps, though.
Awesome, thanks @jo-mueller ! Your intuition was right. The StackViewNDArray
failed passing this test in some special scenario: A 1x1 label image is a scalar per definition in numpy, but was not in stackview.
This should be fixed in stackview 0.9.0, please try it out:
pip install stackview==0.9.0
And let me know if the issue is resolved on your side. Thanks for the bug report!
@haesleinhuepf can confirm this works. Would it be worthwhile to update the version pin of stackview here, then?
That makes sense. Thanks for the feedback and thanks again for reporting the issue!
Hi @haesleinhuepf ,
I just wanted to report an issue I ran into earlier.
This does not work:
This works:
The only difference is probably just that in the above case,
nsbatwm
returns aStackViewNDArray
, which is probably inherited from a regular numpy array. Still, it seems to miss some properties forregionprops
to throw an error.I'm not sure whether it's a bug or a feature or whether you think that this would belong here or in the stackview repo. I can totally move it to stackview if you feel that's where it belongs.
Versions:
edit: Added traceback