================================
In addition to the usual bug fixes, this NumPy release cleans up and
documents the new random C-API, expires a large number of old
deprecations, and improves the appearance of the documentation. The
Python versions supported are 3.5-3.8. This is the last NumPy release
series that will support Python 3.5.
Downstream developers should use Cython \>= 0.29.14 for Python 3.8
support and OpenBLAS \>= 3.7 to avoid problems on the Skylake
architecture.
Highlights
==========
- The C-API for `numpy.random` has been defined and documented.
- Basic infrastructure for linking with 64 bit BLAS and LAPACK
libraries.
- Many documentation improvements.
New functions
=============
Multivariate hypergeometric distribution added to `numpy.random`
----------------------------------------------------------------
The method `multivariate_hypergeometric` has been added to the class
`numpy.random.Generator`. This method generates random variates from the
multivariate hypergeometric probability distribution.
(`gh-13794 <https://github.com/numpy/numpy/pull/13794>`\_\_)
Deprecations
============
`np.fromfile` and `np.fromstring` will error on bad data
--------------------------------------------------------
In future numpy releases, the functions `np.fromfile` and
`np.fromstring` will throw an error when parsing bad data. This will now
give a `DeprecationWarning` where previously partial or even invalid
data was silently returned. This deprecation also affects the C defined
functions `PyArray_FromString` and `PyArray_FromFile`
(`gh-13605 <https://github.com/numpy/numpy/pull/13605>`\_\_)
Deprecate non-scalar arrays as fill values in `ma.fill_value`
-------------------------------------------------------------
Setting a `MaskedArray.fill_value` to a non-scalar array is deprecated
since the logic to broadcast the fill value to the array is fragile,
especially when slicing.
(`gh-13698 <https://github.com/numpy/numpy/pull/13698>`\_\_)
Deprecate `PyArray_As1D`, `PyArray_As2D`
----------------------------------------
`PyArray_As1D`, `PyArray_As2D` are deprecated, use `PyArray_AsCArray`
instead (`gh-14036 <https://github.com/numpy/numpy/pull/14036>`\_\_)
Deprecate `np.alen`
-------------------
`np.alen` was deprecated. Use `len` instead.
(`gh-14181 <https://github.com/numpy/numpy/pull/14181>`\_\_)
Deprecate the financial functions
---------------------------------
In accordance with
`NEP-32 <https://numpy.org/neps/nep-0032-remove-financial-functions.html>`,
the financial functions `fv`, `ipmt`, `irr`, `mirr`, `nper`, `npv`,
`pmt`, `ppmt`, `pv` and `rate` are deprecated, and will be removed from
NumPy 1.20.The replacement for these functions is the Python package
`numpy-financial <https://pypi.org/project/numpy-financial>`*.
(`gh-14720 <https://github.com/numpy/numpy/pull/14720>`\_\_)
The `axis` argument to `numpy.ma.mask_cols` and `numpy.ma.mask_row` is deprecated
---------------------------------------------------------------------------------
This argument was always ignored.
(`gh-14996 <https://github.com/numpy/numpy/pull/14996>`\_\_)
Expired deprecations
====================
- `PyArray_As1D` and `PyArray_As2D` have been removed in favor of
`PyArray_AsCArray`
(`gh-14036 <https://github.com/numpy/numpy/pull/14036>`\_\_)
- `np.rank` has been removed. This was deprecated in NumPy 1.10 and
has been replaced by `np.ndim`.
(`gh-14039 <https://github.com/numpy/numpy/pull/14039>`\_\_)
- The deprecation of `expand_dims` out-of-range axes in 1.13.0 has
expired.
(`gh-14051 <https://github.com/numpy/numpy/pull/14051>`\_\_)
- `PyArray_FromDimsAndDataAndDescr` and `PyArray_FromDims` have been
removed (they will always raise an error). Use
`PyArray_NewFromDescr` and `PyArray_SimpleNew` instead.
(`gh-14100 <https://github.com/numpy/numpy/pull/14100>`\_\_)
- `numeric.loads`, `numeric.load`, `np.ma.dump`, `np.ma.dumps`,
`np.ma.load`, `np.ma.loads` are removed, use `pickle` methods
instead (`gh-14256 <https://github.com/numpy/numpy/pull/14256>`\_\_)
- `arrayprint.FloatFormat`, `arrayprint.LongFloatFormat` has been
removed, use `FloatingFormat` instead
- `arrayprint.ComplexFormat`, `arrayprint.LongComplexFormat` has been
removed, use `ComplexFloatingFormat` instead
- `arrayprint.StructureFormat` has been removed, use
`StructureVoidFormat` instead
(`gh-14259 <https://github.com/numpy/numpy/pull/14259>`\_\_)
- `np.testing.rand` has been removed. This was deprecated in NumPy
1.11 and has been replaced by `np.random.rand`.
(`gh-14325 <https://github.com/numpy/numpy/pull/14325>`\_\_)
- Class `SafeEval` in `numpy/lib/utils.py` has been removed. This was
deprecated in NumPy 1.10. Use `np.safe_eval` instead.
(`gh-14335 <https://github.com/numpy/numpy/pull/14335>`\_\_)
- Remove deprecated support for boolean and empty condition lists in
`np.select`
(`gh-14583 <https://github.com/numpy/numpy/pull/14583>`\_\_)
- Array order only accepts 'C', 'F', 'A', and 'K'. More permissive
options were deprecated in NumPy 1.11.
(`gh-14596 <https://github.com/numpy/numpy/pull/14596>`\_\_)
- np.linspace parameter `num` must be an integer. Deprecated in NumPy
1.12. (`gh-14620 <https://github.com/numpy/numpy/pull/14620>`\_\_)
- UFuncs with multiple outputs must use a tuple for the `out` kwarg.
This finishes a deprecation started in NumPy 1.10.
(`gh-14682 <https://github.com/numpy/numpy/pull/14682>`\_\_)
The files `numpy/testing/decorators.py`, `numpy/testing/noseclasses.py`
and `numpy/testing/nosetester.py` have been removed. They were never
meant to be public (all relevant objects are present in the
`numpy.testing` namespace), and importing them has given a deprecation