Skip to content
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

IndexError: index 144 is out of bounds for axis 1 with size 26 #14

Open
joshmoore opened this issue Sep 22, 2021 · 2 comments
Open

IndexError: index 144 is out of bounds for axis 1 with size 26 #14

joshmoore opened this issue Sep 22, 2021 · 2 comments

Comments

@joshmoore
Copy link
Member

With origin/main, I still see the error from #6: TypeError: len() of unsized object

With this PR, the image & label layers load.

I note that I see a separate error when viewing the labels in 3D:

/usr/local/anaconda3/envs/z/lib/python3.9/site-packages/napari/layers/labels/labels.py in _get_value_ray(self=<Labels layer '0'>, start_point=<class 'numpy.ndarray'> (3,) float64, end_point=<class 'numpy.ndarray'> (3,) float64, dims_displayed=[2, 3, 4])
    972                 sample_points, self._display_bounding_box(dims_displayed)
    973             ).astype(int)
--> 974             values = im_slice[tuple(clamped.T)]
        values = undefined
        im_slice = <class 'numpy.ndarray'> (257, 26, 31) int64
        global tuple = undefined
        clamped.T = <class 'numpy.ndarray'> (3, 504) int64
    975             nonzero_indices = np.flatnonzero(values)
    976             if len(nonzero_indices > 0):

IndexError: index 144 is out of bounds for axis 1 with size 26

Originally posted by @joshmoore in #12 (comment)

cc: @jni

@joshmoore joshmoore changed the title TypeError: len() of unsized object IndexError: index 144 is out of bounds for axis 1 with size 26 Sep 22, 2021
@jni
Copy link
Contributor

jni commented Jan 24, 2024

Wow I ran into this today. That's not very good. 😅 But at least it means it's not an issue with napari 0.4.19rc4 specifically 🤣

Based on the bit of code it looks like we're somehow not dealing with the multiscales indexing very well? (This doesn't happen when I only write out one level.)

@dstansby
Copy link
Contributor

Does someone have a self-contained reproducible example for this bug? I'm wondering if napari 0.5 helps at all...

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

No branches or pull requests

3 participants