summaryrefslogtreecommitdiff
path: root/numpy/core
diff options
context:
space:
mode:
authorStefan van der Walt <stefan@sun.ac.za>2006-11-20 07:24:53 +0000
committerStefan van der Walt <stefan@sun.ac.za>2006-11-20 07:24:53 +0000
commit9f036ecd5ae67db2af4d486199f2b64c73670acb (patch)
treed2daa9b9079c96206d886a91ed8fcc0b19c632f6 /numpy/core
parent1ad56e631c29869d127931b555d0b366f7e75641 (diff)
downloadnumpy-9f036ecd5ae67db2af4d486199f2b64c73670acb.tar.gz
Fix startswith operation on character arrays.
Diffstat (limited to 'numpy/core')
-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 35d206de7..80822328c 100644
--- a/numpy/core/defchararray.py
+++ b/numpy/core/defchararray.py
@@ -151,7 +151,7 @@ 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)
this_str = val[0].rstrip('\x00')