diff options
author | Jarrod Millman <millman@berkeley.edu> | 2010-02-17 23:42:42 +0000 |
---|---|---|
committer | Jarrod Millman <millman@berkeley.edu> | 2010-02-17 23:42:42 +0000 |
commit | dcc721a5bddde3afd4ce47d7a7b76ec6c7102b92 (patch) | |
tree | dfb944339fc1bb15294efc2c903500ac66450c8c /numpy/core/defchararray.py | |
parent | d9e1ff3f202f2c80d0a7816935c73fec57734aff (diff) | |
download | numpy-dcc721a5bddde3afd4ce47d7a7b76ec6c7102b92.tar.gz |
updated docstrings from pydoc website (thanks to everyone who contributed!)
Diffstat (limited to 'numpy/core/defchararray.py')
-rw-r--r-- | numpy/core/defchararray.py | 83 |
1 files changed, 74 insertions, 9 deletions
diff --git a/numpy/core/defchararray.py b/numpy/core/defchararray.py index 4530bd5ad..27bcb352b 100644 --- a/numpy/core/defchararray.py +++ b/numpy/core/defchararray.py @@ -4,12 +4,12 @@ operations and methods. .. note:: The `chararray` class exists for backwards compatibility with - Numarray, it is not recommended for new development. If one needs - arrays of strings, use arrays of `dtype` `object_`, `string_` or - `unicode_`, and use the free functions in the `numpy.char` module - for fast vectorized string operations. + Numarray, it is not recommended for new development. Starting from numpy + 1.4, if one needs arrays of strings, it is recommended to use arrays of + `dtype` `object_`, `string_` or `unicode_`, and use the free functions + in the `numpy.char` module for fast vectorized string operations. -Some methods will only be available if the corresponding str method is +Some methods will only be available if the corresponding string method is available in your version of Python. The preferred alias for `defchararray` is `numpy.char`. @@ -1692,10 +1692,10 @@ class chararray(ndarray): .. note:: The `chararray` class exists for backwards compatibility with - Numarray, it is not recommended for new development. If one needs - arrays of strings, use arrays of `dtype` `object_`, `string_` or - `unicode_`, and use the free functions in the `numpy.char` module - for fast vectorized string operations. + Numarray, it is not recommended for new development. Starting from numpy + 1.4, if one needs arrays of strings, it is recommended to use arrays of + `dtype` `object_`, `string_` or `unicode_`, and use the free functions + in the `numpy.char` module for fast vectorized string operations. Versus a regular Numpy array of type `str` or `unicode`, this class adds the following functionality: @@ -1718,6 +1718,71 @@ class chararray(ndarray): ``len(shape) >= 2`` and ``order='Fortran'``, in which case `strides` is in "Fortran order". + Methods + ------- + astype + argsort + copy + count + decode + dump + dumps + encode + endswith + expandtabs + fill + find + flatten + getfield + index + isalnum + isalpha + isdecimal + isdigit + islower + isnumeric + isspace + istitle + isupper + item + join + ljust + lower + lstrip + nonzero + put + ravel + repeat + replace + reshape + resize + rfind + rindex + rjust + rsplit + rstrip + searchsorted + setfield + setflags + sort + split + splitlines + squeeze + startswith + strip + swapaxes + swapcase + take + title + tofile + tolist + tostring + translate + transpose + upper + view + zfill + Parameters ---------- shape : tuple |