Skip to content

Add support for expanding dimensions using None #408

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

Merged
merged 5 commits into from
Apr 18, 2022
Merged
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions spec/API_specification/indexing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,11 @@ Multi-dimensional arrays must extend the concept of single-axis indexing to mult

To perform flat indexing, use ``reshape(x, (-1,))[integer]``.

- Each ``None`` in the selection tuple must expand the dimensions of the resulting selection by one dimension of size ``1``. The position of the added dimension must be the same as the position of ``None`` in the selection tuple.

.. note::
Expanding dimensions can be equivalently achieved via repeated invocation of :func:`~signatures.manipulation_functions.expand_dims`.

- An ``IndexError`` exception must be raised if the number of provided single-axis indexing expressions is greater than ``N``.

.. note::
Expand Down