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:
- values automatically have whitespace removed from the end when indexed
- comparison operators automatically remove whitespace from the end when comparing values
- vectorized string operations are provided as methods (e.g. str.endswith) and infix operators (e.g. +, *, %)
Parameters : | obj : array of str or unicode-like itemsize : int, optional
copy : bool, optional
unicode : bool, optional
order : {‘C’, ‘F’, ‘A’}, optional
|
---|