ANN: NumPy 1.5.0 release

Ralf Gommers ralf.gommers at googlemail.com
Tue Aug 31 18:18:23 CEST 2010


I am pleased to announce the availability of NumPy 1.5.0. This is the first
NumPy release to include support for Python 3, as well as for Python 2.7.

Binaries, sources, documentation and release notes can be found at
https://sourceforge.net/projects/numpy/files/.

Thank you to everyone who contributed to this release.

Enjoy,
the Numpy developers


=========================
NumPy 1.5.0 Release Notes
=========================


Highlights
==========

Python 3 compatibility
----------------------

This is the first NumPy release which is compatible with Python 3. Support
for
Python 3 and Python 2 is done from a single code base. Extensive notes on
changes can be found at
`<http://projects.scipy.org/numpy/browser/trunk/doc/Py3K.txt>`_.

Note that the Numpy testing framework relies on nose, which does not have a
Python 3 compatible release yet. A working Python 3 branch of nose can be
found
at `<http://bitbucket.org/jpellerin/nose3/>`_ however.

Porting of SciPy to Python 3 is expected to be completed soon.

:pep:`3118` compatibility
-------------------------

The new buffer protocol described by PEP 3118 is fully supported in this
version of Numpy. On Python versions >= 2.6 Numpy arrays expose the buffer
interface, and array(), asarray() and other functions accept new-style
buffers
as input.


New features
============

Warning on casting complex to real
----------------------------------

Numpy now emits a `numpy.ComplexWarning` when a complex number is cast
into a real number. For example:

    >>> x = np.array([1,2,3])
    >>> x[:2] = np.array([1+2j, 1-2j])
    ComplexWarning: Casting complex values to real discards the imaginary
part

The cast indeed discards the imaginary part, and this may not be the
intended behavior in all cases, hence the warning. This warning can be
turned off in the standard way:

    >>> import warnings
    >>> warnings.simplefilter("ignore", np.ComplexWarning)

Dot method for ndarrays
-----------------------

Ndarrays now have the dot product also as a method, which allows writing
chains of matrix products as

    >>> a.dot(b).dot(c)

instead of the longer alternative

    >>> np.dot(a, np.dot(b, c))

linalg.slogdet function
-----------------------

The slogdet function returns the sign and logarithm of the determinant
of a matrix. Because the determinant may involve the product of many
small/large values, the result is often more accurate than that obtained
by simple multiplication.

new header
----------

The new header file ndarraytypes.h contains the symbols from
ndarrayobject.h that do not depend on the PY_ARRAY_UNIQUE_SYMBOL and
NO_IMPORT/_ARRAY macros. Broadly, these symbols are types, typedefs,
and enumerations; the array function calls are left in
ndarrayobject.h. This allows users to include array-related types and
enumerations without needing to concern themselves with the macro
expansions and their side- effects.


Changes
=======

polynomial.polynomial
---------------------

* The polyint and polyder functions now check that the specified number
  integrations or derivations is a non-negative integer. The number 0 is
  a valid value for both functions.
* A degree method has been added to the Polynomial class.
* A trimdeg method has been added to the Polynomial class. It operates like
  truncate except that the argument is the desired degree of the result,
  not the number of coefficients.
* Polynomial.fit now uses None as the default domain for the fit. The
default
  Polynomial domain can be specified by using [] as the domain value.
* Weights can be used in both polyfit and Polynomial.fit
* A linspace method has been added to the Polynomial class to ease plotting.
* The polymulx function was added.

polynomial.chebyshev
--------------------

* The chebint and chebder functions now check that the specified number
  integrations or derivations is a non-negative integer. The number 0 is
  a valid value for both functions.
* A degree method has been added to the Chebyshev class.
* A trimdeg method has been added to the Chebyshev class. It operates like
  truncate except that the argument is the desired degree of the result,
  not the number of coefficients.
* Chebyshev.fit now uses None as the default domain for the fit. The default
  Chebyshev domain can be specified by using [] as the domain value.
* Weights can be used in both chebfit and Chebyshev.fit
* A linspace method has been added to the Chebyshev class to ease plotting.
* The chebmulx function was added.
* Added functions for the Chebyshev points of the first and second kind.


histogram
---------

After a two years transition period, the old behavior of the histogram
function
has been phased out, and the "new" keyword has been removed.

correlate
---------

The old behavior of correlate was deprecated in 1.4.0, the new behavior (the
usual definition for cross-correlation) is now the default.

Checksums
=========

738572dd3e5d4cd89e98c76cc3f162a9
release/installers/numpy-1.5.0-py2.5-python.org.dmg
f58ebc1840974cf2ef8b4f41516dc288
release/installers/numpy-1.5.0-py2.6-python.org.dmg
d7232048392ede8d8d8fb57839cb4b91
release/installers/numpy-1.5.0-py2.7-python.org.dmg
c5130a11f920706cdc665ef1e07772e2
release/installers/numpy-1.5.0-win32-superpack-python2.5.exe
b46a52f82126ace1eb7cb627623c64dc
release/installers/numpy-1.5.0-win32-superpack-python2.6.exe
8a93c004a104f6231de4c398e2b3c48f
release/installers/numpy-1.5.0-win32-superpack-python2.7.exe
1d255b58764d465e64b7b3eee832aa9e
release/installers/numpy-1.5.0-win32-superpack-python3.1.exe
3a8bfdc434df782d647161c48943ee09  release/installers/numpy-1.5.0.tar.gz
11354c0ca15ca6f37df9589bd4f25943  release/installers/numpy-1.5.0.zip


More information about the Python-announce-list mailing list