summaryrefslogtreecommitdiff
path: root/scipy/base/_internal.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2005-12-06 00:57:13 +0000
committerTravis Oliphant <oliphant@enthought.com>2005-12-06 00:57:13 +0000
commit50fefdff2667d55fe6c068b26dd62b2aaddae880 (patch)
tree90a5224c01a5470dea0928faae20df524be619a8 /scipy/base/_internal.py
parentcb2f58fe323d9753b45ecd9f877f6acb99c7c94b (diff)
downloadnumpy-50fefdff2667d55fe6c068b26dd62b2aaddae880.tar.gz
Added handling of output of fields returned from dtypedescr to constructor. Fixed itemsize reference in fortranobject.c
Diffstat (limited to 'scipy/base/_internal.py')
-rw-r--r--scipy/base/_internal.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/scipy/base/_internal.py b/scipy/base/_internal.py
index 626a8439f..654188f41 100644
--- a/scipy/base/_internal.py
+++ b/scipy/base/_internal.py
@@ -216,7 +216,10 @@ def _usefields(adict):
raise ValueError, "invalid offset."
names.append(fname)
offsets.append(num)
- formats.append(dtypedescr(obj[0]))
+ format = dtypedescr(obj[0])
+ if (format.itemsize == 0):
+ raise ValueError, "all itemsizes must be given."
+ formats.append(format)
if (n > 2):
title = obj[2]
else: