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
Trying to expand the axis of a TsdFrame results in a pandas error.
Probably what we want is to drop the metadata and expand the dimensions with no errors.
In [5]: nap.TsdFrame(t=np.arange(10),d=np.ones((10, 2)))[:,None]
---------------------------------------------------------------------------ValueErrorTraceback (mostrecentcalllast)
...
File~/.pyenv/versions/3.11.8/envs/pynajax/lib/python3.11/site-packages/pandas/core/indexers/utils.py:341, indisallow_ndim_indexing(result)
333""" 334 Helper function to disallow multi-dimensional indexing on 1D Series/Index. 335 (...) 338 in GH#30588. 339 """340ifnp.ndim(result) >1:
-->341raiseValueError(
342"Multi-dimensional indexing (e.g. `obj[:, None]`) is no longer "343"supported. Convert to a numpy array before indexing instead."344 )
ValueError: Multi-dimensionalindexing (e.g. `obj[:, None]`) isnolongersupported. Converttoanumpyarraybeforeindexinginstead.
Trying to expand the axis of a TsdFrame results in a
pandas
error.Probably what we want is to drop the metadata and expand the dimensions with no errors.
Also,
Result in another error:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
In this case the expected behavior would probably be, returning a numpy array with an extra dimension added to the first axis.
as in
The text was updated successfully, but these errors were encountered: