From d618770c32987d4148a94e6e14c14b9de72e3763 Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Wed, 12 Apr 2006 23:30:51 +0000 Subject: Fix Ticket #50 --- allow reconstruction of dumped chararray --- numpy/core/defchararray.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'numpy/core/defchararray.py') diff --git a/numpy/core/defchararray.py b/numpy/core/defchararray.py index 9ef3cb376..aeba32fc5 100644 --- a/numpy/core/defchararray.py +++ b/numpy/core/defchararray.py @@ -36,7 +36,8 @@ class chararray(ndarray): return self def __array_finalize__(self, obj): - if not _globalvar and self.dtype.char not in 'SU': + # The b is a special case because it is used for reconstructing. + if not _globalvar and self.dtype.char not in 'SUb': raise ValueError, "Can only create a chararray from string data." -- cgit v1.2.1