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 / _core / _string_helpers / english_upper

function

numpy._core._string_helpers:english_upper

source: build-install/usr/lib/python3.14/site-packages/numpy/_core/_string_helpers.py :44

Signature

def   english_upper ( s )

Summary

Apply English case rules to convert ASCII strings to all upper case.

Extended Summary

This is an internal utility function to replace calls to str.upper() such that we can avoid changing behavior with changing locales. In particular, Turkish has distinct dotted and dotless variants of the Latin letter "I" in both lowercase and uppercase. Thus, "i".upper() != "I" in a "tr" locale.

Parameters

s : str

Returns

uppered : str

Examples

from numpy._core.numerictypes import english_upper
english_upper('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_')
english_upper('')

Aliases

  • numpy._core._string_helpers.english_upper