-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
st.pl.overlay_slices_2d is not compitible with Numpy>=2.0:
st.pl.overlay_slices_2d(slices = aligned_slices, spatial_key = key_added, height=3, overlay_type='backward', legend_kwargs={'loc': 'upper center', 'bbox_to_anchor': (0.5, 0),'borderaxespad': -2, 'frameon': False},)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[38], [line 1](vscode-notebook-cell:?execution_count=38&line=1)
----> [1](vscode-notebook-cell:?execution_count=38&line=1) st.pl.overlay_slices_2d(slices = aligned_slices, spatial_key = key_added, height=3, overlay_type='backward', legend_kwargs={'loc': 'upper center', 'bbox_to_anchor': (0.5, 0),'borderaxespad': -2, 'frameon': False},)
File ~/software/spateo-release/spateo/plotting/static/align.py:635, in overlay_slices_2d(slices, slices_key, label_key, overlay_type, spatial_key, point_size, n_sampling, palette, ncols, title, title_kwargs, show_legend, legend_kwargs, axis_off, axis_kwargs, ticks_off, x_min, x_max, y_min, y_max, height, alpha, cmap, center_coordinate, gridspec_kws, save_show_or_return, save_kwargs, **kwargs)
[616](https://vscode-remote+ssh-002dremote-002blenovo-002dtag308-002dfrp.vscode-resource.vscode-cdn.net/home/weize/analysis/openst-2510/~/software/spateo-release/spateo/plotting/static/align.py:616) slices_spatial_data = pd.concat(
[617](https://vscode-remote+ssh-002dremote-002blenovo-002dtag308-002dfrp.vscode-resource.vscode-cdn.net/home/weize/analysis/openst-2510/~/software/spateo-release/spateo/plotting/static/align.py:617) [
[618](https://vscode-remote+ssh-002dremote-002blenovo-002dtag308-002dfrp.vscode-resource.vscode-cdn.net/home/weize/analysis/openst-2510/~/software/spateo-release/spateo/plotting/static/align.py:618) slices_spatial_data,
(...)
[631](https://vscode-remote+ssh-002dremote-002blenovo-002dtag308-002dfrp.vscode-resource.vscode-cdn.net/home/weize/analysis/openst-2510/~/software/spateo-release/spateo/plotting/static/align.py:631) axis=0,
[632](https://vscode-remote+ssh-002dremote-002blenovo-002dtag308-002dfrp.vscode-resource.vscode-cdn.net/home/weize/analysis/openst-2510/~/software/spateo-release/spateo/plotting/static/align.py:632) )
[634](https://vscode-remote+ssh-002dremote-002blenovo-002dtag308-002dfrp.vscode-resource.vscode-cdn.net/home/weize/analysis/openst-2510/~/software/spateo-release/spateo/plotting/static/align.py:634) # set the aspect ratio of each subplot
--> [635](https://vscode-remote+ssh-002dremote-002blenovo-002dtag308-002dfrp.vscode-resource.vscode-cdn.net/home/weize/analysis/openst-2510/~/software/spateo-release/spateo/plotting/static/align.py:635) ptp_vec = slices_spatial_data[["x", "y"]].values.ptp(0)
[636](https://vscode-remote+ssh-002dremote-002blenovo-002dtag308-002dfrp.vscode-resource.vscode-cdn.net/home/weize/analysis/openst-2510/~/software/spateo-release/spateo/plotting/static/align.py:636) aspect_ratio = ptp_vec[0] / ptp_vec[1]
[638](https://vscode-remote+ssh-002dremote-002blenovo-002dtag308-002dfrp.vscode-resource.vscode-cdn.net/home/weize/analysis/openst-2510/~/software/spateo-release/spateo/plotting/static/align.py:638) # Set multi-plot grid for plotting.
AttributeError: `ptp` was removed from the ndarray class in NumPy 2.0. Use np.ptp(arr, ...) instead.
Metadata
Metadata
Assignees
Labels
No labels