(self, obj)
| 593 | raise ValueError("Can only create a chararray from string data.") |
| 594 | |
| 595 | def __getitem__(self, obj): |
| 596 | val = ndarray.__getitem__(self, obj) |
| 597 | if isinstance(val, character): |
| 598 | return val.rstrip() |
| 599 | return val |
| 600 | |
| 601 | # IMPLEMENTATION NOTE: Most of the methods of this class are |
| 602 | # direct delegations to the free functions in this module. |