Commits

Brian Kearns committed f9c6ec8

convert this back to a list and verify it is complete

Comments (0)

Files changed (1)

pypy/module/micronumpy/interp_dtype.py

                 self.dtypes_by_name[alias] = dtype
             self.dtypes_by_name[dtype.char] = dtype
 
+        self.dtypes_by_num = [dtype for dtype in
+                sorted(self.dtypes_by_num.values(), key=lambda dtype: dtype.num)
+                if dtype.num <= self.w_float64dtype.num]
+        assert len(self.dtypes_by_num) == self.w_float64dtype.num + 1
+
         typeinfo_full = {
             'LONGLONG': self.w_int64dtype,
             'SHORT': self.w_int16dtype,