numpy.char.rstrip(a, chars=None)
For each element in a
, return a copy with the trailing characters removed.
Calls str.rstrip
element-wise.
Parameters: |
|
---|---|
Returns: |
|
See also
>>> c = np.array(['aAaAaA', 'abBABba'], dtype='S7'); c array(['aAaAaA', 'abBABba'], dtype='|S7') >>> np.char.rstrip(c, b'a') array(['aAaAaA', 'abBABb'], dtype='|S7') >>> np.char.rstrip(c, b'A') array(['aAaAa', 'abBABba'], dtype='|S7')
© 2005–2019 NumPy Developers
Licensed under the 3-clause BSD License.
https://docs.scipy.org/doc/numpy-1.17.0/reference/generated/numpy.char.rstrip.html