bundles / numpy 2.5.0.dev0+git20251130.2de293a / numpy / strings / upper
_ArrayFunctionDispatcher
numpy.strings:upper
source: build-install/usr/lib/python3.14/site-packages/numpy/_core/strings.py:1084
Signature
def upper(a)Summary
Return an array with the elements converted to uppercase.
Extended Summary
Calls str.upper element-wise.
For 8-bit strings, this method is locale-dependent.
Parameters
a: array-like, with ``StringDType``, ``bytes_``, or ``str_`` dtypeInput array.
Returns
out: ndarrayOutput array of
StringDType,bytes_orstr_dtype, depending on input types
Examples
import numpy as np c = np.array(['a1b c', '1bca', 'bca1']); c np.strings.upper(c)✓
array(['A1B C', '1BCA', 'BCA1'], dtype='<U5')
See also
- str.upper
Aliases
numpy.char.upper