Skip to content

Add Ellipsis support to __getitem__ slicing#385

Merged
kwmsmith merged 9 commits into
masterfrom
feature/add-ellipsis-support-to-slicing
Jun 16, 2014
Merged

Add Ellipsis support to __getitem__ slicing#385
kwmsmith merged 9 commits into
masterfrom
feature/add-ellipsis-support-to-slicing

Conversation

@bgrant
Copy link
Copy Markdown
Contributor

@bgrant bgrant commented May 27, 2014

Based on #384.

See http://docs.scipy.org/doc/numpy/reference/arrays.indexing.html for details on the Ellipsis object.

@bgrant bgrant added this to the 0.4 milestone May 27, 2014
@bgrant bgrant mentioned this pull request May 27, 2014
@kwmsmith
Copy link
Copy Markdown
Contributor

kwmsmith commented Jun 9, 2014

@bgrant are these ellipsis edge cases covered? We should have tests for them:

arr = np.ones((10, 20))
assert allclose(arr[..., ..., ...], arr[:, :]) # extra ellipses are ignored.

zerodee = np.array(0)
assert zerodee[...] == zerodee # ellipsis can be used with 0D scalars as well.

@bgrant
Copy link
Copy Markdown
Contributor Author

bgrant commented Jun 9, 2014

Regarding how Ellipsis works: it is as described here: http://docs.scipy.org/doc/numpy/reference/arrays.indexing.html

But numpy may work differently now (you mentioned in person that the numpy source looked like it had changed).

@bgrant
Copy link
Copy Markdown
Contributor Author

bgrant commented Jun 9, 2014

Additional tests added in e394e51

@bgrant
Copy link
Copy Markdown
Contributor Author

bgrant commented Jun 12, 2014

@kwmsmith : Comments addressed.

@coveralls
Copy link
Copy Markdown

Coverage Status

Changes Unknown when pulling e6f8bdc on feature/add-ellipsis-support-to-slicing into * on master*.

@kwmsmith
Copy link
Copy Markdown
Contributor

👍

kwmsmith added a commit that referenced this pull request Jun 16, 2014
…o-slicing

Add Ellipsis support to __getitem__ slicing
@kwmsmith kwmsmith merged commit a4357a5 into master Jun 16, 2014
@kwmsmith kwmsmith deleted the feature/add-ellipsis-support-to-slicing branch June 16, 2014 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants