jax.numpy.trim_zeros
Warning
This page was created from a pull request (#9655).
jax.numpy.trim_zerosΒΆ
- jax.numpy.trim_zeros(filt, trim='fb')[source]ΒΆ
Trim the leading and/or trailing zeros from a 1-D array or sequence.
LAX-backend implementation of
trim_zeros()
.Original docstring below.
- Parameters
filt (1-D array or sequence) β Input array.
trim (str, optional) β A string with βfβ representing trim from front and βbβ to trim from back. Default is βfbβ, trim zeros from both front and back of the array.
- Returns
trimmed β The result of trimming the input. The input data type is preserved.
- Return type
1-D array or sequence