Return the indices that sort the array lexicographically. For full documentation see `numpy.argsort`, for which this method is in fact merely a "thin wrapper." Examples -------- >>> c = np.array(['a1b c', '1b ca', 'b ca1', 'Ca1b'], 'S5') >>>
(self, axis=-1, kind=None, order=None)
| 2237 | return NotImplemented |
| 2238 | |
| 2239 | def argsort(self, axis=-1, kind=None, order=None): |
| 2240 | """ |
| 2241 | Return the indices that sort the array lexicographically. |
| 2242 | |
| 2243 | For full documentation see `numpy.argsort`, for which this method is |
| 2244 | in fact merely a "thin wrapper." |
| 2245 | |
| 2246 | Examples |
| 2247 | -------- |
| 2248 | >>> c = np.array(['a1b c', '1b ca', 'b ca1', 'Ca1b'], 'S5') |
| 2249 | >>> c = c.view(np.chararray); c |
| 2250 | chararray(['a1b c', '1b ca', 'b ca1', 'Ca1b'], |
| 2251 | dtype='|S5') |
| 2252 | >>> c[c.argsort()] |
| 2253 | chararray(['1b ca', 'Ca1b', 'a1b c', 'b ca1'], |
| 2254 | dtype='|S5') |
| 2255 | |
| 2256 | """ |
| 2257 | return self.__array__().argsort(axis, kind, order) |
| 2258 | argsort.__doc__ = ndarray.argsort.__doc__ |
| 2259 | |
| 2260 | def capitalize(self): |