Author: Brian Kearns <bdkea...@gmail.com> Branch: Changeset: r67991:e85c7e78f011 Date: 2013-11-12 15:25 -0500 http://bitbucket.org/pypy/pypy/changeset/e85c7e78f011/
Log: clean up some numpypy references 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 @@ -401,7 +401,7 @@ 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), diff --git a/pypy/module/micronumpy/interp_numarray.py b/pypy/module/micronumpy/interp_numarray.py --- a/pypy/module/micronumpy/interp_numarray.py +++ b/pypy/module/micronumpy/interp_numarray.py @@ -338,11 +338,11 @@ 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 @@ -1123,9 +1123,8 @@ 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), @@ -1391,8 +1390,8 @@ 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), diff --git a/pypy/module/micronumpy/interp_ufuncs.py b/pypy/module/micronumpy/interp_ufuncs.py --- a/pypy/module/micronumpy/interp_ufuncs.py +++ b/pypy/module/micronumpy/interp_ufuncs.py @@ -413,7 +413,7 @@ W_Ufunc.typedef = TypeDef("ufunc", - __module__ = "numpypy", + __module__ = "numpy", __call__ = interp2app(W_Ufunc.descr_call), __repr__ = interp2app(W_Ufunc.descr_repr), diff --git a/pypy/module/micronumpy/test/test_dtypes.py b/pypy/module/micronumpy/test/test_dtypes.py --- a/pypy/module/micronumpy/test/test_dtypes.py +++ b/pypy/module/micronumpy/test/test_dtypes.py @@ -26,6 +26,7 @@ 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' diff --git a/pypy/module/micronumpy/test/test_numarray.py b/pypy/module/micronumpy/test/test_numarray.py --- a/pypy/module/micronumpy/test/test_numarray.py +++ b/pypy/module/micronumpy/test/test_numarray.py @@ -249,9 +249,11 @@ 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) diff --git a/pypy/module/micronumpy/test/test_ufuncs.py b/pypy/module/micronumpy/test/test_ufuncs.py --- a/pypy/module/micronumpy/test/test_ufuncs.py +++ b/pypy/module/micronumpy/test/test_ufuncs.py @@ -81,7 +81,7 @@ 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 _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit