summaryrefslogtreecommitdiff
path: root/numpy/core/defchararray.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/core/defchararray.py')
-rw-r--r--numpy/core/defchararray.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/defchararray.py b/numpy/core/defchararray.py
index 70096441c..6300eb92e 100644
--- a/numpy/core/defchararray.py
+++ b/numpy/core/defchararray.py
@@ -36,7 +36,7 @@ class chararray(ndarray):
return self
def __array_finalize__(self, obj):
- if not _globalvar and self.dtype not in [string, unicode_]:
+ if not _globalvar and self.dtype.char not in 'SU':
raise ValueError, "Can only create a chararray from string data."