Skip to content

Commit 4ee0a50

Browse files
committed
Merge branch 'main' of https://github.com/sunpy/ndcube into nddataArithmetic2
2 parents e09b892 + c0cd2dd commit 4ee0a50

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

changelog/885.doc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix a mistake in the docstring for `ndcube.NDCube.rebin`, which misdescribed the behaviour of the ``-1`` sentinel value.

ndcube/ndcube.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,8 +1171,9 @@ def rebin(self, bin_shape, operation=np.mean, operation_ignores_mask=False, hand
11711171
Each element must be in int. If they are not they will be rounded
11721172
to the nearest int. If provided as a `~astropy.units.Quantity` the
11731173
units have to be convertible to pixels.
1174-
The sentinel value ``-1`` can be passed for a dimension which means
1175-
that no rebinning will occur along that dimension.
1174+
The sentinel value ``-1`` can be passed for a dimension which sets the
1175+
bin size equal to the number of pixels along that axis. This results in a
1176+
pixel size of 1 for this axis in the output (e.g. sum along that axis).
11761177
Please note the ``bin_shape`` follows array axis (NumPy) ordering of the axes.
11771178
operation : function
11781179
Function applied to the data to derive values of the bins.

0 commit comments

Comments
 (0)