Skip to content

Commit 44aa4cd

Browse files
committed
Trim on all dimensions by default
1 parent a79706c commit 44aa4cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

numpy/lib/_function_base_impl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1905,7 +1905,7 @@ def _trim_zeros(filt, trim=None, axis=None):
19051905

19061906

19071907
@array_function_dispatch(_trim_zeros)
1908-
def trim_zeros(filt, trim='fb', axis=-1):
1908+
def trim_zeros(filt, trim='fb', axis=None):
19091909
"""Remove values along a dimension which are zero along all other.
19101910
19111911
Parameters
@@ -1916,7 +1916,7 @@ def trim_zeros(filt, trim='fb', axis=-1):
19161916
A string with 'f' representing trim from front and 'b' to trim from
19171917
back. By default, zeros are trimmed from the front and back.
19181918
axis : int or sequence, optional
1919-
The axis to trim. If None all axes are trimmed.
1919+
The axis to trim. If None, the default, all axes are trimmed.
19201920
19211921
Returns
19221922
-------

0 commit comments

Comments
 (0)