diff options
Diffstat (limited to 'doc/release/1.17.0-notes.rst')
| -rw-r--r-- | doc/release/1.17.0-notes.rst | 114 |
1 files changed, 114 insertions, 0 deletions
diff --git a/doc/release/1.17.0-notes.rst b/doc/release/1.17.0-notes.rst new file mode 100644 index 000000000..73de0b148 --- /dev/null +++ b/doc/release/1.17.0-notes.rst @@ -0,0 +1,114 @@ +========================== +NumPy 1.17.0 Release Notes +========================== + + +Highlights +========== + +* NumPy's FFT implementation has switched to pocketfft + +New functions +============= + + +Deprecations +============ + + +Future Changes +============== + + +Expired deprecations +==================== + + +Compatibility notes +=================== + + +C API changes +============= + + +New Features +============ + +``np.ufunc.reduce`` and related functions now accept a ``where`` mask +--------------------------------------------------------------------- +``np.ufunc.reduce``, ``np.sum``, ``np.prod``, ``np.min``, ``np.max`` all +now accept a ``where`` keyword argument, which can be used to tell which +elements to include in the reduction. For reductions that do not have an +identity, it is necessary to also pass in an initial value (e.g., +``initial=np.inf`` for ``np.min``). For instance, the equivalent of +``nansum`` would be, ``np.sum(a, where=~np.isnan(a))``. + + +``np.linalg.svd`` and ``np.linalg.pinv`` can be faster on hermitian inputs +-------------------------------------------------------------------------- +These functions now accept a ``hermitian`` argument, matching the one added +to ``np.linalg.matrix_rank`` in 1.14.0. + + +Improvements +============ + +Array comparison assertions include maximum differences +------------------------------------------------------- +Error messages from array comparison tests such as +`np.testing.assert_allclose` now include "max absolute difference" and +"max relative difference," in addition to the previous "mismatch" percentage. +This information makes it easier to update absolute and relative error +tolerances. + +Replacement of the `fftpack`-based FFT module by the `pocketfft` library +------------------------------------------------------------------------ + +Both implementations have the same ancestor (Fortran77 `FFTPACK` by Paul N. +Swarztrauber), but `pocketfft` contains additional modifications which +improve both accuracy and performance in some circumstances. For FFT lengths +containing large prime factors, `pocketfft` uses Bluestein's algorithm, which +maintains `O(N log N)` run time complexity instead of deteriorating towards +`O(N*N)` for prime lengths. Also, accuracy for real-valued FFTs with near-prime +lengths has improved and is on par with complex-valued FFTs. + +Further improvements to ``ctypes`` support in ``np.ctypeslib`` +-------------------------------------------------------------- +A new ``np.ctypeslib.as_ctypes_type`` function has been added, which can be +used to converts a `dtype` into a best-guess `ctypes` type. Thanks to this +new function, ``np.ctypeslib.as_ctypes`` now supports a much wider range of +array types, including structures, booleans, and integers of non-native +endianness. + +`numpy.errstate` is now also function decorator +----------------------------------------------- + +Currently, if you have a function like:: + + def foo(): + pass + +and you want to wrap the whole thing in `errstate`, you have to rewrite it like so:: + + def foo(): + with np.errstate(...): + pass + +but with this change, you can do:: + + @np.errstate(...) + def foo(): + pass + +thereby saving a level of indentation + +Changes +======= + +``median`` and ``percentile`` family of functions no longer warn about ``nan`` +------------------------------------------------------------------------------ + +`numpy.median`, `numpy.percentile`, and `numpy.quantile` used to emit a +``RuntimeWarning`` when encountering an `numpy.nan`. Since they return the +``nan`` value, the warning is redundant and has been removed. |
