Skip to content

Fix "xarray has no attribute reshape" #208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 12, 2024

Conversation

aeisenbarth
Copy link
Contributor

@aeisenbarth aeisenbarth commented Jan 11, 2024

A .values attribute has been forgotten.

label is a SpatialImage and DataArray. Scikit-image expects a true array with a reshape method. All other uses of _map_color_seg pass the correct value, e.g.:

labels_infill = _map_color_seg(
seg=label.values,
cell_id=instance_id,

@aeisenbarth
Copy link
Contributor Author

(I thought I had seen this already fixed by another contributor, but couldn't find it merged or in a PR.)

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (09a31ad) 78.99% compared to head (2fdb783) 78.99%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #208   +/-   ##
=======================================
  Coverage   78.99%   78.99%           
=======================================
  Files          11       11           
  Lines        1314     1314           
=======================================
  Hits         1038     1038           
  Misses        276      276           
Files Coverage Δ
src/spatialdata_plot/pl/render.py 89.68% <ø> (ø)

@timtreis
Copy link
Member

True, thank you!

@timtreis timtreis merged commit adb6bb8 into scverse:main Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants