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
This works fine if my input is 3D. But if its 4D, I see the following, where increasing the index of "t" from 0->1 causes my Z dimension to be indexed (the z-plane changes here):
2025-05-20.10-32-04.mp4
I found this to be a result of _process_indices, which first sets indexer properly:
>>>`[range(0, 2), 0, slice(None), slice(None)]`
But then when trying to apply the window_func, it sets _indexer:
# use window function is given for this dimensionifself.window_funcsisnotNone:
a=arrayfori, diminenumerate(sorted(numerical_dims)):
dim_str=curr_scrollable_format[dim]
dim=dim-i# since we loose a dimension every iteration_indexer= [slice(None)] * (curr_ndim-i)
_indexer[dim] =indexer[dim+i]
# if the indexer is an int, this dim has no window funcifisinstance(_indexer[dim], int):
a=a[tuple(_indexer)]
else:
# if the indices are from `self._get_window_indices`func=self.window_funcs[dim_str].funcwindow=a[tuple(_indexer)]
a=func(window, axis=dim)
returnaelse:
returnarray[tuple(indexer)]
Each loop calls a[tuple(_indexer)], which for my 4D array:
I have a 4D lazy array, I want to use
ImageWidgetwith a window_func on only the time dimension.When I apply the window function:
This works fine if my input is 3D. But if its 4D, I see the following, where increasing the index of "t" from 0->1 causes my Z dimension to be indexed (the z-plane changes here):
2025-05-20.10-32-04.mp4
I found this to be a result of
_process_indices, which first setsindexerproperly:But then when trying to apply the
window_func, it sets_indexer:Each loop calls
a[tuple(_indexer)], which for my 4D array:So now my TZXY array is being indexed with
arr[:2, :, :, :], where it should bearr[:2, 0, :, :].Shouldn't the entire
_indexerbe filled before being called? So movea = func(window, axis=dim)outside of theforloop?