Commits

Armin Rigo committed 48ebdce Merge

hg merge default

Comments (0)

Files changed (5)

lib_pypy/numpy.py

+raise ImportError(
+    "The 'numpy' module of PyPy is in-development and not complete. "
+    "To try it out anyway, you can either import from 'numpypy', "
+    "or just write 'import numpypy' first in your program and then "
+    "import from 'numpy' as usual.")

lib_pypy/numpypy/__init__.py

 from _numpypy import *
 from .core import *
+
+import sys
+sys.modules.setdefault('numpy', sys.modules['numpypy'])

lib_pypy/numpypy/core/numeric.py

 
-from _numpypy import array, ndarray, int_, float_ #, complex_# , longlong
+from _numpypy import array, ndarray, int_, float_, bool_ #, complex_# , longlong
 from _numpypy import concatenate
 import sys
 import _numpypy as multiarray # ARGH
 set_string_function(array_repr, 1)
 
 little_endian = (sys.byteorder == 'little')
+
+Inf = inf = infty = Infinity = PINF = float('inf')
+nan = NaN = NAN = float('nan')
+False_ = bool_(False)
+True_ = bool_(True)

pypy/doc/release-1.8.0.rst

   the JIT performance in places that use such lists. There are also special
   strategies for unicode and string lists.
 
-* As usual, numerous performance improvements. There are too many examples
-  of python constructs that now should behave faster to list them.
+* As usual, numerous performance improvements. There are many examples
+  of python constructs that now should behave faster; too many to list them.
 
 * Bugfixes and compatibility fixes with CPython.
 
   consult the `numpy status page`_. A tentative list of things that has
   been done:
 
-  xxxx # list it, multidim arrays in particular
+  * multi dimensional arrays
 
-* Fundraising XXX
+  * various sizes of dtypes
 
-.. _`numpy status page`: xxx
-.. _`numpy status update blog report`: xxx
+  * a lot of ufuncs
+
+  * a lot of other minor changes
+
+* Since the last release there was a significant breakthrough in PyPy's
+  fundraising. We now have enough funds to work on first stages of `numpypy`_
+  and `py3k`_
+
+.. _`numpy status page`: http://buildbot.pypy.org/numpy-status/latest.html
+.. _`numpy status update blog report`: http://morepypy.blogspot.com/2012/01/numpypy-status-update.html
+.. _`numpypy`: http://pypy.org/numpydonate.html
+.. _`py3k`: http://pypy.org/py3donate.html

pypy/module/test_lib_pypy/numpypy/test_numpy.py

+from pypy.conftest import gettestobjspace
+
+class AppTestNumpy:
+    def setup_class(cls):
+        cls.space = gettestobjspace(usemodules=['micronumpy'])
+
+    def test_imports(self):
+        try:
+            import numpy   # fails if 'numpypy' was not imported so far
+        except ImportError:
+            pass
+        import numpypy
+        import numpy     # works after 'numpypy' has been imported