Skip to content

Commit

Permalink
Tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
samaloney committed Jun 20, 2024
1 parent 5c56493 commit bae65a7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion changelog/732.feature.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Add a ``keep_dims=False`` kwarg to `~ndcube.NDCube.crop` and `~ndcube.NDCube.crop_by_values` setting to true keeps size one dimensions default behavior drops.
Add a ``keepdims=False`` kwarg to `~ndcube.NDCube.crop` and `~ndcube.NDCube.crop_by_values` setting to true keeps length-1 dimensions default behavior drops these dimensions.
4 changes: 2 additions & 2 deletions ndcube/ndcube.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def crop(self,
``.extra_coords`` properties will be used.
keepdims: `bool`, optional
If `True` keep size one dimensions rather than dropping.
If `True` keep lenght-1 dimensions rather than dropping.
Returns
-------
Expand Down Expand Up @@ -269,7 +269,7 @@ def crop_by_values(self,
``.extra_coords`` properties will be used.
keepdims: `bool`, optional
If `True` keep size one dimensions rather than dropping.
If `True` keep lenght-1 dimensions rather than dropping.
Returns
-------
Expand Down
2 changes: 1 addition & 1 deletion ndcube/utils/cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def get_crop_item_from_points(points, wcs, crop_by_values, keepdims):
i.e. low-level objects.
keep_dims : `bool`
If true keep size 1 dimensions rather than dropping
If `False`, return item that will drop length-1 dimensions otherwise, item will keep length-1 dimensions.
Returns
-------
Expand Down

0 comments on commit bae65a7

Please sign in to comment.