{ } Raw JSON

bundles / numpy 2.4.4 / numpy / strings / upper

_ArrayFunctionDispatcher

numpy.strings:upper

source: /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