Author: Armin Rigo <ar...@tunes.org> Branch: release-1.8.x Changeset: r52228:48ebdce33e1b Date: 2012-02-08 13:50 +0100 http://bitbucket.org/pypy/pypy/changeset/48ebdce33e1b/
Log: hg merge default diff --git a/lib_pypy/numpy.py b/lib_pypy/numpy.py new file mode 100644 --- /dev/null +++ b/lib_pypy/numpy.py @@ -0,0 +1,5 @@ +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.") diff --git a/lib_pypy/numpypy/__init__.py b/lib_pypy/numpypy/__init__.py --- a/lib_pypy/numpypy/__init__.py +++ b/lib_pypy/numpypy/__init__.py @@ -1,2 +1,5 @@ from _numpypy import * from .core import * + +import sys +sys.modules.setdefault('numpy', sys.modules['numpypy']) diff --git a/lib_pypy/numpypy/core/numeric.py b/lib_pypy/numpypy/core/numeric.py --- a/lib_pypy/numpypy/core/numeric.py +++ b/lib_pypy/numpypy/core/numeric.py @@ -1,5 +1,5 @@ -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 @@ -309,3 +309,8 @@ 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) diff --git a/pypy/doc/release-1.8.0.rst b/pypy/doc/release-1.8.0.rst --- a/pypy/doc/release-1.8.0.rst +++ b/pypy/doc/release-1.8.0.rst @@ -33,8 +33,8 @@ 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. @@ -44,9 +44,19 @@ 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 diff --git a/pypy/module/test_lib_pypy/numpypy/test_numpy.py b/pypy/module/test_lib_pypy/numpypy/test_numpy.py new file mode 100644 --- /dev/null +++ b/pypy/module/test_lib_pypy/numpypy/test_numpy.py @@ -0,0 +1,13 @@ +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 _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit