numpy.core.defchararray.array(obj, itemsize=None, copy=True, unicode=None, order=None)
[source]
Create a chararray
.
Note
This class is provided for numarray backward-compatibility. New code (not concerned with numarray compatibility) should use arrays of type string_
or unicode_
and use the free functions in numpy.char
for fast vectorized string operations instead.
Versus a regular NumPy array of type str
or unicode
, this class adds the following functionality:
str.endswith
) and infix operators (e.g. +, *, %
)Parameters: |
obj : array of str or unicode-like itemsize : int, optional
copy : bool, optional If true (default), then the object is copied. Otherwise, a copy will only be made if __array__ returns a copy, if obj is a nested sequence, or if a copy is needed to satisfy any of the other requirements ( unicode : bool, optional When true, the resulting
then the unicode setting of the output array will be automatically determined. order : {‘C’, ‘F’, ‘A’}, optional Specify the order of the array. If order is ‘C’ (default), then the array will be in C-contiguous order (last-index varies the fastest). If order is ‘F’, then the returned array will be in Fortran-contiguous order (first-index varies the fastest). If order is ‘A’, then the returned array may be in any order (either C-, Fortran-contiguous, or even discontiguous). |
---|
© 2008–2017 NumPy Developers
Licensed under the NumPy License.
https://docs.scipy.org/doc/numpy-1.14.2/reference/generated/numpy.core.defchararray.array.html