Commits

Brian Kearns committed e85c7e7

clean up some numpypy references

Comments (0)

Files changed (6)

pypy/module/micronumpy/interp_dtype.py

     raise operationerrfmt(space.w_TypeError, msg, w_dtype)
 
 W_Dtype.typedef = TypeDef("dtype",
-    __module__ = "numpypy",
+    __module__ = "numpy",
     __new__ = interp2app(descr__new__),
 
     __str__= interp2app(W_Dtype.descr_str),

pypy/module/micronumpy/interp_numarray.py

 
         Returns an array containing the same data with a new shape.
 
-        Refer to `numpypy.reshape` for full documentation.
+        Refer to `numpy.reshape` for full documentation.
 
         See Also
         --------
-        numpypy.reshape : equivalent function
+        numpy.reshape : equivalent function
         """
         args_w, kw_w = __args__.unpack()
         order = NPY_CORDER
         return res
 """, filename=__file__).interphook('ptp')
 
-W_NDimArray.typedef = TypeDef(
-    "ndarray",
-    __module__ = "numpypy",
+W_NDimArray.typedef = TypeDef("ndarray",
+    __module__ = "numpy",
     __new__ = interp2app(descr_new_array),
 
     __len__ = interp2app(W_NDimArray.descr_len),
     return box
 
 
-W_FlatIterator.typedef = TypeDef(
-    'flatiter',
+W_FlatIterator.typedef = TypeDef("flatiter",
+    __module__ = "numpy",
     __iter__ = interp2app(W_FlatIterator.descr_iter),
     __getitem__ = interp2app(W_FlatIterator.descr_getitem),
     __setitem__ = interp2app(W_FlatIterator.descr_setitem),

pypy/module/micronumpy/interp_ufuncs.py

 
 
 W_Ufunc.typedef = TypeDef("ufunc",
-    __module__ = "numpypy",
+    __module__ = "numpy",
 
     __call__ = interp2app(W_Ufunc.descr_call),
     __repr__ = interp2app(W_Ufunc.descr_repr),

pypy/module/micronumpy/test/test_dtypes.py

         assert d.kind == 'b'
         assert dtype(d) is d
         assert dtype('bool') is d
+        assert repr(type(d)) == "<type 'numpy.dtype'>"
 
         assert dtype('int8').num == 1
         assert dtype('int8').name == 'int8'

pypy/module/micronumpy/test/test_numarray.py

         return CustomIntObject(value)
 
     def test_ndarray(self):
-        from numpypy import ndarray, array, dtype
+        from numpy import ndarray, array, dtype, flatiter
 
         assert type(ndarray) is type
+        assert repr(ndarray) == "<type 'numpy.ndarray'>"
+        assert repr(flatiter) == "<type 'numpy.flatiter'>"
         assert type(array) is not type
         a = ndarray((2, 3))
         assert a.shape == (2, 3)

pypy/module/micronumpy/test/test_ufuncs.py

 
         assert isinstance(add, ufunc)
         assert repr(add) == "<ufunc 'add'>"
-        assert repr(ufunc) == "<type 'numpypy.ufunc'>" or repr(ufunc) == "<type 'numpy.ufunc'>"
+        assert repr(ufunc) == "<type 'numpy.ufunc'>"
 
     def test_ufunc_attrs(self):
         from numpypy import add, multiply, sin