Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ndv/controllers/_array_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ def _on_data_response_ready(self, future: Future[DataResponse]) -> None:
try:
response = future.result()
except Exception as e:
warnings.warn(f"Error fetching data: {e}", stacklevel=2)
warnings.warn(f"Error fetching data: {e}", stacklevel=1)
return

for key, data in response.data.items():
Expand Down
4 changes: 3 additions & 1 deletion src/ndv/models/_resolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,10 @@ def process_request(req: DataRequest) -> DataResponse:
the dimensionality contract on the returned arrays.
"""
data = req.wrapper.isel(req.index)

vis_ax = req.visible_axes
if data.size == 0:
return DataResponse(n_visible_axes=len(vis_ax), data={}, request=req)

t_dims = vis_ax + tuple(i for i in range(data.ndim) if i not in vis_ax)
vis_shape = tuple(data.shape[ax] for ax in vis_ax)

Expand Down