summaryrefslogtreecommitdiff
path: root/doc/release/1.4.0-notes.rst
blob: 00cfd9085269dbb7085a338aa5784aab5efbf590 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
=========================
NumPy 1.4.0 Release Notes
=========================

This minor includes numerous bug fixes.

Highlights
==========

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

Automatic detection of forward incompatibilities
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Previously, if an extension was built against a version N of NumPy, and used on
a system with NumPy M < N, the import_array was successfull, which could cause
crashes because the version M does not have a function in N. Starting from
NumPy 1.4.0, this will cause a failure in import_array, so the error will be
catched early on.

New C API
~~~~~~~~~

The following C functions have been added to the C API:

    #. PyArray_GetNDArrayCFeatureVersion: return the *API* version of the
       loaded numpy.
    #. PyArray_Correlate2 - like PyArray_Correlate, but implements the usual
       definition of correlation. Inputs are not swapped, and conjugate is
       taken for complex arrays.
    #. PyArray_NeighborhoodIterNew - a new iterator to iterate over a
       neighborhood of a point, with automatic boundaries handling.

New ufuncs
~~~~~~~~~~

The following ufuncs have been added to the C API:

    #. copysign - return the value of the first argument with the sign copied
       from the second argument.

Deprecations
============

The following functions are deprecated:

    #. correlate: it takes a new keyword argument old_behavior. When True (the
       default), it returns the same result as before. When False, compute the
       conventional correlation, and take the conjugate for complex arrays. The
       old behavior will be removed in NumPy 1.5

Internal changes
================

split multiarray and umath
~~~~~~~~~~~~~~~~~~~~~~~~~~

The source code of multiarray and umath has been split into separate logic
compilation units. This should make the source code more amenable for
newcomers.

Separate compilation
~~~~~~~~~~~~~~~~~~~~

By default, every file of multiarray (and umath) is merged into one for
compilation, but if NPY_SEPARATE_COMPILATION env variable is set to a
non-negative value, experimental individual compilation of each file is
enabled. This makes the compile/debug cycle much faster when working on core
numpy.

Separate core math library
~~~~~~~~~~~~~~~~~~~~~~~~~~

New functions which have been added:

	* npy_copysign