MCPcopy Create free account
hub / github.com/numpy/numpy / _is_unicode

Function _is_unicode

numpy/core/defchararray.py:49–57  ·  view source on GitHub ↗

Returns True if arr is a string or a string array with a dtype that represents a unicode string, otherwise returns False.

(arr)

Source from the content-addressed store, hash-verified

47
48
49def _is_unicode(arr):
50 """Returns True if arr is a string or a string array with a dtype that
51 represents a unicode string, otherwise returns False.
52
53 """
54 if (isinstance(arr, str) or
55 issubclass(numpy.asarray(arr).dtype.type, str)):
56 return True
57 return False
58
59
60def _to_bytes_or_str_array(result, output_dtype_like=None):

Callers 2

isnumericFunction · 0.85
isdecimalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected