bundles / numpy latest / numpy / str_
class
numpy:str_
source: /dev/numpy/build-install/usr/lib/python3.14/site-packages/numpy/__init__.py
Signature
class str_ ( value = '' , / , * args , ** kwargs ) Summary
A unicode string.
Extended Summary
This type strips trailing null codepoints.
>>> s = np.str_("abc\x00") >>> s 'abc'
Unlike the builtin str, this supports the python:bufferobjects, exposing its contents as UCS4:
>>> m = memoryview(np.str_("abc")) >>> m.format '3w' >>> m.tobytes() b'a\x00\x00\x00b\x00\x00\x00c\x00\x00\x00'
- Charactercode
'U'
Aliases
-
numpy.str_
Referenced by
This package
- reference:arrays.dtypes
- reference:routines.char
- reference:routines.strings
- user:basics.strings
- user:basics.types
- reference:arrays.dtypes
- reference:routines.char
- reference:routines.strings
- user:basics.strings
- user:basics.types
- reference:arrays.dtypes
- reference:routines.char
- reference:routines.strings
- user:basics.strings
- user:basics.types