Author: Romain Guillebert <[email protected]>
Branch: numpy-pickle
Changeset: r63849:c4923f89dd03
Date: 2013-05-04 22:07 +0200
http://bitbucket.org/pypy/pypy/changeset/c4923f89dd03/

Log:    Make sure non-flexible dtypes are considered as such.

diff --git a/pypy/module/micronumpy/interp_dtype.py 
b/pypy/module/micronumpy/interp_dtype.py
--- a/pypy/module/micronumpy/interp_dtype.py
+++ b/pypy/module/micronumpy/interp_dtype.py
@@ -244,7 +244,10 @@
 
         fieldnames = space.getitem(w_data, space.wrap(2))
         self.set_names(space, fieldnames)
-        self.set_fields(space, space.getitem(w_data, space.wrap(3)))
+
+        fields = space.getitem(w_data, space.wrap(3))
+        if fields != space.w_None:
+            self.set_fields(space, fields)
 
 class W_ComplexDtype(W_Dtype):
     def __init__(self, itemtype, num, kind, name, char, w_box_type,
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to