You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In cucim.skimage.measure, region_props allows you to pass in a numpy object and some properties work okay (e.g. bbox) whereas others produce an error when evaluated (e.g. centroid). This inconsistency is somewhat confusing. It seems that ndarray is only partially supported internally.
Steps/Code to reproduce bug
import cupy as cp
from cucim.skimage import measure
a = np.array([[0,0,0,0,0,0,0],
[0,1,1,1,0,0,0],
[0,1,1,1,0,0,0],
[0,1,1,1,0,0,0],
[0,0,0,2,2,2,0],
[0,0,0,2,2,0,0],
[0,0,0,3,3,0,0]])
# Uncomment and it works. Omit this and some properties work
# a = cp.array(a)
res = measure.regionprops(a)
for r in res:
print(r.bbox, r.centroid)
Expected behavior
All properties should either work without error or should fail consistently
Environment details (please complete the following information):
Running Vista2D container, which includes cucim v23.12.1
Additional context
The text was updated successfully, but these errors were encountered:
Describe the bug
In cucim.skimage.measure, region_props allows you to pass in a numpy object and some properties work okay (e.g. bbox) whereas others produce an error when evaluated (e.g. centroid). This inconsistency is somewhat confusing. It seems that ndarray is only partially supported internally.
Steps/Code to reproduce bug
Expected behavior
All properties should either work without error or should fail consistently
Environment details (please complete the following information):
Running Vista2D container, which includes cucim v23.12.1
Additional context
The text was updated successfully, but these errors were encountered: