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.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/numpy/core/defchararray.py b/numpy/core/defchararray.py
index 9e9e78122..2ddd6f5bd 100644
--- a/numpy/core/defchararray.py
+++ b/numpy/core/defchararray.py
@@ -135,14 +135,13 @@ class chararray(ndarray):
for k, val in enumerate(myiter):
newval = []
for chk in val[1:]:
- if chk.dtype is object_ and chk.item() is None:
+ if not chk or (chk.dtype is object_ and chk.item() is None):
break
newval.append(chk)
newitem = getattr(val[0],name)(*newval)
maxsize = max(len(newitem), maxsize)
res[k] = newitem
newarr = chararray(myiter.shape, maxsize, self.dtype is unicode_)
- print res, maxsize
newarr[:] = res
return newarr