This is a pre-release version (2.5.0.dev0+git20251130.2de293a). Go to latest (2.4.4)
{ } Raw JSON

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_`` dtype

Input array.

Returns

out : ndarray

Output array of StringDType, bytes_ or str_ dtype, depending on input types

Examples

import numpy as np
c = np.array(['a1b c', '1bca', 'bca1']); c
np.strings.upper(c)

See also

str.upper

Aliases

  • numpy.char.upper