Changelog
### 1.7.1
```
compared to `1.7.0`.
Authors
=======
* Peter Bell
* Evgeni Burovski
* Justin Charlong +
* Ralf Gommers
* Matti Picus
* Tyler Reddy
* Pamphile Roy
* Sebastian Wallkötter
* Arthur Volant
A total of 9 people contributed to this release.
People with a "+" by their names contributed a patch for the first time.
This list of names is automatically generated, and may not be fully complete.
```
### 1.7.0
```
many new features, numerous bug-fixes, improved test coverage and better
documentation. There have been a number of deprecations and API changes
in this release, which are documented below. All users are encouraged to
upgrade to this release, as there are a large number of bug-fixes and
optimizations. Before upgrading, we recommend that users check that
their own code does not use deprecated SciPy functionality (to do so,
run your code with ``python -Wd`` and check for ``DeprecationWarning`` s).
Our development attention will now shift to bug-fix releases on the
1.7.x branch, and on adding new features on the master branch.
This release requires Python `3.7+` and NumPy `1.16.5` or greater.
For running on PyPy, PyPy3 `6.0+` is required.
Highlights of this release
- A new submodule for quasi-Monte Carlo, `scipy.stats.qmc`, was added
- The documentation design was updated to use the same PyData-Sphinx theme as
other NumFOCUS packages like NumPy.
- We now vendor and leverage the Boost C++ library to enable numerous
improvements for long-standing weaknesses in `scipy.stats`
- `scipy.stats` has six new distributions, eight new (or overhauled)
hypothesis tests, a new function for bootstrapping, a class that enables
fast random variate sampling and percentile point function evaluation,
and many other enhancements.
- ``cdist`` and ``pdist`` distance calculations are faster for several metrics,
especially weighted cases, thanks to a rewrite to a new C++ backend framework
- A new class for radial basis function interpolation, `RBFInterpolator`, was
added to address issues with the `Rbf` class.
*We gratefully acknowledge the Chan-Zuckerberg Initiative Essential Open Source
Software for Science program for supporting many of the improvements to*
`scipy.stats`.
New features
`scipy.cluster` improvements
An optional argument, ``seed``, has been added to ``kmeans`` and ``kmeans2`` to
set the random generator and random state.
`scipy.interpolate` improvements
Improved input validation and error messages for ``fitpack.bispev`` and
``fitpack.parder`` for scenarios that previously caused substantial confusion
for users.
The class `RBFInterpolator` was added to supersede the `Rbf` class. The new
class has usage that more closely follows other interpolator classes, corrects
sign errors that caused unexpected smoothing behavior, includes polynomial
terms in the interpolant (which are necessary for some RBF choices), and
supports interpolation using only the k-nearest neighbors for memory
efficiency.
`scipy.linalg` improvements
An LAPACK wrapper was added for access to the ``tgexc`` subroutine.
`scipy.ndimage` improvements
`scipy.ndimage.affine_transform` is now able to infer the ``output_shape`` from
the ``out`` array.
`scipy.optimize` improvements
The optional parameter ``bounds`` was added to
``_minimize_neldermead`` to support bounds constraints
for the Nelder-Mead solver.
``trustregion`` methods ``trust-krylov``, ``dogleg`` and ``trust-ncg`` can now
estimate ``hess`` by finite difference using one of
``["2-point", "3-point", "cs"]``.
``halton`` was added as a ``sampling_method`` in `scipy.optimize.shgo`.
``sobol`` was fixed and is now using `scipy.stats.qmc.Sobol`.
``halton`` and ``sobol`` were added as ``init`` methods in
`scipy.optimize.differential_evolution.`
``differential_evolution`` now accepts an ``x0`` parameter to provide an
initial guess for the minimization.
``least_squares`` has a modest performance improvement when SciPy is built
with Pythran transpiler enabled.
When ``linprog`` is used with ``method`` ``'highs'``, ``'highs-ipm'``, or
``'highs-ds'``, the result object now reports the marginals (AKA shadow
prices, dual values) and residuals associated with each constraint.
`scipy.signal` improvements
``get_window`` supports ``general_cosine`` and ``general_hamming`` window
functions.
`scipy.signal.medfilt2d` now releases the GIL where appropriate to enable
performance gains via multithreaded calculations.
`scipy.sparse` improvements
Addition of ``dia_matrix`` sparse matrices is now faster.
`scipy.spatial` improvements
``distance.cdist`` and ``distance.pdist`` performance has greatly improved for
certain weighted metrics. Namely: ``minkowski``, ``euclidean``, ``chebyshev``,
``canberra``, and ``cityblock``.
Modest performance improvements for many of the unweighted ``cdist`` and
``pdist`` metrics noted above.
The parameter ``seed`` was added to `scipy.spatial.vq.kmeans` and
`scipy.spatial.vq.kmeans2`.
The parameters ``axis`` and ``keepdims`` where added to
`scipy.spatial.distance.jensenshannon`.
The ``rotation`` methods ``from_rotvec`` and ``as_rotvec`` now accept a
``degrees`` argument to specify usage of degrees instead of radians.
`scipy.special` improvements
Wright's generalized Bessel function for positive arguments was added as
`scipy.special.wright_bessel.`
An implementation of the inverse of the Log CDF of the Normal Distribution is
now available via `scipy.special.ndtri_exp`.
`scipy.stats` improvements
Hypothesis Tests
The Mann-Whitney-Wilcoxon test, ``mannwhitneyu``, has been rewritten. It now
supports n-dimensional input, an exact test method when there are no ties,
and improved documentation. Please see "Other changes" for adjustments to
default behavior.
The new function `scipy.stats.binomtest` replaces `scipy.stats.binom_test`. The
new function returns an object that calculates a confidence intervals of the
proportion parameter. Also, performance was improved from O(n) to O(log(n)) by
using binary search.
The two-sample version of the Cramer-von Mises test is implemented in
`scipy.stats.cramervonmises_2samp`.
The Alexander-Govern test is implemented in the new function
`scipy.stats.alexandergovern`.
The new functions `scipy.stats.barnard_exact` and `scipy.stats. boschloo_exact`
respectively perform Barnard's exact test and Boschloo's exact test
for 2x2 contingency tables.
The new function `scipy.stats.page_trend_test` performs Page's test for ordered
alternatives.
The new function `scipy.stats.somersd` performs Somers' D test for ordinal
association between two variables.
An option, ``permutations``, has been added in `scipy.stats.ttest_ind` to
perform permutation t-tests. A ``trim`` option was also added to perform
a trimmed (Yuen's) t-test.
The ``alternative`` parameter was added to the ``skewtest``, ``kurtosistest``,
``ranksums``, ``mood``, ``ansari``, ``linregress``, and ``spearmanr`` functions
to allow one-sided hypothesis testing.
Sample statistics
The new function `scipy.stats.differential_entropy` estimates the differential
entropy of a continuous distribution from a sample.
The ``boxcox`` and ``boxcox_normmax`` now allow the user to control the
optimizer used to minimize the negative log-likelihood function.
A new function `scipy.stats.contingency.relative_risk` calculates the
relative risk, or risk ratio, of a 2x2 contingency table. The object
returned has a method to compute the confidence interval of the relative risk.
Performance improvements in the ``skew`` and ``kurtosis`` functions achieved
by removal of repeated/redundant calculations.
Substantial performance improvements in `scipy.stats.mstats.hdquantiles_sd`.
The new function `scipy.stats.contingency.association` computes several
measures of association for a contingency table: Pearsons contingency
coefficient, Cramer's V, and Tschuprow's T.
The parameter ``nan_policy`` was added to `scipy.stats.zmap` to provide options
for handling the occurrence of ``nan`` in the input data.
The parameter ``ddof`` was added to `scipy.stats.variation` and
`scipy.stats.mstats.variation`.
The parameter ``weights`` was added to `scipy.stats.gmean`.
Statistical Distributions
We now vendor and leverage the Boost C++ library to address a number of
previously reported issues in ``stats``. Notably, ``beta``, ``binom``,
``nbinom`` now have Boost backends, and it is straightforward to leverage
the backend for additional functions.
The skew Cauchy probability distribution has been implemented as
`scipy.stats.skewcauchy`.
The Zipfian probability distribution has been implemented as
`scipy.stats.zipfian`.
The new distributions ``nchypergeom_fisher`` and ``nchypergeom_wallenius``
implement the Fisher and Wallenius versions of the noncentral hypergeometric
distribution, respectively.
The generalized hyperbolic distribution was added in
`scipy.stats.genhyperbolic`.
The studentized range distribution was added in `scipy.stats.studentized_range`.
`scipy.stats.argus` now has improved handling for small parameter values.
Better argument handling/preparation has resulted in performance improvements
for many distributions.
The ``cosine`` distribution has added ufuncs for ``ppf``, ``cdf``, ``sf``, and
``isf`` methods including numerical precision improvements at the edges of the
support of the distribution.
An option to fit the distribution to data by the method of moments has been
added to the ``fit`` method of the univariate continuous distributions.
Other
`scipy.stats.bootstrap` has been added to allow estimation of the confidence
interval and standard error of a statistic.
The new function `scipy.stats.contingency.crosstab` computes a contingency
table (i.e. a table of counts of unique entries) for the given data.
`scipy.stats.NumericalInverseHermite` enables fast random variate sampling
and percentile point function evaluation of an arbitrary univariate statistical
distribution.
New `scipy.stats.qmc` module
This new module provides Quasi-Monte Carlo (QMC) generators and associated
helper functions.
It provides a generic class `scipy.stats.qmc.QMCEngine` which defines a QMC
engine/sampler. An engine is state aware: it can be continued, advanced and
reset. 3 base samplers are available:
- `scipy.stats.qmc.Sobol` the well known Sobol low discrepancy sequence.
Several warnings have been added to guide the user into properly using this
sampler. The sequence is scrambled by default.
- `scipy.stats.qmc.Halton`: Halton low discrepancy sequence. The sequence is
scrambled by default.
- `scipy.stats.qmc.LatinHypercube`: plain LHS design.
And 2 special samplers are available:
- `scipy.stats.qmc.MultinomialQMC`: sampling from a multinomial distribution
using any of the base `scipy.stats.qmc.QMCEngine`.
- `scipy.stats.qmc.MultivariateNormalQMC`: sampling from a multivariate Normal
using any of the base `scipy.stats.qmc.QMCEngine`.
The module also provide the following helpers:
- `scipy.stats.qmc.discrepancy`: assess the quality of a set of points in terms
of space coverage.
- `scipy.stats.qmc.update_discrepancy`: can be used in an optimization loop to
construct a good set of points.
- `scipy.stats.qmc.scale`: easily scale a set of points from (to) the unit
interval to (from) a given range.
Deprecated features
`scipy.linalg` deprecations
- `scipy.linalg.pinv2` is deprecated and its functionality is completely
subsumed into `scipy.linalg.pinv`
- Both ``rcond``, ``cond`` keywords of `scipy.linalg.pinv` and
`scipy.linalg.pinvh` were not working and now are deprecated. They are now
replaced with functioning ``atol`` and ``rtol`` keywords with clear usage.
`scipy.spatial` deprecations
- `scipy.spatial.distance` metrics expect 1d input vectors but will call
``np.squeeze`` on their inputs to accept any extra length-1 dimensions. That
behaviour is now deprecated.
Backwards incompatible changes
Other changes
We now accept and leverage performance improvements from the ahead-of-time
Python-to-C++ transpiler, Pythran, which can be optionally disabled (via
``export SCIPY_USE_PYTHRAN=0``) but is enabled by default at build time.
There are two changes to the default behavior of `scipy.stats.mannwhitenyu`:
- For years, use of the default ``alternative=None`` was deprecated; explicit
``alternative`` specification was required. Use of the new default value of
``alternative``, "two-sided", is now permitted.
- Previously, all p-values were based on an asymptotic approximation. Now, for
small samples without ties, the p-values returned are exact by default.
Support has been added for PEP 621 (project metadata in ``pyproject.toml``)
We now support a Gitpod environment to reduce the barrier to entry for SciPy
development; for more details see `quickstart-gitpod`.
Authors
* endolith
* Jelle Aalbers +
* Adam +
* Tania Allard +
* Sven Baars +
* Max Balandat +
* baumgarc +
* Christoph Baumgarten
* Peter Bell
* Lilian Besson
* Robinson Besson +
* Max Bolingbroke
* Blair Bonnett +
* Jordão Bragantini
* Harm Buisman +
* Evgeni Burovski
* Matthias Bussonnier
* Dominic C
* CJ Carey
* Ramón Casero +
* Chachay +
* charlotte12l +
* Benjamin Curtice Corbett +
* Falcon Dai +
* Ian Dall +
* Terry Davis
* droussea2001 +
* DWesl +
* dwight200 +
* Thomas J. Fan +
* Joseph Fox-Rabinovitz
* Max Frei +
* Laura Gutierrez Funderburk +
* gbonomib +
* Matthias Geier +
* Pradipta Ghosh +
* Ralf Gommers
* Evan H +
* h-vetinari
* Matt Haberland
* Anselm Hahn +
* Alex Henrie
* Piet Hessenius +
* Trever Hines +
* Elisha Hollander +
* Stephan Hoyer
* Tom Hu +
* Kei Ishikawa +
* Julien Jerphanion
* Robert Kern
* Shashank KS +
* Peter Mahler Larsen
* Eric Larson
* Cheng H. Lee +
* Gregory R. Lee
* Jean-Benoist Leger +
* lgfunderburk +
* liam-o-marsh +
* Xingyu Liu +
* Alex Loftus +
* Christian Lorentzen +
* Cong Ma
* Marc +
* MarkPundurs +
* Markus Löning +
* Liam Marsh +
* Nicholas McKibben
* melissawm +
* Jamie Morton
* Andrew Nelson
* Nikola Forró
* Tor Nordam +
* Olivier Gauthé +
* Rohit Pandey +
* Avanindra Kumar Pandeya +
* Tirth Patel
* paugier +
* Alex H. Wagner, PhD +
* Jeff Plourde +
* Ilhan Polat
* pranavrajpal +
* Vladyslav Rachek
* Bharat Raghunathan
* Recursing +
* Tyler Reddy
* Lucas Roberts
* Gregor Robinson +
* Pamphile Roy +
* Atsushi Sakai
* Benjamin Santos
* Martin K. Scherer +
* Thomas Schmelzer +
* Daniel Scott +
* Sebastian Wallkötter +
* serge-sans-paille +
* Namami Shanker +
* Masashi Shibata +
* Alexandre de Siqueira +
* Albert Steppi +
* Adam J. Stewart +
* Kai Striega
* Diana Sukhoverkhova
* Søren Fuglede Jørgensen
* Mike Taves
* Dan Temkin +
* Nicolas Tessore +
* tsubota20 +
* Robert Uhl
* christos val +
* Bas van Beek +
* Ashutosh Varma +
* Jose Vazquez +
* Sebastiano Vigna
* Aditya Vijaykumar
* VNMabus
* Arthur Volant +
* Samuel Wallan
* Stefan van der Walt
* Warren Weckesser
* Anreas Weh
* Josh Wilson
* Rory Yorke
* Egor Zemlyanoy
* Marc Zoeller +
* zoj613 +
* 秋纫 +
A total of 126 people contributed to this release.
People with a "+" by their names contributed a patch for the first time.
This list of names is automatically generated, and may not be fully complete.
```
### 1.6.3
```
compared to `1.6.2`.
Authors
======
* Peter Bell
* Ralf Gommers
* Matt Haberland
* Peter Mahler Larsen
* Tirth Patel
* Tyler Reddy
* Pamphile ROY +
* Xingyu Liu +
A total of 8 people contributed to this release.
People with a "+" by their names contributed a patch for the first time.
This list of names is automatically generated, and may not be fully complete.
```
### 1.6.2
```
compared to `1.6.1`. This is also the first SciPy release
to place upper bounds on some dependencies to improve
the long-term repeatability of source builds.
Authors
=======
* Pradipta Ghosh +
* Tyler Reddy
* Ralf Gommers
* Martin K. Scherer +
* Robert Uhl
* Warren Weckesser
A total of 6 people contributed to this release.
People with a "+" by their names contributed a patch for the first time.
This list of names is automatically generated, and may not be fully complete.
```
### 1.6.1
```
compared to `1.6.0`.
Please note that for SciPy wheels to correctly install with pip on
macOS 11, pip `>= 20.3.3` is needed.
Authors
=======
* Peter Bell
* Evgeni Burovski
* CJ Carey
* Ralf Gommers
* Peter Mahler Larsen
* Cheng H. Lee +
* Cong Ma
* Nicholas McKibben
* Nikola Forró
* Tyler Reddy
* Warren Weckesser
A total of 11 people contributed to this release.
People with a "+" by their names contributed a patch for the first time.
This list of names is automatically generated, and may not be fully complete.
```
### 1.6.0
```
many new features, numerous bug-fixes, improved test coverage and better
documentation. There have been a number of deprecations and API changes
in this release, which are documented below. All users are encouraged to
upgrade to this release, as there are a large number of bug-fixes and
optimizations. Before upgrading, we recommend that users check that
their own code does not use deprecated SciPy functionality (to do so,
run your code with ``python -Wd`` and check for ``DeprecationWarning`` s).
Our development attention will now shift to bug-fix releases on the
1.6.x branch, and on adding new features on the master branch.
This release requires Python `3.7`+ and NumPy `1.16.5` or greater.
For running on PyPy, PyPy3 `6.0`+ is required.
Highlights of this release
----------------------------
- `scipy.ndimage` improvements: Fixes and ehancements to boundary extension
modes for interpolation functions. Support for complex-valued inputs in many
filtering and interpolation functions. New ``grid_mode`` option for
`scipy.ndimage.zoom` to enable results consistent with scikit-image's
``rescale``.
- `scipy.optimize.linprog` has fast, new methods for large, sparse problems
from the ``HiGHS`` library.
- `scipy.stats` improvements including new distributions, a new test, and
enhancements to existing distributions and tests
New features
============
`scipy.special` improvements
-----------------------------
`scipy.special` now has improved support for 64-bit ``LAPACK`` backend
`scipy.odr` improvements
-------------------------
`scipy.odr` now has support for 64-bit integer ``BLAS``
`scipy.odr.ODR` has gained an optional ``overwrite`` argument so that existing
files may be overwritten.
`scipy.integrate` improvements
-------------------------------
Some renames of functions with poor names were done, with the old names
retained without being in the reference guide for backwards compatibility
reasons:
- ``integrate.simps`` was renamed to ``integrate.simpson``
- ``integrate.trapz`` was renamed to ``integrate.trapezoid``
- ``integrate.cumtrapz`` was renamed to ``integrate.cumulative_trapezoid``
`scipy.cluster` improvements
-------------------------------
`scipy.cluster.hierarchy.DisjointSet` has been added for incremental
connectivity queries.
`scipy.cluster.hierarchy.dendrogram` return value now also includes leaf color
information in `leaves_color_list`.
`scipy.interpolate` improvements
---------------------------------
`scipy.interpolate.interp1d` has a new method ``nearest-up``, similar to the
existing method ``nearest`` but rounds half-integers up instead of down.
`scipy.io` improvements
------------------------
Support has been added for reading arbitrary bit depth integer PCM WAV files
from 1- to 32-bit, including the commonly-requested 24-bit depth.
`scipy.linalg` improvements
----------------------------
The new function `scipy.linalg.matmul_toeplitz` uses the FFT to compute the
product of a Toeplitz matrix with another matrix.
`scipy.linalg.sqrtm` and `scipy.linalg.logm` have performance improvements
thanks to additional Cython code.
Python ``LAPACK`` wrappers have been added for ``pptrf``, ``pptrs``, ``ppsv``,
``pptri``, and ``ppcon``.
`scipy.linalg.norm` and the ``svd`` family of functions will now use 64-bit
integer backends when available.
`scipy.ndimage` improvements
-----------------------------
`scipy.ndimage.convolve`, `scipy.ndimage.correlate` and their 1d counterparts
now accept both complex-valued images and/or complex-valued filter kernels. All
convolution-based filters also now accept complex-valued inputs
(e.g. ``gaussian_filter``, ``uniform_filter``, etc.).
Multiple fixes and enhancements to boundary handling were introduced to
`scipy.ndimage` interpolation functions (i.e. ``affine_transform``,
``geometric_transform``, ``map_coordinates``, ``rotate``, ``shift``, ``zoom``).
A new boundary mode, ``grid-wrap`` was added which wraps images periodically,
using a period equal to the shape of the input image grid. This is in contrast
to the existing ``wrap`` mode which uses a period that is one sample smaller
than the original signal extent along each dimension.
A long-standing bug in the ``reflect`` boundary condition has been fixed and
the mode ``grid-mirror`` was introduced as a synonym for ``reflect``.
A new boundary mode, ``grid-constant`` is now available. This is similar to
the existing ndimage ``constant`` mode, but interpolation will still performed
at coordinate values outside of the original image extent. This
``grid-constant`` mode is consistent with OpenCV's ``BORDER_CONSTANT`` mode
and scikit-image's ``constant`` mode.
Spline pre-filtering (used internally by ``ndimage`` interpolation functions
when ``order >= 2``), now supports all boundary modes rather than always
defaulting to mirror boundary conditions. The standalone functions
``spline_filter`` and ``spline_filter1d`` have analytical boundary conditions
that match modes ``mirror``, ``grid-wrap`` and ``reflect``.
`scipy.ndimage` interpolation functions now accept complex-valued inputs. In
this case, the interpolation is applied independently to the real and
imaginary components.
The ``ndimage`` tutorials
(https://docs.scipy.org/doc/scipy/reference/tutorial/ndimage.html) have been
updated with new figures to better clarify the exact behavior of all of the
interpolation boundary modes.
`scipy.ndimage.zoom` now has a ``grid_mode`` option that changes the coordinate
of the center of the first pixel along an axis from 0 to 0.5. This allows
resizing in a manner that is consistent with the behavior of scikit-image's
``resize`` and ``rescale`` functions (and OpenCV's ``cv2.resize``).
`scipy.optimize` improvements
------------------------------
`scipy.optimize.linprog` has fast, new methods for large, sparse problems from
the ``HiGHS`` C++ library. ``method='highs-ds'`` uses a high performance dual
revised simplex implementation (HSOL), ``method='highs-ipm'`` uses an
interior-point method with crossover, and ``method='highs'`` chooses between
the two automatically. These methods are typically much faster and often exceed
the accuracy of other ``linprog`` methods, so we recommend explicitly
specifying one of these three method values when using ``linprog``.
`scipy.optimize.quadratic_assignment` has been added for approximate solution
of the quadratic assignment problem.
`scipy.optimize.linear_sum_assignment` now has a substantially reduced overhead
for small cost matrix sizes
`scipy.optimize.least_squares` has improved performance when the user provides
the jacobian as a sparse jacobian already in ``csr_matrix`` format
`scipy.optimize.linprog` now has an ``rr_method`` argument for specification
of the method used for redundancy handling, and a new method for this purpose
is available based on the interpolative decomposition approach.
`scipy.signal` improvements
----------------------------
`scipy.signal.gammatone` has been added to design FIR or IIR filters that
model the human auditory system.
`scipy.signal.iircomb` has been added to design IIR peaking/notching comb
filters that can boost/attenuate a frequency from a signal.
`scipy.signal.sosfilt` performance has been improved to avoid some previously-
observed slowdowns
`scipy.signal.windows.taylor` has been added--the Taylor window function is
commonly used in radar digital signal processing
`scipy.signal.gauss_spline` now supports ``list`` type input for consistency
with other related SciPy functions
`scipy.signal.correlation_lags` has been added to allow calculation of the lag/
displacement indices array for 1D cross-correlation.
`scipy.sparse` improvements
----------------------------
A solver for the minimum weight full matching problem for bipartite graphs,
also known as the linear assignment problem, has been added in
`scipy.sparse.csgraph.min_weight_full_bipartite_matching`. In particular, this
provides functionality analogous to that of
`scipy.optimize.linear_sum_assignment`, but with improved performance for sparse
inputs, and the ability to handle inputs whose dense representations would not
fit in memory.
The time complexity of `scipy.sparse.block_diag` has been improved dramatically
from quadratic to linear.
`scipy.sparse.linalg` improvements
-----------------------------------
The vendored version of ``SuperLU`` has been updated
`scipy.fft` improvements
-------------------------
The vendored ``pocketfft`` library now supports compiling with ARM neon vector
extensions and has improved thread pool behavior.
`scipy.spatial` improvements
-----------------------------
The python implementation of ``KDTree`` has been dropped and ``KDTree`` is now
implemented in terms of ``cKDTree``. You can now expect ``cKDTree``-like
performance by default. This also means ``sys.setrecursionlimit`` no longer
needs to be increased for querying large trees.
``transform.Rotation`` has been updated with support for Modified Rodrigues
Parameters alongside the existing rotation representations (PR gh-12667).
`scipy.spatial.transform.Rotation` has been partially cythonized, with some
performance improvements observed
`scipy.spatial.distance.cdist` has improved performance with the ``minkowski``
metric, especially for p-norm values of 1 or 2.
`scipy.stats` improvements
---------------------------
New distributions have been added to `scipy.stats`:
- The asymmetric Laplace continuous distribution has been added as
`scipy.stats.laplace_asymmetric`.
- The negative hypergeometric distribution has been added as `scipy.stats.nhypergeom`.
- The multivariate t distribution has been added as `scipy.stats.multivariate_t`.
- The multivariate hypergeometric distribution has been added as `scipy.stats.multivariate_hypergeom`.
The ``fit`` method has been overridden for several distributions (``laplace``,
``pareto``, ``rayleigh``, ``invgauss``, ``logistic``, ``gumbel_l``,
``gumbel_r``); they now use analytical, distribution-specific maximum
likelihood estimation results for greater speed and accuracy than the generic
(numerical optimization) implementation.
The one-sample Cramér-von Mises test has been added as
`scipy.stats.cramervonmises`.
An option to compute one-sided p-values was added to `scipy.stats.ttest_1samp`,
`scipy.stats.ttest_ind_from_stats`, `scipy.stats.ttest_ind` and
`scipy.stats.ttest_rel`.
The function `scipy.stats.kendalltau` now has an option to compute Kendall's
tau-c (also known as Stuart's tau-c), and support has been added for exact
p-value calculations for sample sizes ``> 171``.
`stats.trapz` was renamed to `stats.trapezoid`, with the former name retained
as an alias for backwards compatibility reasons.
The function `scipy.stats.linregress` now includes the standard error of the
intercept in its return value.
The ``_logpdf``, ``_sf``, and ``_isf`` methods have been added to
`scipy.stats.nakagami`; ``_sf`` and ``_isf`` methods also added to
`scipy.stats.gumbel_r`
The ``sf`` method has been added to `scipy.stats.levy` and `scipy.stats.levy_l`
for improved precision.
`scipy.stats.binned_statistic_dd` performance improvements for the following
computed statistics: ``max``, ``min``, ``median``, and ``std``.
We gratefully acknowledge the Chan-Zuckerberg Initiative Essential Open Source
Software for Science program for supporting many of these improvements to
`scipy.stats`.
Deprecated features
===================
`scipy.spatial` changes
------------------------
Calling ``KDTree.query`` with ``k=None`` to find all neighbours is deprecated.
Use ``KDTree.query_ball_point`` instead.
``distance.wminkowski`` was deprecated; use ``distance.minkowski`` and supply
weights with the ``w`` keyword instead.
Backwards incompatible changes
==============================
`scipy` changes
----------------
Using `scipy.fft` as a function aliasing ``numpy.fft.fft`` was removed after
being deprecated in SciPy ``1.4.0``. As a result, the `scipy.fft` submodule
must be explicitly imported now, in line with other SciPy subpackages.
`scipy.signal` changes
-----------------------
The output of ``decimate``, ``lfilter_zi``, ``lfiltic``, ``sos2tf``, and
``sosfilt_zi`` have been changed to match ``numpy.result_type`` of their inputs.
The window function ``slepian`` was removed. It had been deprecated since SciPy
``1.1``.
`scipy.spatial` changes
------------------------
``cKDTree.query`` now returns 64-bit rather than 32-bit integers on Windows,
making behaviour consistent between platforms (PR gh-12673).
`scipy.stats` changes
----------------------
The ``frechet_l`` and ``frechet_r`` distributions were removed. They were
deprecated since SciPy ``1.0``.
Other changes
=============
``setup_requires`` was removed from ``setup.py``. This means that users
invoking ``python setup.py install`` without having numpy already installed
will now get an error, rather than having numpy installed for them via
``easy_install``. This install method was always fragile and problematic, users
are encouraged to use ``pip`` when installing from source.
- Fixed a bug in `scipy.optimize.dual_annealing` ``accept_reject`` calculation
that caused uphill jumps to be accepted less frequently.
- The time required for (un)pickling of `scipy.stats.rv_continuous`,
`scipy.stats.rv_discrete`, and `scipy.stats.rv_frozen` has been significantly
reduced (gh12550). Inheriting subclasses should note that ``__setstate__`` no
longer calls ``__init__`` upon unpickling.
Authors
=======
* endolith
* vkk800
* aditya +
* George Bateman +
* Christoph Baumgarten
* Peter Bell
* Tobias Biester +
* Keaton J. Burns +
* Evgeni Burovski
* Rüdiger Busche +
* Matthias Bussonnier
* Dominic C +
* Corallus Caninus +
* CJ Carey
* Thomas A Caswell
* chapochn +
* Lucía Cheung
* Zach Colbert +
* Coloquinte +
* Yannick Copin +
* Devin Crowley +
* Terry Davis +
* Michaël Defferrard +
* devonwp +
* Didier +
* divenex +
* Thomas Duvernay +
* Eoghan O'Connell +
* Gökçen Eraslan
* Kristian Eschenburg +
* Ralf Gommers
* Thomas Grainger +
* GreatV +
* Gregory Gundersen +
* h-vetinari +
* Matt Haberland
* Mark Harfouche +
* He He +
* Alex Henrie
* Chun-Ming Huang +
* Martin James McHugh III +
* Alex Izvorski +
* Joey +
* ST John +
* Jonas Jonker +
* Julius Bier Kirkegaard
* Marcin Konowalczyk +
* Konrad0
* Sam Van Kooten +
* Sergey Koposov +
* Peter Mahler Larsen
* Eric Larson
* Antony Lee
* Gregory R. Lee
* Loïc Estève
* Jean-Luc Margot +
* MarkusKoebis +
* Nikolay Mayorov
* G. D. McBain
* Andrew McCluskey +
* Nicholas McKibben
* Sturla Molden
* Denali Molitor +
* Eric Moore
* Shashaank N +
* Prashanth Nadukandi +
* nbelakovski +
* Andrew Nelson
* Nick +
* Nikola Forró +
* odidev
* ofirr +
* Sambit Panda
* Dima Pasechnik
* Tirth Patel +
* Paweł Redzyński +
* Vladimir Philipenko +
* Philipp Thölke +
* Ilhan Polat
* Eugene Prilepin +
* Vladyslav Rachek
* Ram Rachum +
* Tyler Reddy
* Martin Reinecke +
* Simon Segerblom Rex +
* Lucas Roberts
* Benjamin Rowell +
* Eli Rykoff +
* Atsushi Sakai
* Moritz Schulte +
* Daniel B. Smith
* Steve Smith +
* Jan Soedingrekso +
* Victor Stinner +
* Jose Storopoli +
* Diana Sukhoverkhova +
* Søren Fuglede Jørgensen
* taoky +
* Mike Taves +
* Ian Thomas +
* Will Tirone +
* Frank Torres +
* Seth Troisi
* Ronald van Elburg +
* Hugo van Kemenade
* Paul van Mulbregt
* Saul Ivan Rivas Vega +
* Pauli Virtanen
* Jan Vleeshouwers
* Samuel Wallan
* Warren Weckesser
* Ben West +
* Eric Wieser
* WillTirone +
* Levi John Wolf +
* Zhiqing Xiao
* Rory Yorke +
* Yun Wang (Maigo) +
* Egor Zemlyanoy +
* ZhihuiChen0903 +
* Jacob Zhong +
A total of 121 people contributed to this release.
People with a "+" by their names contributed a patch for the first time.
This list of names is automatically generated, and may not be fully complete.
```
### 1.5.4
```
compared to `1.5.3`. Importantly, wheels are now available
for Python `3.9` and a more complete fix has been applied for
issues building with XCode `12`.
Authors
=====
* Peter Bell
* CJ Carey
* Andrew McCluskey +
* Andrew Nelson
* Tyler Reddy
* Eli Rykoff +
* Ian Thomas +
A total of 7 people contributed to this release.
People with a "+" by their names contributed a patch for the first time.
This list of names is automatically generated, and may not be fully complete.
```
### 1.5.3
```
compared to `1.5.2`. In particular, Linux ARM64 wheels are now
available and a compatibility issue with XCode 12 has
been fixed.
Authors
=======
* Peter Bell
* CJ Carey
* Thomas Duvernay +
* Gregory Lee
* Eric Moore
* odidev
* Dima Pasechnik
* Tyler Reddy
* Simon Segerblom Rex +
* Daniel B. Smith
* Will Tirone +
* Warren Weckesser
A total of 12 people contributed to this release.
People with a "+" by their names contributed a patch for the first time.
This list of names is automatically generated, and may not be fully complete.
```
### 1.5.2
```
compared to `1.5.1`.
Authors
=====
* Peter Bell
* Tobias Biester +
* Evgeni Burovski
* Thomas A Caswell
* Ralf Gommers
* Sturla Molden
* Andrew Nelson
* ofirr +
* Sambit Panda
* Ilhan Polat
* Tyler Reddy
* Atsushi Sakai
* Pauli Virtanen
A total of 13 people contributed to this release.
People with a "+" by their names contributed a patch for the first time.
This list of names is automatically generated, and may not be fully complete.
```
Links
- PyPI: https://pypi.org/project/scipy
- Changelog: https://pyup.io/changelogs/scipy/
- Repo: https://github.com/scipy/scipy/releases
- Homepage: https://www.scipy.org
Changelog
### 4.3
```
================
New Features
------------
astropy.convolution
^^^^^^^^^^^^^^^^^^^
- Change padding sizes for ``fft_pad`` in ``convolve_fft`` from powers of
2 only to scipy-optimized numbers, applied separately to each dimension;
yielding some performance gains and avoiding potential large memory
impact for certain multi-dimensional inputs. [11533]
astropy.coordinates
^^^^^^^^^^^^^^^^^^^
- Adds the ability to create topocentric ``CIRS`` frames. Using these,
``AltAz`` calculations are now accurate down to the milli-arcsecond
level. [10994]
- Adds a direct transformation from ``ICRS`` to ``AltAz`` frames. This
provides a modest speedup of approximately 10 percent. [11079]
- Adds new ``WGS84GeodeticRepresentation``, ``WGS72GeodeticRepresentation``,
and ``GRS80GeodeticRepresentation``. These are mostly for use inside
``EarthLocation`` but can also be used to convert between geocentric
(cartesian) and different geodetic representations directly. [11086]
- ``SkyCoord.guess_from_table`` now also searches for differentials in the table.
In addition, multiple regex matches can be resolved when they are exact
component names, e.g. having both columns “dec” and “pm_dec” no longer errors
and will be included in the SkyCoord. [11417]
- All representations now have a ``transform`` method, which allows them to be
transformed by a 3x3 matrix in a Cartesian basis. By default, transformations
are routed through ``CartesianRepresentation``. ``SphericalRepresentation`` and
``PhysicssphericalRepresentation`` override this for speed and to prevent NaN
leakage from the distance to the angular components.
Also, the functions ``is_O3`` and ``is_rotation`` have been added to
``matrix_utities`` for checking whether a matrix is in the O(3) group or is a
rotation (proper or improper), respectively. [11444]
- Moved angle formatting and parsing utilities to
``astropy.coordinates.angle_formats``.
Added new functionality to ``astropy.coordinates.angle_utilities`` for
generating points on or in spherical surfaces, either randomly or on a grid. [11628]
- Added a new method to ``SkyCoord``, ``spherical_offsets_by()``, which is the
conceptual inverse of ``spherical_offsets_to()``: Given angular offsets in
longitude and latitude, this method returns a new coordinate with the offsets
applied. [11635]
- Refactor conversions between ``GCRS`` and ``CIRS,TETE`` for better accuracy
and substantially improved speed. [11069]
- Also refactor ``EarthLocation.get_gcrs`` for an increase in performance of
an order of magnitude, which enters as well in getting observed positions of
planets using ``get_body``. [11073]
- Refactored the usage of metaclasses in ``astropy.coordinates`` to instead use
``__init_subclass__`` where possible. [11090]
- Removed duplicate calls to transform_to from match_to_catalog_sky
and match_to_catalog_3d, improving their performance. [11449]
- The new DE440 and DE440s ephemerides are now available via shortcuts 'de440'
and 'de440s'. The DE 440s ephemeris will probably become the default
ephemeris when chosing 'jpl' in 5.0. [11601]
astropy.cosmology
^^^^^^^^^^^^^^^^^
- Cosmology parameter dictionaries now also specify the Cosmology class to which
the parameters correspond. For example, the dictionary for
``astropy.cosmology.parameters.Planck18`` has the added key-value pair
("cosmology", "FlatLambdaCDM"). [11530]
astropy.io.ascii
^^^^^^^^^^^^^^^^
- Added support for reading and writing ASCII tables in QDP (Quick and Dandy
Plotter) format. [11256]
- Added support for reading and writing multidimensional column data (masked and
unmasked) to ECSV. Also added formal support for reading and writing object-type
column data which can contain items consisting of lists, dicts, and basic scalar
types. This can be used to store columns of variable-length arrays. Both of
these features use JSON to convert the object to a string that is stored in the
ECSV output. [11569, 11662, 11720]
astropy.io.fits
^^^^^^^^^^^^^^^
- Added ``append`` keyword to append table objects to an existing FITS file [2632, 11149]
- Check that the SIMPLE card is present when opening a file, to ensure that the
file is a valid FITS file and raise a better error when opening a non FITS
one. ``ignore_missing_simple`` can be used to skip this verification. [10895]
- Expose ``Header.strip`` as a public method, to remove the most common
structural keywords. [11174]
- Enable the use of ``os.PathLike`` objects when dealing with (mainly FITS) files. [11580]
astropy.io.registry
^^^^^^^^^^^^^^^^^^^
- Readers and writers can now set a priority, to assist with resolving which
format to use. [11214]
astropy.io.votable
^^^^^^^^^^^^^^^^^^
- Version 1.4 VOTables now use the VOUnit format specification. [11032]
- When reading VOTables using the Unified File Read/Write Interface (i.e. using
the ``Table.read()`` or ``QTable.read()`` functions) it is now possible to
specify all keyword arguments that are valid for
``astropy.io.votable.table.parse()``. [11643]
astropy.modeling
^^^^^^^^^^^^^^^^
- Added a state attribute to models to allow preventing the synching of
constraint values from the constituent models. This synching can
greatly slow down fitting if there are large numbers of fit parameters.
model.sync_constraints = True means check constituent model constraints
for compound models every time the constraint is accessed, False, do not.
Fitters that support constraints will set this to False on the model copy
and then set back to True when the fit is complete before returning. [11365]
- The ``convolve_models_fft`` function implements model convolution so that one
insures that the convolution remains consistent across multiple different
inputs. [11456]
astropy.nddata
^^^^^^^^^^^^^^
- Prevent unnecessary copies of the data during ``NDData`` arithmetic when units
need to be added. [11107]
- NDData str representations now show units, if present. [11553]
astropy.stats
^^^^^^^^^^^^^
- Added the ability to specify stdfunc='mad_std' when doing sigma clipping,
which will use a built-in function and lead to significant performance
improvements if cenfunc is 'mean' or 'median'. [11664]
- Significantly improved the performance of sigma clipping when cenfunc and
stdfunc are passed as strings and the ``grow`` option is not used. [11219]
- Improved performance of ``bayesian_blocks()`` by removing one ``np.log()``
call [11356]
astropy.table
^^^^^^^^^^^^^
- Add table attributes to include or exclude columns from the output when
printing a table. This functionality includes a context manager to
include/exclude columns temporarily. [11190]
- Improved the string representation of objects related to ``Table.indices`` so
they now indicate the object type and relevant attributes. [11333]
astropy.timeseries
^^^^^^^^^^^^^^^^^^
- An exception is raised when ``n_bins`` is passed as an argument while
any of the parameters ``time_bin_start`` or ``time_bin_size`` is not
scalar. [11463]
astropy.units
^^^^^^^^^^^^^
- The ``physical_type`` attributes of each unit are now objects of the (new)
``astropy.units.physical.PhysicalType`` class instead of strings and the
function ``astropy.units.physical.get_physical_type`` can now translate
strings to these objects. [11204]
- The function ``astropy.units.physical.def_physical_type`` was created to
either define entirely new physical types, or to add more physical type
names to an existing physical types. [11204]
- ``PhysicalType``'s can be operated on using operations multiplication,
division, and exponentiation are to facilitate dimensional analysis. [11204]
- It is now possible to define aliases for units using
``astropy.units.set_enabled_aliases``. This can be used when reading files
that have misspelled units. [11258]
- Add a new "DN" unit, ``units.dn`` or ``units.DN``, representing data number
for a detector. [11591]
astropy.utils
^^^^^^^^^^^^^
- Added ``ssl_context`` and ``allow_insecure`` options to ``download_file``,
as well as the ability to optionally use the ``certifi`` package to provide
root CA certificates when downloading from sites secured with
TLS/SSL. [10434]
- ``astropy.utils.data.get_pkg_data_path`` is publicly scoped (previously the
private function ``_find_pkg_data_path``) for obtaining file paths without
checking if the file/directory exists, as long as the package and module
do. [11006]
- Deprecated ``astropy.utils.OrderedDescriptor`` and
``astropy.utils.OrderedDescriptorContainer``, as new features in Python 3
make their use less compelling. [11094, 11099]
- ``astropy.utils.masked`` provides a new ``Masked`` class/factory that can be
used to represent masked ``ndarray`` and all its subclasses, including
``Quantity`` and its subclasses. These classes can be used inside
coordinates, but the mask is not yet exposed. Generally, the interface should
be considered experimental. [11127, 11792]
- Add new ``utils.parsing`` module to with helper wrappers around
``ply``. [11227]
- Change the Time and IERS leap second handling so that the leap second table is
updated only when a Time transform involving UTC is performed. Previously this
update check was done the first time a ``Time`` object was created, which in
practice occured when importing common astropy subpackages like
``astropy.coordinates``. Now you can prevent querying internet resources (for
instance on a cluster) by setting ``iers.conf.auto_download = False``. This
can be done after importing astropy but prior to performing any ``Time``
scale transformations related to UTC. [11638]
- Added a new module at ``astropy.utils.compat.optional_deps`` to consolidate
the definition of ``HAS_x`` optional dependency flag variables,
like ``HAS_SCIPY``. [11490]
astropy.wcs
^^^^^^^^^^^
- Add IVOA UCD mappings for some FITS WCS keywords commonly used in solar
physics. [10965]
- Add ``STOKES`` FITS WCS keyword to the IVOA UCD mapping. [11236]
- Updated bundled version of WCSLIB to version 7.6. See
https://www.atnf.csiro.au/people/mcalabre/WCS/CHANGES for a list of
included changes. [11549]
API Changes
-----------
astropy.coordinates
^^^^^^^^^^^^^^^^^^^
- For input to representations, subclasses of the class required for a
given attribute will now be allowed in. [11113]
- Except for ``UnitSphericalRepresentation``, shortcuts in representations now
allow for attached differentials. [11467]
- Allow coordinate name strings as input to
``SkyCoord.is_transformable_to``. [11552]
astropy.cosmology
^^^^^^^^^^^^^^^^^
- Change ``z_at_value`` to use ``scipy.optimize.minimize_scalar`` with default
method ``Brent`` (other options ``Bounded`` and ``Golden``) and accept
``bracket`` option to set initial search region. [11080]
- Clarified definition of inputs to ``angular_diameter_distance_z1z2``.
The function now emits ``AstropyUserWarning`` when ``z2`` is less than
``z1``. [11197]
- Split cosmology realizations from core classes, moving the former to new file
``realizations``. [11345]
- Since cosmologies are immutable, the initialization signature and values can
be stored, greatly simplifying cloning logic and extending it to user-defined
cosmology classes that do not have attributes with the same name as each
initialization argument. [11515]
- Cloning a cosmology with changed parameter(s) now appends "(modified)" to the
new instance's name, unless a name is explicitly passed to ``clone``. [11536]
- Allow ``m_nu`` to be input as any quantity-like or array-like -- Quantity,
array, float, str, etc. Input is passed to the Quantity constructor and
converted to eV, still with the prior mass-energy equivalence
enabled. [11640]
astropy.io.fits
^^^^^^^^^^^^^^^
- For conversion between FITS tables and astropy ``Table``, the standard mask
values of ``NaN`` for float and null string for string are now properly
recognized, leading to a ``MaskedColumn`` with appropriately set mask
instead of a ``Column`` with those values exposed. Conversely, when writing
an astropy ``Table`` to a FITS tables, masked values are now consistently
converted to the standard FITS mask values of ``NaN`` for float and null
string for string (i.e., not just for tables with ``masked=True``, which no
longer is guaranteed to signal the presence of ``MaskedColumn``). [11222]
astropy.io.votable
^^^^^^^^^^^^^^^^^^
- The use of ``version='1.0'`` is now fully deprecated in constructing
a ``astropy.io.votable.tree.VOTableFile``. [11659]
astropy.modeling
^^^^^^^^^^^^^^^^
- Removed deprecated ``astropy.modeling.blackbody`` module. [10972]
astropy.table
^^^^^^^^^^^^^
- Added ``Column.value`` as an alias for the existing ``Column.data`` attribute.
This makes accessing a column's underlying data array consistent with the
``.value`` attribute available for ``Time`` and ``Quantity`` objects. [10962]
- In reading from a FITS tables, the standard mask values of ``NaN`` for float
and null string for string are properly recognized, leading to a
``MaskedColumn`` with appropriately set mask. [11222]
- Changed the implementation of the ``table.index.Index`` class so instantiating
from this class now returns an ``Index`` object as expected instead of a
``SlicedIndex`` object. [11333]
astropy.units
^^^^^^^^^^^^^
- The ``physical_type`` attribute of units now returns an instance of
``astropy.units.physical.PhysicalType`` instead of a string. Because
``PhysicalType`` instances can be compared to strings, no code changes
should be necessary when making comparisons. The string representations
of different physical types will differ from previous releases. [11204]
- Calling ``Unit()`` with no argument now returns a dimensionless unit,
as was documented but not implemented. [11295]
astropy.utils
^^^^^^^^^^^^^
- Removed deprecated ``utils.misc.InheritDocstrings`` and ``utils.timer``. [10281]
- Removed usage of deprecated ``ipython`` stream in ``utils.console``. [10942]
astropy.wcs
^^^^^^^^^^^
- Deprecate ``accuracy`` argument in ``all_world2pix`` which was mistakenly
*documented*, in the case ``accuracy`` was ever used. [11055]
Bug Fixes
---------
astropy.convolution
^^^^^^^^^^^^^^^^^^^
- Fixes for ``convolve_fft`` documentation examples. [11510]
astropy.coordinates
^^^^^^^^^^^^^^^^^^^
- Allow ``Distance`` instances with negative distance values as input for
``SphericalRepresentation``. This was always noted as allowed in an
exception message when a negative ``Quantity`` with length units was
passed in, but was not actually possible to do. [11113]
- Makes the ``Angle.to_string`` method to follow the format described in the
docstring with up to 8 significant decimals instead of 4. [11153]
- Ensure that proper motions can be calculated when converting a ``SkyCoord``
with cartesian representation to unit-spherical, by fixing the conversion of
``CartesianDifferential`` to ``UnitSphericalDifferential``. [11469]
- When re-representing coordinates from spherical to unit-spherical and vice
versa, the type of differential will now be preserved. For instance, if only a
radial velocity was present, that will remain the case (previously, a zero
proper motion component was added). [11482]
- Ensure that wrapping of ``Angle`` does not raise a warning even if ``nan`` are
present. Also try to make sure that the result is within the wrapped range
even in the presence of rounding errors. [11568]
- Comparing a non-SkyCoord object to a ``SkyCoord`` using ``==`` no longer
raises an error. [11666]
- Different ``SkyOffsetFrame`` classes no longer interfere with each other,
causing difficult to debug problems with the ``origin`` attribute. The
``origin`` attribute now no longer is propagated, so while it remains
available on a ``SkyCoord`` that is an offset, it no longer is available once
that coordinate is transformed to another frame. [11730] [11730]
astropy.cosmology
^^^^^^^^^^^^^^^^^
- Cosmology instance names are now immutable. [11535]
astropy.io.ascii
^^^^^^^^^^^^^^^^
- Fixed bug where writing a table that has comments defined (via
``tbl.meta['comments']``) with the 'csv' format was failing. Since the
formally defined CSV format does not support comments, the comments are now
just ignored unless ``comment=<comment prefix>`` is supplied to the
``write()`` call. [11475]
- Fixed the issue where the CDS reader failed to treat columns
as nullable if the ReadMe file contains a limits specifier. [11531]
- Made sure that the CDS reader does not ignore an order specifier that
may be present after the null specifier '?'. Also made sure that it
checks null values only when an '=' symbol is present and reads
description text even if there is no whitespace after '?'. [11593]
astropy.io.fits
^^^^^^^^^^^^^^^
- Fix ``ColDefs.add_col/del_col`` to allow in-place addition or removal of
a column. [11338]
- Fix indexing of ``fits.Header`` with Numpy integers. [11387]
- Do not delete ``EXTNAME`` for compressed image header if a default and
non-default ``EXTNAME`` are present. [11396]
- Prevent warnings about ``HIERARCH`` with ``CompImageHeader`` class. [11404]
- Fixed regression introduced in Astropy 4.0.5 and 4.2.1 with verification of
FITS headers with HISTORY or COMMENT cards with long (> 72 characters)
values. [11487]
- Fix reading variable-length arrays when there is a gap between the data and the
heap. [11688]
astropy.io.votable
^^^^^^^^^^^^^^^^^^
- ``NumericArray`` converter now properly broadcasts scalar mask to array. [11157]
- VOTables are now written with the correct namespace and schema location
attributes. [11659]
astropy.modeling
^^^^^^^^^^^^^^^^
- Fixes the improper propagation of ``bounding_box`` from
``astropy.modeling.models`` to their inverses. For cases in which the inverses
``bounding_box`` can be determined, the proper calculation has been
implemented. [11414]
- Bugfix to allow rotation models to accept arbitrarily-shaped inputs. [11435]
- Bugfixes for ``astropy.modeling`` to allow ``fix_inputs`` to accept empty
dictionaries and dictionaries with ``numpy`` integer keys. [11443]
- Bugfix for how ``SPECIAL_OPERATORS`` are handled. [11512]
- Fixes ``Model`` crashes when some inputs are scalars and during some types of
output reshaping. [11548]
- Fixed bug in ``LevMarLSQFitter`` when using weights and vector inputs. [11603]
astropy.stats
^^^^^^^^^^^^^
- Fixed a bug with the ``copy=False`` option when carrying out sigma
clipping - previously if ``masked=False`` this still copied the data,
but this will now change the array in-place. [11219]
astropy.table
^^^^^^^^^^^^^
- Ensure that adding a ``Quantity`` or other mixin column to a ``Table``
does not have side effects, such as creating an associated ``info``
instance (which would lead to slow-down of, e.g., slicing afterwards). [11077]
- When writing to a FITS tables, masked values are again always converted to
the standard FITS mask values of ``NaN`` for float and null string
for string, not just for table with ``masked=True``. [11222]
- Using ``Table.to_pandas()`` on an indexed ``Table`` with masked integer values
now correctly construct the ``pandas.DataFrame``. [11432]
- Fixed ``Table`` HTML representation in Jupyter notebooks so that it is
horizontally scrollable within Visual Studio Code. This was done by wrapping
the ``<table>`` in a ``<div>`` element. [11476]
- Fix a bug where a string-valued ``Column`` that happened to have a ``unit``
attribute could not be added to a ``QTable``. Such columns are now simply
kept as ``Column`` instances (with a warning). [11585]
- Fix an issue in ``Table.to_pandas(index=<colname>)`` where the index column name
was not being set properly for the ``DataFrame`` index. This was introduced by
an API change in pandas version 1.3.0. Previously when creating a ``DataFrame``
with the index set to an astropy ``Column``, the ``DataFrame`` index name was
automatically set to the column name. [11921]
astropy.time
^^^^^^^^^^^^
- Fix a thread-safety issue with initialization of the leap-second table
(which is only an issue when ERFA's built-in table is out of date). [11234]
- Fixed converting a zero-length time object from UTC to
UT1 when an empty array is passed. [11516]
astropy.uncertainty
^^^^^^^^^^^^^^^^^^^
- ``Distribution`` instances can now be used as input to ``Quantity`` to
initialize ``QuantityDistribution``. Hence, ``distribution * unit``
and ``distribution << unit`` will work too. [11210]
astropy.units
^^^^^^^^^^^^^
- Move non-astronomy units from astrophys.py to a new misc.py file. [11142]
- The physical type of ``astropy.units.mol / astropy.units.m ** 3`` is now
defined as molar concentration. It was previously incorrectly defined
as molar volume. [11204]
- Make ufunc helper lookup thread-safe. [11226]
- Make ``Unit`` string parsing (as well as ``Angle`` parsing) thread-safe. [11227]
- Decorator ``astropy.units.decorators.quantity_input`` now only evaluates
return type annotations based on ``UnitBase`` or ``FunctionUnitBase`` types.
Other annotations are skipped over and are not attempted to convert to the
correct type. [11506]
astropy.utils
^^^^^^^^^^^^^
- Make ``lazyproperty`` and ``classdecorator`` thread-safe. This should fix a
number of thread safety issues. [11224]
astropy.visualization
^^^^^^^^^^^^^^^^^^^^^
- Fixed a bug that resulted in some parts of grid lines being visible when they
should have been hidden. [11380]
- Fixed a bug that resulted in ``time_support()`` failing for intervals of
a few months if one of the ticks was the month December. [11615]
astropy.wcs
^^^^^^^^^^^
- ``fit_wcs_from_points`` now produces a WCS with integer ``NAXIXn``
values. [10865]
- Updated bundled version of ``WCSLIB`` to v7.4, fixing a bug that caused
the coefficients of the TPD distortion function to not be written to the
header. [11260]
- Fixed a bug in assigning type when converting ``colsel`` to
``numpy.ndarray``. [11431]
- Added ``WCSCOMPARE_*`` constants to the list of WCSLIB constants
available/exposed through the ``astropy.wcs`` module. [11647]
- Fix a bug that caused APE 14 WCS transformations for FITS WCS with ZOPT, BETA,
VELO, VOPT, or VRAD CTYPE to not work correctly. [11781]
Other Changes and Additions
---------------------------
- The configuration file is no longer created by default when importing astropy
and its existence is no longer required. Affiliated packages should update their
``__init__.py`` module to remove the block using ``update_default_config`` and
``ConfigurationDefaultMissingWarning``. [10877]
- Replace ``pkg_resources`` (from setuptools) with ``importlib.metadata`` which
comes from the stdlib, except for Python 3.7 where the backport package is added
as a new dependency. [11091]
- Turn on numpydoc's ``numpydoc_xref_param_type`` to create cross-references
for the parameter types in the Parameters, Other Parameters, Returns and Yields
sections of the docstrings. [11118]
- Docstrings across the package are standardized to enable references.
Also added is an Astropy glossary-of-terms to define standard inputs,
e.g. ``quantity-like`` indicates an input that can be interpreted by
``astropy.units.Quantity``. [11118]
- Binary wheels are now built to the manylinux2010 specification. These wheels
should be supported on all versions of pip shipped with Python 3.7+. [11377]
- The name of the default branch for the astropy git repository has been renamed
to ``main``, and the documentation and tooling has been updated accordingly.
If you have made a local clone you may wish to update it following the
instructions in the repository's README. [11379]
- Sphinx cross-reference link targets are added for every ``PhysicalType``.
Now in the parameter types in the Parameters, Other Parameters, Returns and
Yields sections of the docstring, the physical type of a quantity can be
annotated in square brackets.
E.g. `` distance : `~astropy.units.Quantity` ['length'] `` [11595]
- The minimum supported version of ``ipython`` is now 4.2. [10942]
- The minimum supported version of ``pyerfa`` is now 1.7.3. [11637]
```
### 4.2.1
```
==================
Bug Fixes
---------
astropy.cosmology
^^^^^^^^^^^^^^^^^
- Fixed an issue where specializations of the comoving distance calculation
for certain cosmologies could not handle redshift arrays. [10980]
astropy.io.fits
^^^^^^^^^^^^^^^
- Fix bug where manual fixes to invalid header cards were not preserved when
saving a FITS file. [11108]
astropy.io.votable
^^^^^^^^^^^^^^^^^^
- ``NumericArray`` converter now properly broadcasts scalar mask to array.
[11157]
astropy.table
^^^^^^^^^^^^^
- Fix bug when initializing a ``Table`` subclass that uses ``TableAttribute``'s.
If the data were an instance of the table then attributes provided in the
table initialization call could be ignored. [11217]
astropy.time
^^^^^^^^^^^^
- Change epoch of ``TimeUnixTAI`` (``"unix_tai"``) from ``1970-01-01T00:00:00 UTC``
to ``1970-01-01T00:00:00 TAI`` to match the intended and documented behaviour.
This essentially changes the resulting times by 8.000082 seconds, the initial
offset between TAI and UTC. [11249]
astropy.units
^^^^^^^^^^^^^
- Fixed a bug with the ``quantity_input`` decorator where allowing
dimensionless inputs for an argument inadvertently disabled any checking of
compatible units for that argument. [11283]
astropy.utils
^^^^^^^^^^^^^
- Fix a bug so that ``np.shape``, ``np.ndim`` and ``np.size`` again work on
classes that use ``ShapedLikeNDArray``, like representations, frames,
sky coordinates, and times. [11133]
astropy.wcs
^^^^^^^^^^^
- Fix error when a user defined ``proj_point`` parameter is passed to ``fit_wcs_from_points``. [11139]
Other Changes and Additions
---------------------------
- Change epoch of ``TimeUnixTAI`` (``"unix_tai"``) from ``1970-01-01T00:00:00 UTC``
to ``1970-01-01T00:00:00 TAI`` to match the intended and documented behaviour.
This essentially changes the resulting times by 8.000082 seconds, the initial
offset between TAI and UTC. [11249]
```
### 4.2
```
================
New Features
------------
astropy.convolution
^^^^^^^^^^^^^^^^^^^
- Methods ``convolve`` and ``convolve_fft`` both now return Quantity arrays
if user input is given in one. [10822]
astropy.coordinates
^^^^^^^^^^^^^^^^^^^
- Numpy functions that broadcast, change shape, or index (like
``np.broadcast_to``, ``np.rot90``, or ``np.roll``) now work on
coordinates, frames, and representations. [10337]
- Add a new science state ``astropy.coordinates.erfa_astrom.erfa_astrom`` and
two classes ``ErfaAstrom``, ``ErfaAstromInterpolator`` as wrappers to
the ``pyerfa`` astrometric functions used in the coordinate transforms.
Using ``ErfaAstromInterpolator``, which interpolates astrometric properties for
``SkyCoord`` instances with arrays of obstime, can dramatically speed up
coordinate transformations while keeping microarcsecond resolution.
Depending on needed precision and the obstime array in question, speed ups
reach factors of 10x to >100x. [10647]
- ``galactocentric_frame_defaults`` can now also be used as a registry, with
user-defined parameter values and metadata. [10624]
- Method ``.realize_frame`` from coordinate frames now accepts ``**kwargs``,
including ``representation_type``. [10727]
- Avoid an unnecessary call to ``erfa.epv00`` in transformations between
``CIRS`` and ``ICRS``, improving performance by 50 %. [10814]
- A new equatorial coordinate frame, with RA and Dec measured w.r.t to the True
Equator and Equinox (TETE). This frame is commonly known as "apparent place"
and is the correct frame for coordinates returned from JPL Horizons. [10867]
- Added a context manager ``impose_finite_difference_dt`` to the
``TransformGraph`` class to override the finite-difference time step
attribute (``finite_difference_dt``) for all transformations in the graph
with that attribute. [10341]
- Improve performance of ``SpectralCoord`` by refactoring internal
implementation. [10398]
astropy.cosmology
^^^^^^^^^^^^^^^^^
- The final version of the Planck 2018 cosmological parameters are included
as the ``Planck18`` object, which is now the default cosmology. The
parameters are identical to those of the ``Planck18_arXiv_v2`` object,
which is now deprecated and will be removed in a future release. [10915]
astropy.modeling
^^^^^^^^^^^^^^^^
- Added NFW profile and tests to modeling package [10505]
- Added missing logic for evaluate to compound models [10002]
- Stop iteration in ``FittingWithOutlierRemoval`` before reaching ``niter`` if
the masked points are no longer changing. [10642]
- Keep a (shallow) copy of ``fit_info`` from the last iteration of the wrapped
fitter in ``FittingWithOutlierRemoval`` and also record the actual number of
iterations performed in it. [10642]
- Added attributes for fitting uncertainties (covariance matrix, standard
deviations) to models. Parameter covariance matrix can be accessed via
``model.cov_matrix``, standard deviations by ``model.stds`` or individually
for each parameter by ``parameter.std``. Currently implemented for
``LinearLSQFitter`` and ``LevMarLSQFitter``. [10552]
- N-dimensional least-squares statistic and specific 1,2,3-D methods [10670]
Update pypolychord from 1.15.1 to 1.15.1.
The bot wasn't able to find a changelog for this release. Got an idea?
Links
- PyPI: https://pypi.org/project/pypolychord - Homepage: https://ccpforge.cse.rl.ac.uk/gf/project/polychord/Update numpy from 1.19.0 to 1.21.2.
The bot wasn't able to find a changelog for this release. Got an idea?
Links
- PyPI: https://pypi.org/project/numpy - Homepage: https://www.numpy.orgUpdate scipy from 1.5.1 to 1.7.1.
Changelog
### 1.7.1 ``` compared to `1.7.0`. Authors ======= * Peter Bell * Evgeni Burovski * Justin Charlong + * Ralf Gommers * Matti Picus * Tyler Reddy * Pamphile Roy * Sebastian Wallkötter * Arthur Volant A total of 9 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete. ``` ### 1.7.0 ``` many new features, numerous bug-fixes, improved test coverage and better documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgrade to this release, as there are a large number of bug-fixes and optimizations. Before upgrading, we recommend that users check that their own code does not use deprecated SciPy functionality (to do so, run your code with ``python -Wd`` and check for ``DeprecationWarning`` s). Our development attention will now shift to bug-fix releases on the 1.7.x branch, and on adding new features on the master branch. This release requires Python `3.7+` and NumPy `1.16.5` or greater. For running on PyPy, PyPy3 `6.0+` is required. Highlights of this release - A new submodule for quasi-Monte Carlo, `scipy.stats.qmc`, was added - The documentation design was updated to use the same PyData-Sphinx theme as other NumFOCUS packages like NumPy. - We now vendor and leverage the Boost C++ library to enable numerous improvements for long-standing weaknesses in `scipy.stats` - `scipy.stats` has six new distributions, eight new (or overhauled) hypothesis tests, a new function for bootstrapping, a class that enables fast random variate sampling and percentile point function evaluation, and many other enhancements. - ``cdist`` and ``pdist`` distance calculations are faster for several metrics, especially weighted cases, thanks to a rewrite to a new C++ backend framework - A new class for radial basis function interpolation, `RBFInterpolator`, was added to address issues with the `Rbf` class. *We gratefully acknowledge the Chan-Zuckerberg Initiative Essential Open Source Software for Science program for supporting many of the improvements to* `scipy.stats`. New features `scipy.cluster` improvements An optional argument, ``seed``, has been added to ``kmeans`` and ``kmeans2`` to set the random generator and random state. `scipy.interpolate` improvements Improved input validation and error messages for ``fitpack.bispev`` and ``fitpack.parder`` for scenarios that previously caused substantial confusion for users. The class `RBFInterpolator` was added to supersede the `Rbf` class. The new class has usage that more closely follows other interpolator classes, corrects sign errors that caused unexpected smoothing behavior, includes polynomial terms in the interpolant (which are necessary for some RBF choices), and supports interpolation using only the k-nearest neighbors for memory efficiency. `scipy.linalg` improvements An LAPACK wrapper was added for access to the ``tgexc`` subroutine. `scipy.ndimage` improvements `scipy.ndimage.affine_transform` is now able to infer the ``output_shape`` from the ``out`` array. `scipy.optimize` improvements The optional parameter ``bounds`` was added to ``_minimize_neldermead`` to support bounds constraints for the Nelder-Mead solver. ``trustregion`` methods ``trust-krylov``, ``dogleg`` and ``trust-ncg`` can now estimate ``hess`` by finite difference using one of ``["2-point", "3-point", "cs"]``. ``halton`` was added as a ``sampling_method`` in `scipy.optimize.shgo`. ``sobol`` was fixed and is now using `scipy.stats.qmc.Sobol`. ``halton`` and ``sobol`` were added as ``init`` methods in `scipy.optimize.differential_evolution.` ``differential_evolution`` now accepts an ``x0`` parameter to provide an initial guess for the minimization. ``least_squares`` has a modest performance improvement when SciPy is built with Pythran transpiler enabled. When ``linprog`` is used with ``method`` ``'highs'``, ``'highs-ipm'``, or ``'highs-ds'``, the result object now reports the marginals (AKA shadow prices, dual values) and residuals associated with each constraint. `scipy.signal` improvements ``get_window`` supports ``general_cosine`` and ``general_hamming`` window functions. `scipy.signal.medfilt2d` now releases the GIL where appropriate to enable performance gains via multithreaded calculations. `scipy.sparse` improvements Addition of ``dia_matrix`` sparse matrices is now faster. `scipy.spatial` improvements ``distance.cdist`` and ``distance.pdist`` performance has greatly improved for certain weighted metrics. Namely: ``minkowski``, ``euclidean``, ``chebyshev``, ``canberra``, and ``cityblock``. Modest performance improvements for many of the unweighted ``cdist`` and ``pdist`` metrics noted above. The parameter ``seed`` was added to `scipy.spatial.vq.kmeans` and `scipy.spatial.vq.kmeans2`. The parameters ``axis`` and ``keepdims`` where added to `scipy.spatial.distance.jensenshannon`. The ``rotation`` methods ``from_rotvec`` and ``as_rotvec`` now accept a ``degrees`` argument to specify usage of degrees instead of radians. `scipy.special` improvements Wright's generalized Bessel function for positive arguments was added as `scipy.special.wright_bessel.` An implementation of the inverse of the Log CDF of the Normal Distribution is now available via `scipy.special.ndtri_exp`. `scipy.stats` improvements Hypothesis Tests The Mann-Whitney-Wilcoxon test, ``mannwhitneyu``, has been rewritten. It now supports n-dimensional input, an exact test method when there are no ties, and improved documentation. Please see "Other changes" for adjustments to default behavior. The new function `scipy.stats.binomtest` replaces `scipy.stats.binom_test`. The new function returns an object that calculates a confidence intervals of the proportion parameter. Also, performance was improved from O(n) to O(log(n)) by using binary search. The two-sample version of the Cramer-von Mises test is implemented in `scipy.stats.cramervonmises_2samp`. The Alexander-Govern test is implemented in the new function `scipy.stats.alexandergovern`. The new functions `scipy.stats.barnard_exact` and `scipy.stats. boschloo_exact` respectively perform Barnard's exact test and Boschloo's exact test for 2x2 contingency tables. The new function `scipy.stats.page_trend_test` performs Page's test for ordered alternatives. The new function `scipy.stats.somersd` performs Somers' D test for ordinal association between two variables. An option, ``permutations``, has been added in `scipy.stats.ttest_ind` to perform permutation t-tests. A ``trim`` option was also added to perform a trimmed (Yuen's) t-test. The ``alternative`` parameter was added to the ``skewtest``, ``kurtosistest``, ``ranksums``, ``mood``, ``ansari``, ``linregress``, and ``spearmanr`` functions to allow one-sided hypothesis testing. Sample statistics The new function `scipy.stats.differential_entropy` estimates the differential entropy of a continuous distribution from a sample. The ``boxcox`` and ``boxcox_normmax`` now allow the user to control the optimizer used to minimize the negative log-likelihood function. A new function `scipy.stats.contingency.relative_risk` calculates the relative risk, or risk ratio, of a 2x2 contingency table. The object returned has a method to compute the confidence interval of the relative risk. Performance improvements in the ``skew`` and ``kurtosis`` functions achieved by removal of repeated/redundant calculations. Substantial performance improvements in `scipy.stats.mstats.hdquantiles_sd`. The new function `scipy.stats.contingency.association` computes several measures of association for a contingency table: Pearsons contingency coefficient, Cramer's V, and Tschuprow's T. The parameter ``nan_policy`` was added to `scipy.stats.zmap` to provide options for handling the occurrence of ``nan`` in the input data. The parameter ``ddof`` was added to `scipy.stats.variation` and `scipy.stats.mstats.variation`. The parameter ``weights`` was added to `scipy.stats.gmean`. Statistical Distributions We now vendor and leverage the Boost C++ library to address a number of previously reported issues in ``stats``. Notably, ``beta``, ``binom``, ``nbinom`` now have Boost backends, and it is straightforward to leverage the backend for additional functions. The skew Cauchy probability distribution has been implemented as `scipy.stats.skewcauchy`. The Zipfian probability distribution has been implemented as `scipy.stats.zipfian`. The new distributions ``nchypergeom_fisher`` and ``nchypergeom_wallenius`` implement the Fisher and Wallenius versions of the noncentral hypergeometric distribution, respectively. The generalized hyperbolic distribution was added in `scipy.stats.genhyperbolic`. The studentized range distribution was added in `scipy.stats.studentized_range`. `scipy.stats.argus` now has improved handling for small parameter values. Better argument handling/preparation has resulted in performance improvements for many distributions. The ``cosine`` distribution has added ufuncs for ``ppf``, ``cdf``, ``sf``, and ``isf`` methods including numerical precision improvements at the edges of the support of the distribution. An option to fit the distribution to data by the method of moments has been added to the ``fit`` method of the univariate continuous distributions. Other `scipy.stats.bootstrap` has been added to allow estimation of the confidence interval and standard error of a statistic. The new function `scipy.stats.contingency.crosstab` computes a contingency table (i.e. a table of counts of unique entries) for the given data. `scipy.stats.NumericalInverseHermite` enables fast random variate sampling and percentile point function evaluation of an arbitrary univariate statistical distribution. New `scipy.stats.qmc` module This new module provides Quasi-Monte Carlo (QMC) generators and associated helper functions. It provides a generic class `scipy.stats.qmc.QMCEngine` which defines a QMC engine/sampler. An engine is state aware: it can be continued, advanced and reset. 3 base samplers are available: - `scipy.stats.qmc.Sobol` the well known Sobol low discrepancy sequence. Several warnings have been added to guide the user into properly using this sampler. The sequence is scrambled by default. - `scipy.stats.qmc.Halton`: Halton low discrepancy sequence. The sequence is scrambled by default. - `scipy.stats.qmc.LatinHypercube`: plain LHS design. And 2 special samplers are available: - `scipy.stats.qmc.MultinomialQMC`: sampling from a multinomial distribution using any of the base `scipy.stats.qmc.QMCEngine`. - `scipy.stats.qmc.MultivariateNormalQMC`: sampling from a multivariate Normal using any of the base `scipy.stats.qmc.QMCEngine`. The module also provide the following helpers: - `scipy.stats.qmc.discrepancy`: assess the quality of a set of points in terms of space coverage. - `scipy.stats.qmc.update_discrepancy`: can be used in an optimization loop to construct a good set of points. - `scipy.stats.qmc.scale`: easily scale a set of points from (to) the unit interval to (from) a given range. Deprecated features `scipy.linalg` deprecations - `scipy.linalg.pinv2` is deprecated and its functionality is completely subsumed into `scipy.linalg.pinv` - Both ``rcond``, ``cond`` keywords of `scipy.linalg.pinv` and `scipy.linalg.pinvh` were not working and now are deprecated. They are now replaced with functioning ``atol`` and ``rtol`` keywords with clear usage. `scipy.spatial` deprecations - `scipy.spatial.distance` metrics expect 1d input vectors but will call ``np.squeeze`` on their inputs to accept any extra length-1 dimensions. That behaviour is now deprecated. Backwards incompatible changes Other changes We now accept and leverage performance improvements from the ahead-of-time Python-to-C++ transpiler, Pythran, which can be optionally disabled (via ``export SCIPY_USE_PYTHRAN=0``) but is enabled by default at build time. There are two changes to the default behavior of `scipy.stats.mannwhitenyu`: - For years, use of the default ``alternative=None`` was deprecated; explicit ``alternative`` specification was required. Use of the new default value of ``alternative``, "two-sided", is now permitted. - Previously, all p-values were based on an asymptotic approximation. Now, for small samples without ties, the p-values returned are exact by default. Support has been added for PEP 621 (project metadata in ``pyproject.toml``) We now support a Gitpod environment to reduce the barrier to entry for SciPy development; for more details see `quickstart-gitpod`. Authors * endolith * Jelle Aalbers + * Adam + * Tania Allard + * Sven Baars + * Max Balandat + * baumgarc + * Christoph Baumgarten * Peter Bell * Lilian Besson * Robinson Besson + * Max Bolingbroke * Blair Bonnett + * Jordão Bragantini * Harm Buisman + * Evgeni Burovski * Matthias Bussonnier * Dominic C * CJ Carey * Ramón Casero + * Chachay + * charlotte12l + * Benjamin Curtice Corbett + * Falcon Dai + * Ian Dall + * Terry Davis * droussea2001 + * DWesl + * dwight200 + * Thomas J. Fan + * Joseph Fox-Rabinovitz * Max Frei + * Laura Gutierrez Funderburk + * gbonomib + * Matthias Geier + * Pradipta Ghosh + * Ralf Gommers * Evan H + * h-vetinari * Matt Haberland * Anselm Hahn + * Alex Henrie * Piet Hessenius + * Trever Hines + * Elisha Hollander + * Stephan Hoyer * Tom Hu + * Kei Ishikawa + * Julien Jerphanion * Robert Kern * Shashank KS + * Peter Mahler Larsen * Eric Larson * Cheng H. Lee + * Gregory R. Lee * Jean-Benoist Leger + * lgfunderburk + * liam-o-marsh + * Xingyu Liu + * Alex Loftus + * Christian Lorentzen + * Cong Ma * Marc + * MarkPundurs + * Markus Löning + * Liam Marsh + * Nicholas McKibben * melissawm + * Jamie Morton * Andrew Nelson * Nikola Forró * Tor Nordam + * Olivier Gauthé + * Rohit Pandey + * Avanindra Kumar Pandeya + * Tirth Patel * paugier + * Alex H. Wagner, PhD + * Jeff Plourde + * Ilhan Polat * pranavrajpal + * Vladyslav Rachek * Bharat Raghunathan * Recursing + * Tyler Reddy * Lucas Roberts * Gregor Robinson + * Pamphile Roy + * Atsushi Sakai * Benjamin Santos * Martin K. Scherer + * Thomas Schmelzer + * Daniel Scott + * Sebastian Wallkötter + * serge-sans-paille + * Namami Shanker + * Masashi Shibata + * Alexandre de Siqueira + * Albert Steppi + * Adam J. Stewart + * Kai Striega * Diana Sukhoverkhova * Søren Fuglede Jørgensen * Mike Taves * Dan Temkin + * Nicolas Tessore + * tsubota20 + * Robert Uhl * christos val + * Bas van Beek + * Ashutosh Varma + * Jose Vazquez + * Sebastiano Vigna * Aditya Vijaykumar * VNMabus * Arthur Volant + * Samuel Wallan * Stefan van der Walt * Warren Weckesser * Anreas Weh * Josh Wilson * Rory Yorke * Egor Zemlyanoy * Marc Zoeller + * zoj613 + * 秋纫 + A total of 126 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete. ``` ### 1.6.3 ``` compared to `1.6.2`. Authors ====== * Peter Bell * Ralf Gommers * Matt Haberland * Peter Mahler Larsen * Tirth Patel * Tyler Reddy * Pamphile ROY + * Xingyu Liu + A total of 8 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete. ``` ### 1.6.2 ``` compared to `1.6.1`. This is also the first SciPy release to place upper bounds on some dependencies to improve the long-term repeatability of source builds. Authors ======= * Pradipta Ghosh + * Tyler Reddy * Ralf Gommers * Martin K. Scherer + * Robert Uhl * Warren Weckesser A total of 6 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete. ``` ### 1.6.1 ``` compared to `1.6.0`. Please note that for SciPy wheels to correctly install with pip on macOS 11, pip `>= 20.3.3` is needed. Authors ======= * Peter Bell * Evgeni Burovski * CJ Carey * Ralf Gommers * Peter Mahler Larsen * Cheng H. Lee + * Cong Ma * Nicholas McKibben * Nikola Forró * Tyler Reddy * Warren Weckesser A total of 11 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete. ``` ### 1.6.0 ``` many new features, numerous bug-fixes, improved test coverage and better documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgrade to this release, as there are a large number of bug-fixes and optimizations. Before upgrading, we recommend that users check that their own code does not use deprecated SciPy functionality (to do so, run your code with ``python -Wd`` and check for ``DeprecationWarning`` s). Our development attention will now shift to bug-fix releases on the 1.6.x branch, and on adding new features on the master branch. This release requires Python `3.7`+ and NumPy `1.16.5` or greater. For running on PyPy, PyPy3 `6.0`+ is required. Highlights of this release ---------------------------- - `scipy.ndimage` improvements: Fixes and ehancements to boundary extension modes for interpolation functions. Support for complex-valued inputs in many filtering and interpolation functions. New ``grid_mode`` option for `scipy.ndimage.zoom` to enable results consistent with scikit-image's ``rescale``. - `scipy.optimize.linprog` has fast, new methods for large, sparse problems from the ``HiGHS`` library. - `scipy.stats` improvements including new distributions, a new test, and enhancements to existing distributions and tests New features ============ `scipy.special` improvements ----------------------------- `scipy.special` now has improved support for 64-bit ``LAPACK`` backend `scipy.odr` improvements ------------------------- `scipy.odr` now has support for 64-bit integer ``BLAS`` `scipy.odr.ODR` has gained an optional ``overwrite`` argument so that existing files may be overwritten. `scipy.integrate` improvements ------------------------------- Some renames of functions with poor names were done, with the old names retained without being in the reference guide for backwards compatibility reasons: - ``integrate.simps`` was renamed to ``integrate.simpson`` - ``integrate.trapz`` was renamed to ``integrate.trapezoid`` - ``integrate.cumtrapz`` was renamed to ``integrate.cumulative_trapezoid`` `scipy.cluster` improvements ------------------------------- `scipy.cluster.hierarchy.DisjointSet` has been added for incremental connectivity queries. `scipy.cluster.hierarchy.dendrogram` return value now also includes leaf color information in `leaves_color_list`. `scipy.interpolate` improvements --------------------------------- `scipy.interpolate.interp1d` has a new method ``nearest-up``, similar to the existing method ``nearest`` but rounds half-integers up instead of down. `scipy.io` improvements ------------------------ Support has been added for reading arbitrary bit depth integer PCM WAV files from 1- to 32-bit, including the commonly-requested 24-bit depth. `scipy.linalg` improvements ---------------------------- The new function `scipy.linalg.matmul_toeplitz` uses the FFT to compute the product of a Toeplitz matrix with another matrix. `scipy.linalg.sqrtm` and `scipy.linalg.logm` have performance improvements thanks to additional Cython code. Python ``LAPACK`` wrappers have been added for ``pptrf``, ``pptrs``, ``ppsv``, ``pptri``, and ``ppcon``. `scipy.linalg.norm` and the ``svd`` family of functions will now use 64-bit integer backends when available. `scipy.ndimage` improvements ----------------------------- `scipy.ndimage.convolve`, `scipy.ndimage.correlate` and their 1d counterparts now accept both complex-valued images and/or complex-valued filter kernels. All convolution-based filters also now accept complex-valued inputs (e.g. ``gaussian_filter``, ``uniform_filter``, etc.). Multiple fixes and enhancements to boundary handling were introduced to `scipy.ndimage` interpolation functions (i.e. ``affine_transform``, ``geometric_transform``, ``map_coordinates``, ``rotate``, ``shift``, ``zoom``). A new boundary mode, ``grid-wrap`` was added which wraps images periodically, using a period equal to the shape of the input image grid. This is in contrast to the existing ``wrap`` mode which uses a period that is one sample smaller than the original signal extent along each dimension. A long-standing bug in the ``reflect`` boundary condition has been fixed and the mode ``grid-mirror`` was introduced as a synonym for ``reflect``. A new boundary mode, ``grid-constant`` is now available. This is similar to the existing ndimage ``constant`` mode, but interpolation will still performed at coordinate values outside of the original image extent. This ``grid-constant`` mode is consistent with OpenCV's ``BORDER_CONSTANT`` mode and scikit-image's ``constant`` mode. Spline pre-filtering (used internally by ``ndimage`` interpolation functions when ``order >= 2``), now supports all boundary modes rather than always defaulting to mirror boundary conditions. The standalone functions ``spline_filter`` and ``spline_filter1d`` have analytical boundary conditions that match modes ``mirror``, ``grid-wrap`` and ``reflect``. `scipy.ndimage` interpolation functions now accept complex-valued inputs. In this case, the interpolation is applied independently to the real and imaginary components. The ``ndimage`` tutorials (https://docs.scipy.org/doc/scipy/reference/tutorial/ndimage.html) have been updated with new figures to better clarify the exact behavior of all of the interpolation boundary modes. `scipy.ndimage.zoom` now has a ``grid_mode`` option that changes the coordinate of the center of the first pixel along an axis from 0 to 0.5. This allows resizing in a manner that is consistent with the behavior of scikit-image's ``resize`` and ``rescale`` functions (and OpenCV's ``cv2.resize``). `scipy.optimize` improvements ------------------------------ `scipy.optimize.linprog` has fast, new methods for large, sparse problems from the ``HiGHS`` C++ library. ``method='highs-ds'`` uses a high performance dual revised simplex implementation (HSOL), ``method='highs-ipm'`` uses an interior-point method with crossover, and ``method='highs'`` chooses between the two automatically. These methods are typically much faster and often exceed the accuracy of other ``linprog`` methods, so we recommend explicitly specifying one of these three method values when using ``linprog``. `scipy.optimize.quadratic_assignment` has been added for approximate solution of the quadratic assignment problem. `scipy.optimize.linear_sum_assignment` now has a substantially reduced overhead for small cost matrix sizes `scipy.optimize.least_squares` has improved performance when the user provides the jacobian as a sparse jacobian already in ``csr_matrix`` format `scipy.optimize.linprog` now has an ``rr_method`` argument for specification of the method used for redundancy handling, and a new method for this purpose is available based on the interpolative decomposition approach. `scipy.signal` improvements ---------------------------- `scipy.signal.gammatone` has been added to design FIR or IIR filters that model the human auditory system. `scipy.signal.iircomb` has been added to design IIR peaking/notching comb filters that can boost/attenuate a frequency from a signal. `scipy.signal.sosfilt` performance has been improved to avoid some previously- observed slowdowns `scipy.signal.windows.taylor` has been added--the Taylor window function is commonly used in radar digital signal processing `scipy.signal.gauss_spline` now supports ``list`` type input for consistency with other related SciPy functions `scipy.signal.correlation_lags` has been added to allow calculation of the lag/ displacement indices array for 1D cross-correlation. `scipy.sparse` improvements ---------------------------- A solver for the minimum weight full matching problem for bipartite graphs, also known as the linear assignment problem, has been added in `scipy.sparse.csgraph.min_weight_full_bipartite_matching`. In particular, this provides functionality analogous to that of `scipy.optimize.linear_sum_assignment`, but with improved performance for sparse inputs, and the ability to handle inputs whose dense representations would not fit in memory. The time complexity of `scipy.sparse.block_diag` has been improved dramatically from quadratic to linear. `scipy.sparse.linalg` improvements ----------------------------------- The vendored version of ``SuperLU`` has been updated `scipy.fft` improvements ------------------------- The vendored ``pocketfft`` library now supports compiling with ARM neon vector extensions and has improved thread pool behavior. `scipy.spatial` improvements ----------------------------- The python implementation of ``KDTree`` has been dropped and ``KDTree`` is now implemented in terms of ``cKDTree``. You can now expect ``cKDTree``-like performance by default. This also means ``sys.setrecursionlimit`` no longer needs to be increased for querying large trees. ``transform.Rotation`` has been updated with support for Modified Rodrigues Parameters alongside the existing rotation representations (PR gh-12667). `scipy.spatial.transform.Rotation` has been partially cythonized, with some performance improvements observed `scipy.spatial.distance.cdist` has improved performance with the ``minkowski`` metric, especially for p-norm values of 1 or 2. `scipy.stats` improvements --------------------------- New distributions have been added to `scipy.stats`: - The asymmetric Laplace continuous distribution has been added as `scipy.stats.laplace_asymmetric`. - The negative hypergeometric distribution has been added as `scipy.stats.nhypergeom`. - The multivariate t distribution has been added as `scipy.stats.multivariate_t`. - The multivariate hypergeometric distribution has been added as `scipy.stats.multivariate_hypergeom`. The ``fit`` method has been overridden for several distributions (``laplace``, ``pareto``, ``rayleigh``, ``invgauss``, ``logistic``, ``gumbel_l``, ``gumbel_r``); they now use analytical, distribution-specific maximum likelihood estimation results for greater speed and accuracy than the generic (numerical optimization) implementation. The one-sample Cramér-von Mises test has been added as `scipy.stats.cramervonmises`. An option to compute one-sided p-values was added to `scipy.stats.ttest_1samp`, `scipy.stats.ttest_ind_from_stats`, `scipy.stats.ttest_ind` and `scipy.stats.ttest_rel`. The function `scipy.stats.kendalltau` now has an option to compute Kendall's tau-c (also known as Stuart's tau-c), and support has been added for exact p-value calculations for sample sizes ``> 171``. `stats.trapz` was renamed to `stats.trapezoid`, with the former name retained as an alias for backwards compatibility reasons. The function `scipy.stats.linregress` now includes the standard error of the intercept in its return value. The ``_logpdf``, ``_sf``, and ``_isf`` methods have been added to `scipy.stats.nakagami`; ``_sf`` and ``_isf`` methods also added to `scipy.stats.gumbel_r` The ``sf`` method has been added to `scipy.stats.levy` and `scipy.stats.levy_l` for improved precision. `scipy.stats.binned_statistic_dd` performance improvements for the following computed statistics: ``max``, ``min``, ``median``, and ``std``. We gratefully acknowledge the Chan-Zuckerberg Initiative Essential Open Source Software for Science program for supporting many of these improvements to `scipy.stats`. Deprecated features =================== `scipy.spatial` changes ------------------------ Calling ``KDTree.query`` with ``k=None`` to find all neighbours is deprecated. Use ``KDTree.query_ball_point`` instead. ``distance.wminkowski`` was deprecated; use ``distance.minkowski`` and supply weights with the ``w`` keyword instead. Backwards incompatible changes ============================== `scipy` changes ---------------- Using `scipy.fft` as a function aliasing ``numpy.fft.fft`` was removed after being deprecated in SciPy ``1.4.0``. As a result, the `scipy.fft` submodule must be explicitly imported now, in line with other SciPy subpackages. `scipy.signal` changes ----------------------- The output of ``decimate``, ``lfilter_zi``, ``lfiltic``, ``sos2tf``, and ``sosfilt_zi`` have been changed to match ``numpy.result_type`` of their inputs. The window function ``slepian`` was removed. It had been deprecated since SciPy ``1.1``. `scipy.spatial` changes ------------------------ ``cKDTree.query`` now returns 64-bit rather than 32-bit integers on Windows, making behaviour consistent between platforms (PR gh-12673). `scipy.stats` changes ---------------------- The ``frechet_l`` and ``frechet_r`` distributions were removed. They were deprecated since SciPy ``1.0``. Other changes ============= ``setup_requires`` was removed from ``setup.py``. This means that users invoking ``python setup.py install`` without having numpy already installed will now get an error, rather than having numpy installed for them via ``easy_install``. This install method was always fragile and problematic, users are encouraged to use ``pip`` when installing from source. - Fixed a bug in `scipy.optimize.dual_annealing` ``accept_reject`` calculation that caused uphill jumps to be accepted less frequently. - The time required for (un)pickling of `scipy.stats.rv_continuous`, `scipy.stats.rv_discrete`, and `scipy.stats.rv_frozen` has been significantly reduced (gh12550). Inheriting subclasses should note that ``__setstate__`` no longer calls ``__init__`` upon unpickling. Authors ======= * endolith * vkk800 * aditya + * George Bateman + * Christoph Baumgarten * Peter Bell * Tobias Biester + * Keaton J. Burns + * Evgeni Burovski * Rüdiger Busche + * Matthias Bussonnier * Dominic C + * Corallus Caninus + * CJ Carey * Thomas A Caswell * chapochn + * Lucía Cheung * Zach Colbert + * Coloquinte + * Yannick Copin + * Devin Crowley + * Terry Davis + * Michaël Defferrard + * devonwp + * Didier + * divenex + * Thomas Duvernay + * Eoghan O'Connell + * Gökçen Eraslan * Kristian Eschenburg + * Ralf Gommers * Thomas Grainger + * GreatV + * Gregory Gundersen + * h-vetinari + * Matt Haberland * Mark Harfouche + * He He + * Alex Henrie * Chun-Ming Huang + * Martin James McHugh III + * Alex Izvorski + * Joey + * ST John + * Jonas Jonker + * Julius Bier Kirkegaard * Marcin Konowalczyk + * Konrad0 * Sam Van Kooten + * Sergey Koposov + * Peter Mahler Larsen * Eric Larson * Antony Lee * Gregory R. Lee * Loïc Estève * Jean-Luc Margot + * MarkusKoebis + * Nikolay Mayorov * G. D. McBain * Andrew McCluskey + * Nicholas McKibben * Sturla Molden * Denali Molitor + * Eric Moore * Shashaank N + * Prashanth Nadukandi + * nbelakovski + * Andrew Nelson * Nick + * Nikola Forró + * odidev * ofirr + * Sambit Panda * Dima Pasechnik * Tirth Patel + * Paweł Redzyński + * Vladimir Philipenko + * Philipp Thölke + * Ilhan Polat * Eugene Prilepin + * Vladyslav Rachek * Ram Rachum + * Tyler Reddy * Martin Reinecke + * Simon Segerblom Rex + * Lucas Roberts * Benjamin Rowell + * Eli Rykoff + * Atsushi Sakai * Moritz Schulte + * Daniel B. Smith * Steve Smith + * Jan Soedingrekso + * Victor Stinner + * Jose Storopoli + * Diana Sukhoverkhova + * Søren Fuglede Jørgensen * taoky + * Mike Taves + * Ian Thomas + * Will Tirone + * Frank Torres + * Seth Troisi * Ronald van Elburg + * Hugo van Kemenade * Paul van Mulbregt * Saul Ivan Rivas Vega + * Pauli Virtanen * Jan Vleeshouwers * Samuel Wallan * Warren Weckesser * Ben West + * Eric Wieser * WillTirone + * Levi John Wolf + * Zhiqing Xiao * Rory Yorke + * Yun Wang (Maigo) + * Egor Zemlyanoy + * ZhihuiChen0903 + * Jacob Zhong + A total of 121 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete. ``` ### 1.5.4 ``` compared to `1.5.3`. Importantly, wheels are now available for Python `3.9` and a more complete fix has been applied for issues building with XCode `12`. Authors ===== * Peter Bell * CJ Carey * Andrew McCluskey + * Andrew Nelson * Tyler Reddy * Eli Rykoff + * Ian Thomas + A total of 7 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete. ``` ### 1.5.3 ``` compared to `1.5.2`. In particular, Linux ARM64 wheels are now available and a compatibility issue with XCode 12 has been fixed. Authors ======= * Peter Bell * CJ Carey * Thomas Duvernay + * Gregory Lee * Eric Moore * odidev * Dima Pasechnik * Tyler Reddy * Simon Segerblom Rex + * Daniel B. Smith * Will Tirone + * Warren Weckesser A total of 12 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete. ``` ### 1.5.2 ``` compared to `1.5.1`. Authors ===== * Peter Bell * Tobias Biester + * Evgeni Burovski * Thomas A Caswell * Ralf Gommers * Sturla Molden * Andrew Nelson * ofirr + * Sambit Panda * Ilhan Polat * Tyler Reddy * Atsushi Sakai * Pauli Virtanen A total of 13 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete. ```Links
- PyPI: https://pypi.org/project/scipy - Changelog: https://pyup.io/changelogs/scipy/ - Repo: https://github.com/scipy/scipy/releases - Homepage: https://www.scipy.orgUpdate astropy from 4.0.1.post1 to 4.3.1.
Changelog
### 4.3 ``` ================ New Features ------------ astropy.convolution ^^^^^^^^^^^^^^^^^^^ - Change padding sizes for ``fft_pad`` in ``convolve_fft`` from powers of 2 only to scipy-optimized numbers, applied separately to each dimension; yielding some performance gains and avoiding potential large memory impact for certain multi-dimensional inputs. [11533] astropy.coordinates ^^^^^^^^^^^^^^^^^^^ - Adds the ability to create topocentric ``CIRS`` frames. Using these, ``AltAz`` calculations are now accurate down to the milli-arcsecond level. [10994] - Adds a direct transformation from ``ICRS`` to ``AltAz`` frames. This provides a modest speedup of approximately 10 percent. [11079] - Adds new ``WGS84GeodeticRepresentation``, ``WGS72GeodeticRepresentation``, and ``GRS80GeodeticRepresentation``. These are mostly for use inside ``EarthLocation`` but can also be used to convert between geocentric (cartesian) and different geodetic representations directly. [11086] - ``SkyCoord.guess_from_table`` now also searches for differentials in the table. In addition, multiple regex matches can be resolved when they are exact component names, e.g. having both columns “dec” and “pm_dec” no longer errors and will be included in the SkyCoord. [11417] - All representations now have a ``transform`` method, which allows them to be transformed by a 3x3 matrix in a Cartesian basis. By default, transformations are routed through ``CartesianRepresentation``. ``SphericalRepresentation`` and ``PhysicssphericalRepresentation`` override this for speed and to prevent NaN leakage from the distance to the angular components. Also, the functions ``is_O3`` and ``is_rotation`` have been added to ``matrix_utities`` for checking whether a matrix is in the O(3) group or is a rotation (proper or improper), respectively. [11444] - Moved angle formatting and parsing utilities to ``astropy.coordinates.angle_formats``. Added new functionality to ``astropy.coordinates.angle_utilities`` for generating points on or in spherical surfaces, either randomly or on a grid. [11628] - Added a new method to ``SkyCoord``, ``spherical_offsets_by()``, which is the conceptual inverse of ``spherical_offsets_to()``: Given angular offsets in longitude and latitude, this method returns a new coordinate with the offsets applied. [11635] - Refactor conversions between ``GCRS`` and ``CIRS,TETE`` for better accuracy and substantially improved speed. [11069] - Also refactor ``EarthLocation.get_gcrs`` for an increase in performance of an order of magnitude, which enters as well in getting observed positions of planets using ``get_body``. [11073] - Refactored the usage of metaclasses in ``astropy.coordinates`` to instead use ``__init_subclass__`` where possible. [11090] - Removed duplicate calls to transform_to from match_to_catalog_sky and match_to_catalog_3d, improving their performance. [11449] - The new DE440 and DE440s ephemerides are now available via shortcuts 'de440' and 'de440s'. The DE 440s ephemeris will probably become the default ephemeris when chosing 'jpl' in 5.0. [11601] astropy.cosmology ^^^^^^^^^^^^^^^^^ - Cosmology parameter dictionaries now also specify the Cosmology class to which the parameters correspond. For example, the dictionary for ``astropy.cosmology.parameters.Planck18`` has the added key-value pair ("cosmology", "FlatLambdaCDM"). [11530] astropy.io.ascii ^^^^^^^^^^^^^^^^ - Added support for reading and writing ASCII tables in QDP (Quick and Dandy Plotter) format. [11256] - Added support for reading and writing multidimensional column data (masked and unmasked) to ECSV. Also added formal support for reading and writing object-type column data which can contain items consisting of lists, dicts, and basic scalar types. This can be used to store columns of variable-length arrays. Both of these features use JSON to convert the object to a string that is stored in the ECSV output. [11569, 11662, 11720] astropy.io.fits ^^^^^^^^^^^^^^^ - Added ``append`` keyword to append table objects to an existing FITS file [2632, 11149] - Check that the SIMPLE card is present when opening a file, to ensure that the file is a valid FITS file and raise a better error when opening a non FITS one. ``ignore_missing_simple`` can be used to skip this verification. [10895] - Expose ``Header.strip`` as a public method, to remove the most common structural keywords. [11174] - Enable the use of ``os.PathLike`` objects when dealing with (mainly FITS) files. [11580] astropy.io.registry ^^^^^^^^^^^^^^^^^^^ - Readers and writers can now set a priority, to assist with resolving which format to use. [11214] astropy.io.votable ^^^^^^^^^^^^^^^^^^ - Version 1.4 VOTables now use the VOUnit format specification. [11032] - When reading VOTables using the Unified File Read/Write Interface (i.e. using the ``Table.read()`` or ``QTable.read()`` functions) it is now possible to specify all keyword arguments that are valid for ``astropy.io.votable.table.parse()``. [11643] astropy.modeling ^^^^^^^^^^^^^^^^ - Added a state attribute to models to allow preventing the synching of constraint values from the constituent models. This synching can greatly slow down fitting if there are large numbers of fit parameters. model.sync_constraints = True means check constituent model constraints for compound models every time the constraint is accessed, False, do not. Fitters that support constraints will set this to False on the model copy and then set back to True when the fit is complete before returning. [11365] - The ``convolve_models_fft`` function implements model convolution so that one insures that the convolution remains consistent across multiple different inputs. [11456] astropy.nddata ^^^^^^^^^^^^^^ - Prevent unnecessary copies of the data during ``NDData`` arithmetic when units need to be added. [11107] - NDData str representations now show units, if present. [11553] astropy.stats ^^^^^^^^^^^^^ - Added the ability to specify stdfunc='mad_std' when doing sigma clipping, which will use a built-in function and lead to significant performance improvements if cenfunc is 'mean' or 'median'. [11664] - Significantly improved the performance of sigma clipping when cenfunc and stdfunc are passed as strings and the ``grow`` option is not used. [11219] - Improved performance of ``bayesian_blocks()`` by removing one ``np.log()`` call [11356] astropy.table ^^^^^^^^^^^^^ - Add table attributes to include or exclude columns from the output when printing a table. This functionality includes a context manager to include/exclude columns temporarily. [11190] - Improved the string representation of objects related to ``Table.indices`` so they now indicate the object type and relevant attributes. [11333] astropy.timeseries ^^^^^^^^^^^^^^^^^^ - An exception is raised when ``n_bins`` is passed as an argument while any of the parameters ``time_bin_start`` or ``time_bin_size`` is not scalar. [11463] astropy.units ^^^^^^^^^^^^^ - The ``physical_type`` attributes of each unit are now objects of the (new) ``astropy.units.physical.PhysicalType`` class instead of strings and the function ``astropy.units.physical.get_physical_type`` can now translate strings to these objects. [11204] - The function ``astropy.units.physical.def_physical_type`` was created to either define entirely new physical types, or to add more physical type names to an existing physical types. [11204] - ``PhysicalType``'s can be operated on using operations multiplication, division, and exponentiation are to facilitate dimensional analysis. [11204] - It is now possible to define aliases for units using ``astropy.units.set_enabled_aliases``. This can be used when reading files that have misspelled units. [11258] - Add a new "DN" unit, ``units.dn`` or ``units.DN``, representing data number for a detector. [11591] astropy.utils ^^^^^^^^^^^^^ - Added ``ssl_context`` and ``allow_insecure`` options to ``download_file``, as well as the ability to optionally use the ``certifi`` package to provide root CA certificates when downloading from sites secured with TLS/SSL. [10434] - ``astropy.utils.data.get_pkg_data_path`` is publicly scoped (previously the private function ``_find_pkg_data_path``) for obtaining file paths without checking if the file/directory exists, as long as the package and module do. [11006] - Deprecated ``astropy.utils.OrderedDescriptor`` and ``astropy.utils.OrderedDescriptorContainer``, as new features in Python 3 make their use less compelling. [11094, 11099] - ``astropy.utils.masked`` provides a new ``Masked`` class/factory that can be used to represent masked ``ndarray`` and all its subclasses, including ``Quantity`` and its subclasses. These classes can be used inside coordinates, but the mask is not yet exposed. Generally, the interface should be considered experimental. [11127, 11792] - Add new ``utils.parsing`` module to with helper wrappers around ``ply``. [11227] - Change the Time and IERS leap second handling so that the leap second table is updated only when a Time transform involving UTC is performed. Previously this update check was done the first time a ``Time`` object was created, which in practice occured when importing common astropy subpackages like ``astropy.coordinates``. Now you can prevent querying internet resources (for instance on a cluster) by setting ``iers.conf.auto_download = False``. This can be done after importing astropy but prior to performing any ``Time`` scale transformations related to UTC. [11638] - Added a new module at ``astropy.utils.compat.optional_deps`` to consolidate the definition of ``HAS_x`` optional dependency flag variables, like ``HAS_SCIPY``. [11490] astropy.wcs ^^^^^^^^^^^ - Add IVOA UCD mappings for some FITS WCS keywords commonly used in solar physics. [10965] - Add ``STOKES`` FITS WCS keyword to the IVOA UCD mapping. [11236] - Updated bundled version of WCSLIB to version 7.6. See https://www.atnf.csiro.au/people/mcalabre/WCS/CHANGES for a list of included changes. [11549] API Changes ----------- astropy.coordinates ^^^^^^^^^^^^^^^^^^^ - For input to representations, subclasses of the class required for a given attribute will now be allowed in. [11113] - Except for ``UnitSphericalRepresentation``, shortcuts in representations now allow for attached differentials. [11467] - Allow coordinate name strings as input to ``SkyCoord.is_transformable_to``. [11552] astropy.cosmology ^^^^^^^^^^^^^^^^^ - Change ``z_at_value`` to use ``scipy.optimize.minimize_scalar`` with default method ``Brent`` (other options ``Bounded`` and ``Golden``) and accept ``bracket`` option to set initial search region. [11080] - Clarified definition of inputs to ``angular_diameter_distance_z1z2``. The function now emits ``AstropyUserWarning`` when ``z2`` is less than ``z1``. [11197] - Split cosmology realizations from core classes, moving the former to new file ``realizations``. [11345] - Since cosmologies are immutable, the initialization signature and values can be stored, greatly simplifying cloning logic and extending it to user-defined cosmology classes that do not have attributes with the same name as each initialization argument. [11515] - Cloning a cosmology with changed parameter(s) now appends "(modified)" to the new instance's name, unless a name is explicitly passed to ``clone``. [11536] - Allow ``m_nu`` to be input as any quantity-like or array-like -- Quantity, array, float, str, etc. Input is passed to the Quantity constructor and converted to eV, still with the prior mass-energy equivalence enabled. [11640] astropy.io.fits ^^^^^^^^^^^^^^^ - For conversion between FITS tables and astropy ``Table``, the standard mask values of ``NaN`` for float and null string for string are now properly recognized, leading to a ``MaskedColumn`` with appropriately set mask instead of a ``Column`` with those values exposed. Conversely, when writing an astropy ``Table`` to a FITS tables, masked values are now consistently converted to the standard FITS mask values of ``NaN`` for float and null string for string (i.e., not just for tables with ``masked=True``, which no longer is guaranteed to signal the presence of ``MaskedColumn``). [11222] astropy.io.votable ^^^^^^^^^^^^^^^^^^ - The use of ``version='1.0'`` is now fully deprecated in constructing a ``astropy.io.votable.tree.VOTableFile``. [11659] astropy.modeling ^^^^^^^^^^^^^^^^ - Removed deprecated ``astropy.modeling.blackbody`` module. [10972] astropy.table ^^^^^^^^^^^^^ - Added ``Column.value`` as an alias for the existing ``Column.data`` attribute. This makes accessing a column's underlying data array consistent with the ``.value`` attribute available for ``Time`` and ``Quantity`` objects. [10962] - In reading from a FITS tables, the standard mask values of ``NaN`` for float and null string for string are properly recognized, leading to a ``MaskedColumn`` with appropriately set mask. [11222] - Changed the implementation of the ``table.index.Index`` class so instantiating from this class now returns an ``Index`` object as expected instead of a ``SlicedIndex`` object. [11333] astropy.units ^^^^^^^^^^^^^ - The ``physical_type`` attribute of units now returns an instance of ``astropy.units.physical.PhysicalType`` instead of a string. Because ``PhysicalType`` instances can be compared to strings, no code changes should be necessary when making comparisons. The string representations of different physical types will differ from previous releases. [11204] - Calling ``Unit()`` with no argument now returns a dimensionless unit, as was documented but not implemented. [11295] astropy.utils ^^^^^^^^^^^^^ - Removed deprecated ``utils.misc.InheritDocstrings`` and ``utils.timer``. [10281] - Removed usage of deprecated ``ipython`` stream in ``utils.console``. [10942] astropy.wcs ^^^^^^^^^^^ - Deprecate ``accuracy`` argument in ``all_world2pix`` which was mistakenly *documented*, in the case ``accuracy`` was ever used. [11055] Bug Fixes --------- astropy.convolution ^^^^^^^^^^^^^^^^^^^ - Fixes for ``convolve_fft`` documentation examples. [11510] astropy.coordinates ^^^^^^^^^^^^^^^^^^^ - Allow ``Distance`` instances with negative distance values as input for ``SphericalRepresentation``. This was always noted as allowed in an exception message when a negative ``Quantity`` with length units was passed in, but was not actually possible to do. [11113] - Makes the ``Angle.to_string`` method to follow the format described in the docstring with up to 8 significant decimals instead of 4. [11153] - Ensure that proper motions can be calculated when converting a ``SkyCoord`` with cartesian representation to unit-spherical, by fixing the conversion of ``CartesianDifferential`` to ``UnitSphericalDifferential``. [11469] - When re-representing coordinates from spherical to unit-spherical and vice versa, the type of differential will now be preserved. For instance, if only a radial velocity was present, that will remain the case (previously, a zero proper motion component was added). [11482] - Ensure that wrapping of ``Angle`` does not raise a warning even if ``nan`` are present. Also try to make sure that the result is within the wrapped range even in the presence of rounding errors. [11568] - Comparing a non-SkyCoord object to a ``SkyCoord`` using ``==`` no longer raises an error. [11666] - Different ``SkyOffsetFrame`` classes no longer interfere with each other, causing difficult to debug problems with the ``origin`` attribute. The ``origin`` attribute now no longer is propagated, so while it remains available on a ``SkyCoord`` that is an offset, it no longer is available once that coordinate is transformed to another frame. [11730] [11730] astropy.cosmology ^^^^^^^^^^^^^^^^^ - Cosmology instance names are now immutable. [11535] astropy.io.ascii ^^^^^^^^^^^^^^^^ - Fixed bug where writing a table that has comments defined (via ``tbl.meta['comments']``) with the 'csv' format was failing. Since the formally defined CSV format does not support comments, the comments are now just ignored unless ``comment=<comment prefix>`` is supplied to the ``write()`` call. [11475] - Fixed the issue where the CDS reader failed to treat columns as nullable if the ReadMe file contains a limits specifier. [11531] - Made sure that the CDS reader does not ignore an order specifier that may be present after the null specifier '?'. Also made sure that it checks null values only when an '=' symbol is present and reads description text even if there is no whitespace after '?'. [11593] astropy.io.fits ^^^^^^^^^^^^^^^ - Fix ``ColDefs.add_col/del_col`` to allow in-place addition or removal of a column. [11338] - Fix indexing of ``fits.Header`` with Numpy integers. [11387] - Do not delete ``EXTNAME`` for compressed image header if a default and non-default ``EXTNAME`` are present. [11396] - Prevent warnings about ``HIERARCH`` with ``CompImageHeader`` class. [11404] - Fixed regression introduced in Astropy 4.0.5 and 4.2.1 with verification of FITS headers with HISTORY or COMMENT cards with long (> 72 characters) values. [11487] - Fix reading variable-length arrays when there is a gap between the data and the heap. [11688] astropy.io.votable ^^^^^^^^^^^^^^^^^^ - ``NumericArray`` converter now properly broadcasts scalar mask to array. [11157] - VOTables are now written with the correct namespace and schema location attributes. [11659] astropy.modeling ^^^^^^^^^^^^^^^^ - Fixes the improper propagation of ``bounding_box`` from ``astropy.modeling.models`` to their inverses. For cases in which the inverses ``bounding_box`` can be determined, the proper calculation has been implemented. [11414] - Bugfix to allow rotation models to accept arbitrarily-shaped inputs. [11435] - Bugfixes for ``astropy.modeling`` to allow ``fix_inputs`` to accept empty dictionaries and dictionaries with ``numpy`` integer keys. [11443] - Bugfix for how ``SPECIAL_OPERATORS`` are handled. [11512] - Fixes ``Model`` crashes when some inputs are scalars and during some types of output reshaping. [11548] - Fixed bug in ``LevMarLSQFitter`` when using weights and vector inputs. [11603] astropy.stats ^^^^^^^^^^^^^ - Fixed a bug with the ``copy=False`` option when carrying out sigma clipping - previously if ``masked=False`` this still copied the data, but this will now change the array in-place. [11219] astropy.table ^^^^^^^^^^^^^ - Ensure that adding a ``Quantity`` or other mixin column to a ``Table`` does not have side effects, such as creating an associated ``info`` instance (which would lead to slow-down of, e.g., slicing afterwards). [11077] - When writing to a FITS tables, masked values are again always converted to the standard FITS mask values of ``NaN`` for float and null string for string, not just for table with ``masked=True``. [11222] - Using ``Table.to_pandas()`` on an indexed ``Table`` with masked integer values now correctly construct the ``pandas.DataFrame``. [11432] - Fixed ``Table`` HTML representation in Jupyter notebooks so that it is horizontally scrollable within Visual Studio Code. This was done by wrapping the ``<table>`` in a ``<div>`` element. [11476] - Fix a bug where a string-valued ``Column`` that happened to have a ``unit`` attribute could not be added to a ``QTable``. Such columns are now simply kept as ``Column`` instances (with a warning). [11585] - Fix an issue in ``Table.to_pandas(index=<colname>)`` where the index column name was not being set properly for the ``DataFrame`` index. This was introduced by an API change in pandas version 1.3.0. Previously when creating a ``DataFrame`` with the index set to an astropy ``Column``, the ``DataFrame`` index name was automatically set to the column name. [11921] astropy.time ^^^^^^^^^^^^ - Fix a thread-safety issue with initialization of the leap-second table (which is only an issue when ERFA's built-in table is out of date). [11234] - Fixed converting a zero-length time object from UTC to UT1 when an empty array is passed. [11516] astropy.uncertainty ^^^^^^^^^^^^^^^^^^^ - ``Distribution`` instances can now be used as input to ``Quantity`` to initialize ``QuantityDistribution``. Hence, ``distribution * unit`` and ``distribution << unit`` will work too. [11210] astropy.units ^^^^^^^^^^^^^ - Move non-astronomy units from astrophys.py to a new misc.py file. [11142] - The physical type of ``astropy.units.mol / astropy.units.m ** 3`` is now defined as molar concentration. It was previously incorrectly defined as molar volume. [11204] - Make ufunc helper lookup thread-safe. [11226] - Make ``Unit`` string parsing (as well as ``Angle`` parsing) thread-safe. [11227] - Decorator ``astropy.units.decorators.quantity_input`` now only evaluates return type annotations based on ``UnitBase`` or ``FunctionUnitBase`` types. Other annotations are skipped over and are not attempted to convert to the correct type. [11506] astropy.utils ^^^^^^^^^^^^^ - Make ``lazyproperty`` and ``classdecorator`` thread-safe. This should fix a number of thread safety issues. [11224] astropy.visualization ^^^^^^^^^^^^^^^^^^^^^ - Fixed a bug that resulted in some parts of grid lines being visible when they should have been hidden. [11380] - Fixed a bug that resulted in ``time_support()`` failing for intervals of a few months if one of the ticks was the month December. [11615] astropy.wcs ^^^^^^^^^^^ - ``fit_wcs_from_points`` now produces a WCS with integer ``NAXIXn`` values. [10865] - Updated bundled version of ``WCSLIB`` to v7.4, fixing a bug that caused the coefficients of the TPD distortion function to not be written to the header. [11260] - Fixed a bug in assigning type when converting ``colsel`` to ``numpy.ndarray``. [11431] - Added ``WCSCOMPARE_*`` constants to the list of WCSLIB constants available/exposed through the ``astropy.wcs`` module. [11647] - Fix a bug that caused APE 14 WCS transformations for FITS WCS with ZOPT, BETA, VELO, VOPT, or VRAD CTYPE to not work correctly. [11781] Other Changes and Additions --------------------------- - The configuration file is no longer created by default when importing astropy and its existence is no longer required. Affiliated packages should update their ``__init__.py`` module to remove the block using ``update_default_config`` and ``ConfigurationDefaultMissingWarning``. [10877] - Replace ``pkg_resources`` (from setuptools) with ``importlib.metadata`` which comes from the stdlib, except for Python 3.7 where the backport package is added as a new dependency. [11091] - Turn on numpydoc's ``numpydoc_xref_param_type`` to create cross-references for the parameter types in the Parameters, Other Parameters, Returns and Yields sections of the docstrings. [11118] - Docstrings across the package are standardized to enable references. Also added is an Astropy glossary-of-terms to define standard inputs, e.g. ``quantity-like`` indicates an input that can be interpreted by ``astropy.units.Quantity``. [11118] - Binary wheels are now built to the manylinux2010 specification. These wheels should be supported on all versions of pip shipped with Python 3.7+. [11377] - The name of the default branch for the astropy git repository has been renamed to ``main``, and the documentation and tooling has been updated accordingly. If you have made a local clone you may wish to update it following the instructions in the repository's README. [11379] - Sphinx cross-reference link targets are added for every ``PhysicalType``. Now in the parameter types in the Parameters, Other Parameters, Returns and Yields sections of the docstring, the physical type of a quantity can be annotated in square brackets. E.g. `` distance : `~astropy.units.Quantity` ['length'] `` [11595] - The minimum supported version of ``ipython`` is now 4.2. [10942] - The minimum supported version of ``pyerfa`` is now 1.7.3. [11637] ``` ### 4.2.1 ``` ================== Bug Fixes --------- astropy.cosmology ^^^^^^^^^^^^^^^^^ - Fixed an issue where specializations of the comoving distance calculation for certain cosmologies could not handle redshift arrays. [10980] astropy.io.fits ^^^^^^^^^^^^^^^ - Fix bug where manual fixes to invalid header cards were not preserved when saving a FITS file. [11108] astropy.io.votable ^^^^^^^^^^^^^^^^^^ - ``NumericArray`` converter now properly broadcasts scalar mask to array. [11157] astropy.table ^^^^^^^^^^^^^ - Fix bug when initializing a ``Table`` subclass that uses ``TableAttribute``'s. If the data were an instance of the table then attributes provided in the table initialization call could be ignored. [11217] astropy.time ^^^^^^^^^^^^ - Change epoch of ``TimeUnixTAI`` (``"unix_tai"``) from ``1970-01-01T00:00:00 UTC`` to ``1970-01-01T00:00:00 TAI`` to match the intended and documented behaviour. This essentially changes the resulting times by 8.000082 seconds, the initial offset between TAI and UTC. [11249] astropy.units ^^^^^^^^^^^^^ - Fixed a bug with the ``quantity_input`` decorator where allowing dimensionless inputs for an argument inadvertently disabled any checking of compatible units for that argument. [11283] astropy.utils ^^^^^^^^^^^^^ - Fix a bug so that ``np.shape``, ``np.ndim`` and ``np.size`` again work on classes that use ``ShapedLikeNDArray``, like representations, frames, sky coordinates, and times. [11133] astropy.wcs ^^^^^^^^^^^ - Fix error when a user defined ``proj_point`` parameter is passed to ``fit_wcs_from_points``. [11139] Other Changes and Additions --------------------------- - Change epoch of ``TimeUnixTAI`` (``"unix_tai"``) from ``1970-01-01T00:00:00 UTC`` to ``1970-01-01T00:00:00 TAI`` to match the intended and documented behaviour. This essentially changes the resulting times by 8.000082 seconds, the initial offset between TAI and UTC. [11249] ``` ### 4.2 ``` ================ New Features ------------ astropy.convolution ^^^^^^^^^^^^^^^^^^^ - Methods ``convolve`` and ``convolve_fft`` both now return Quantity arrays if user input is given in one. [10822] astropy.coordinates ^^^^^^^^^^^^^^^^^^^ - Numpy functions that broadcast, change shape, or index (like ``np.broadcast_to``, ``np.rot90``, or ``np.roll``) now work on coordinates, frames, and representations. [10337] - Add a new science state ``astropy.coordinates.erfa_astrom.erfa_astrom`` and two classes ``ErfaAstrom``, ``ErfaAstromInterpolator`` as wrappers to the ``pyerfa`` astrometric functions used in the coordinate transforms. Using ``ErfaAstromInterpolator``, which interpolates astrometric properties for ``SkyCoord`` instances with arrays of obstime, can dramatically speed up coordinate transformations while keeping microarcsecond resolution. Depending on needed precision and the obstime array in question, speed ups reach factors of 10x to >100x. [10647] - ``galactocentric_frame_defaults`` can now also be used as a registry, with user-defined parameter values and metadata. [10624] - Method ``.realize_frame`` from coordinate frames now accepts ``**kwargs``, including ``representation_type``. [10727] - Avoid an unnecessary call to ``erfa.epv00`` in transformations between ``CIRS`` and ``ICRS``, improving performance by 50 %. [10814] - A new equatorial coordinate frame, with RA and Dec measured w.r.t to the True Equator and Equinox (TETE). This frame is commonly known as "apparent place" and is the correct frame for coordinates returned from JPL Horizons. [10867] - Added a context manager ``impose_finite_difference_dt`` to the ``TransformGraph`` class to override the finite-difference time step attribute (``finite_difference_dt``) for all transformations in the graph with that attribute. [10341] - Improve performance of ``SpectralCoord`` by refactoring internal implementation. [10398] astropy.cosmology ^^^^^^^^^^^^^^^^^ - The final version of the Planck 2018 cosmological parameters are included as the ``Planck18`` object, which is now the default cosmology. The parameters are identical to those of the ``Planck18_arXiv_v2`` object, which is now deprecated and will be removed in a future release. [10915] astropy.modeling ^^^^^^^^^^^^^^^^ - Added NFW profile and tests to modeling package [10505] - Added missing logic for evaluate to compound models [10002] - Stop iteration in ``FittingWithOutlierRemoval`` before reaching ``niter`` if the masked points are no longer changing. [10642] - Keep a (shallow) copy of ``fit_info`` from the last iteration of the wrapped fitter in ``FittingWithOutlierRemoval`` and also record the actual number of iterations performed in it. [10642] - Added attributes for fitting uncertainties (covariance matrix, standard deviations) to models. Parameter covariance matrix can be accessed via ``model.cov_matrix``, standard deviations by ``model.stds`` or individually for each parameter by ``parameter.std``. Currently implemented for ``LinearLSQFitter`` and ``LevMarLSQFitter``. [10552] - N-dimensional least-squares statistic and specific 1,2,3-D methods [10670]