fix(deps): update dependency astropy to v7 #16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
6.1.7
->7.0.0
Release Notes
astropy/astropy (astropy)
v7.0.0
Compare Source
==========================
New Features
astropy.config
^^^^^^^^^^^^^^
get_config_dir_path
(andget_cache_dir_path
) which is equivalentto
get_config_dir
(respectivelyget_cache_dir
) except that it returns apathlib.Path
object instead ofstr
. [#17118]astropy.coordinates
^^^^^^^^^^^^^^^^^^^
BaseCoordinateFrame
instances such asICRS
,SkyOffsetFrame
, etc.,can now be stored directly in tables (previously, they were stored as
object
type columns). Furthermore, storage in tables is now also possiblefor frames that have no data (but which have attributes with the correct shape
to fit in the table). [#16831]
BaseCoordinateFrame
now has ato_table()
method, which converts theframe to a
QTable
, analogously to theSkyCoord.to_table()
method. [#17009]SkyCoord
, coordinate frames, and representations have all have gained theability to deal with
Masked
data. In general, the procedure is similar tothat of
Time
, except that different representation components do not sharethe mask, to enable holding, e.g., a catalogue of objects in which only some
have associated distances. [#17016]
astropy.io.ascii
^^^^^^^^^^^^^^^^
pathlib.Path
objects inastropy.io.ascii.core.BaseInputter.get_lines
. [#16930]astropy.io.fits
^^^^^^^^^^^^^^^
FITSDiff
output forPrimaryHDU
andImageHDU
to include themaximum relative and absolute differences in the data. [#17097]
astropy.io.misc
^^^^^^^^^^^^^^^
write_table_hdf5()
, now acceptsos.PathLike
objectsas
output
. [#16955]astropy.io.votable
^^^^^^^^^^^^^^^^^^
refposition
attribute ofCOOSYS
. [#16856]astropy.modeling
^^^^^^^^^^^^^^^^
Added
Model.has_tied
,Model.has_fixed
, andModel.has_bounds
attributes to makeit easy to check whether models have various kinds of constraints set without having to
inspect
Model.tied
,Model.fixed
, andModel.bounds
in detail. [#16677]Added a new
parallel_fit_dask
function that can be used to fit models tomany sections (e.g. spectra, image slices) on an N-dimensional array in
parallel. [#16696]
Added a
Lorentz2D
model. [#16800]Added
inplace=False/True
keyword argument to the__call__
method of most fitters,to optionally allow the original model passed to the fitter to be modified with the fitted
values of the parameters, rather than return a copy. This can improve performance if users
don't need to keep hold of the initial parameter values. [#17033]
astropy.stats
^^^^^^^^^^^^^
SigmaClippedStats
convenience class for computing sigma-clippedstatistics. [#17221]
astropy.table
^^^^^^^^^^^^^
Changed a number of dict-like containers in
io.ascii
fromOrderedDict
todict
. Thedict
class maintains key order since Python 3.8 soOrderedDict
isno longer needed. The changes are largely internal and should not affect users in any
way. See also the API change log entry for this PR. [#16250]
Add a
keep_order
argument to theastropy.table.join
function which specifies tomaintain the original order of the key table in the joined output. This applies for
inner, left, and right joins. The default is
False
in which case the output isordered by the join keys, consistent with prior behavior. [#16361]
astropy.units
^^^^^^^^^^^^^
Add a
formatter
argument to theto_string
method of theQuantity
class. Enables custom number formatting with a callable formatter or
format_spec, especially useful for consistent notation. [#16087]
Add the unit foe (or Bethe, equivalent to 1e51 erg), which is often used to
express the energy emitted by a supernova explosion. [#16441]
Add
magnetic_flux_field
equivalency to convert magnetic field betweenmagnetic field strength (H) and magnetic flux density (B). [#16516]
Added SI-units
sievert
,gray
,katal
, andhectare
inastropy.units.si
. [#16729]When parsing invalid unit strings with
u.Unit(..., parse_strict="warn")
oru.Unit(..., parse_strict="silent")
, a normal unit may be returned if theproblem is not too serious.
If parsing the string fails completely then an
UnrecognizedUnit
instance isreturned, just as before. [#16892]
Added a
np.arange
dispatch forQuantity
(requires one to uselike=<some_quantity>
). [#17059]Added support for calling numpy array constructors (
np.empty
,np.ones
,np.zeros
andnp.full
) withlike=Quantity(...)
. [#17120]Added support for calling numpy array constructors (
np.array
,np.asarray
,np.asanyarray
,np.ascontiguousarray
andnp.asfortranarray
) withlike=Quantity(...)
. [#17125]Added support for calling numpy array constructors (
np.frombuffer
,np.fromfile
,np.fromiter
,np.fromstring
andnp.fromfunction
)with
like=Quantity(...))
. [#17128]Added support for calling numpy array constructors (
np.require
,np.identity
,np.eye
,np.tri
,np.genfromtxt
andnp.loadtxt
)with
like=Quantity(...))
. [#17130]astropy.utils
^^^^^^^^^^^^^
Added the
astropy.system_info
function to help document runtime systems inbug reports. [#16335]
Add support for specifying files as
pathlib.Path
objects inIERS_A.read
and
IERS_B.read
. [#16931]astropy.visualization
^^^^^^^^^^^^^^^^^^^^^
Add
make_rgb()
, a conveniencefunction for creating RGB images with independent scaling on each filter.
Refactors
make_lupton_rgb()
to work with instances of subclasses ofBaseStretch
, including the new Lupton-specific classesLuptonAsinhStretch
andLuptonAsinhZscaleStretch
. [#15081]Add support for custom coordinate frames for
WCSAxes
through a contextmanager
astropy.visualization.wcsaxes.custom_ucd_coord_meta_mapping
. [#16347]Added
get_ticks_position
,get_ticklabel_position
, andget_axislabel_position
methods onCoordinateHelper
in WCSAxes. [#16686]Added the ability to disable the automatic simplification of WCSAxes tick labels
by specifying
simplify=False
toset_ticklabel()
for a coordinate axis. [#16938]Added the ability to specify that WCSAxes tick labels always include the sign
(namely for positive values) by starting the format string with a
+
character. [#16985]
Allow
astropy.visualization.units.quantity_support
to be used as adecorator in addition to the already supported use as a context manager. [#17006]
Added the ability to specify a callable function in
CoordinateHelper.set_major_formatter
[#17020]Added a
SimpleNorm
class to create a matplotlib normalization object. [#17217]WCSAxes will now select which axis to draw which tick labels and axis labels on based on the number of drawn tick labels, rather than picking them in the order they are listed in the WCS. This means that axes may be swapped in comparison with previous versions of Astropy by default. [#17243]
API Changes
astropy.coordinates
^^^^^^^^^^^^^^^^^^^
For non-scalar frames without data,
len(frame)
will now return the firstelement of its
shape
, just like for frames with data (or arrays moregenerally). For scalar frames, a
TypeError
will be raised. Both theseinstead of raising a
ValueError
stating the frame has no data. [#16833]The deprecated
coordinates.get_moon()
function has been removed. Usecoordinates.get_body("moon")
instead. [#17046]The deprecated
BaseCoordinateFrame.get_frame_attr_names()
is removed.Use
get_frame_attr_defaults()
instead. [#17252]astropy.cosmology
^^^^^^^^^^^^^^^^^
Passing redshift arguments as keywords is deprecated in many methods. [#16597]
Deprecated
cosmology.utils
module has been removed. Any public API maybe imported directly from the
cosmology
module instead. [#16730]Setting
Ob0 = None
in FLRW cosmologies has been deprecated in favor ofOb0 = 0.0
. Conceptually this is a change in that baryons are now always a component of thecosmology. Practically, the only change (besides that
Ob0
is neverNone
) is thatmethods relying on
Ob0
always work, rather than sometimes raising an exception,instead by default taking the contribution of the baryons to be negligible. [#16847]
astropy.io.ascii
^^^^^^^^^^^^^^^^
Remove all deprecated arguments from functions within
astropy.io.ascii
.read()
:Reader
is removed. Instead supply the equivalentformat
argument.inputter_cls
instead ofInputter
.outputter_cls
instead ofOutputter
.get_reader()
:reader_cls
instead ofReader
.inputter_cls
instead ofInputter
.outputter_cls
instead ofOutputter
.write()
:Writer
is removed. Instead supply the equivalentformat
argument.get_writer()
:writer_cls
instead ofWriter
. [#15758]astropy.io.fits
^^^^^^^^^^^^^^^
The
CompImageHDU
class has been refactored to inherit fromImageHDU
instead of
BinTableHDU
. This change should be for the most part preserve theAPI, but any calls to
isinstance(hdu, BinTableHDU)
will now returnFalse
if
hdu
is aCompImageHDU
whereas before it would have returnedTrue
.In addition, the
uint
keyword argument toCompImageHDU
now defaults toTrue
for consistency withImageHDU
. [#15474]Remove many unintended exports from
astropy.io.fits.hdu.compressed
.The low-level functions
compress_image_data
anddecompress_image_data_section
are now only available at the qualified names
astropy.io.fits.hdu.compressed._tiled_compression.compress_image_data
and
astropy.io.fits.hdu.compressed._tiled_compression.decompress_image_data_section
.The rest of the removed exports are external modules or properly exported
elsewhere in astropy. May break imports in rare cases that relied
on these exports. [#15781]
The
CompImageHeader
class is now deprecated, and headers onCompImageHDU
instances are now plain
Header
instances. If a reserved keyword is set onCompImageHDU.header
, a warning will now be emitted at the point where thefile is written rather than at the point where the keyword is set. [#17100]
_ExtensionHDU
and_NonstandardExtHDU
,(Bin)Table.update
,tile_size
argument forCompImageHDU
. Also specifying an invalidtile_shape
now raises anerror. [#17155]
astropy.io.misc
^^^^^^^^^^^^^^^
"parquet.votable"
is added to read and write a parquet filewith a votable metadata included. [#16375]
astropy.io.votable
^^^^^^^^^^^^^^^^^^
Table.read(..., format='votable')
,votable.parse
andvotable.parse_single_table
now respect thecolumns
argument and will only outputselected columns. Previously, unselected columns would just be masked (and unallocated).
astropy.io.votable.tree.TableElement.create_arrays
also gained acolnumbers
keyword argument to allow column selection. [#15959]
astropy.modeling
^^^^^^^^^^^^^^^^
Subclasses of
_NonLinearLSQFitter
, so any subclasses of the publicLevMarLSQFitter
,TRFLSQFitter
,LMLSQFitter
orDogBoxLSQFitter
, should now accept an additionalfit_param_indices
kwarg in the function signature of theirobjective_function
methods.Nothing is needed to be done with this kwarg, and it might not be set, but it can optionally be passed through to
fitter_to_model_params_array
for a performance improvement.We also recommended accepting all kwargs (with
**kwargs
) in this method so that future additional kwargs do not cause breakage. [#16673]Exception message for when broadcast shapes mismatch has changed.
Previously, it used complicated regex to maintain backward compatibility.
To ease maintenance, this regex has been removed and now directly
passes exception from
numpy.broadcast_shapes
function. [#16770]Using the
LMLSQFitter
fitter with models that have bounds is now deprecated,as support for bounds was very basic. Instead, non-linear fitters with more
sophisticated support for bounds should be used instead. [#16994]
The optional
use_min_max_bounds
keyword argument inTRFLSQFitter
andDogBoxLSQFitter
has now been deprecated and should not be used. Thesefitters handle bounds correctly by default and this keyword argument was only
provided to opt-in to a more basic form of bounds handling. [#16995]
The deprecated
comb()
function has been removed.Use
math.comb()
from the Python standard library instead. [#17248]astropy.stats
^^^^^^^^^^^^^
sigma_clip
andSigmaClip
are not converted tonp.float32
instead offloat
if necessary. [#17116]astropy.table
^^^^^^^^^^^^^
Change the default type for the
meta
attribute inTable
andColumn
(andsubclasses) from
OrderedDict
todict
. Since Python 3.8 thedict
class isordered by default, so there is no need to use
OrderedDict
.In addition the ECSV table writer in
astropy.io.ascii
was updated to consistentlywrite the
meta
attribute as an ordered map using the!!omap
tag. Thisconvention conforms to the ECSV specification and is supported by existing ECSV readers.
Previously the
meta
attribute could be written as an ordinary YAML map, which is notguaranteed to preserve the order of the keys. [#16250]
An exception is now raised when trying to add a multi-dimensional column as an
index via
Table.add_index
. [#16360]Aggregating table groups for
MaskedColumn
no longer convertsfully masked groups to
NaN
, but instead returns a masked element. [#16498]Always use
MaskedQuantity
inQTable
to represent maskedQuantity
data or when the
QTable
is created withmasked=True
. Previously thedefault was to use a normal
Quantity
with amask
attribute of typeFalseArray
as a stub to allow a minimal level of compatibility for certainoperations. This update brings more consistent behavior and fixes functions
like reading of table data from a list of dict that includes quantities with
missing entries, and aggregation of
MaskedQuantity
in table groups. [#16500]Setting an empty table to a scalar no longer raises an exception, but
creates an empty column. This is to support cases where the number of
elements in a table is not known in advance, and could be zero. [#17102]
show_in_notebook
method for Astropy tables has been un-deprecated and the API hasbeen updated to accept a
backend
keyword and require only keyword arguments. The newdefault
backend="ipydatagrid"
relies on an optional dependency,ipydatagrid
. Theprevious default table viewer (prior to v7.0) is still available as
backend="classic"
, but it has been deprecated since v6.1 and will be removed in a future release. [#17165]The default behavior of
Table.pformat
was changed to include all rows and columnsinstead of truncating the outputs to fit the current terminal. The new default
keyword arguments
max_width=-1
andmax_lines=-1
now match those inTable.pformat_all
. Since theTable.pformat_all
method is now redundant, it ispending deprecation. Similarly, the default behavior of
Column.pformat
was changedto include all rows instead of truncating the outputs to fit the current terminal. [#17184]
astropy.time
^^^^^^^^^^^^
Time.ptp
now properly emits a deprecation warning independently of NumPy'sversion. This method was previously deprecated in astropy 6.1, but the warning
was not visible for users that had NumPy 1.x installed. Because of this, the
warning message was updated to state that
Time.ptp
is deprecated sinceversion 7.0 instead. [#17212]
astropy.units
^^^^^^^^^^^^^
The deprecated
Quantity.nansum()
method has been removed. Usenp.nansum
instead. [#15642]The
factor
parameter of thespectral_density
equivalency, the use ofwhich has been discouraged in the documentation since version 0.3, is now
deprecated.
Use the
wav
parameter as aQuantity
, not as a bare unit. [#16343]The
format.Fits
formatter class has been renamed toformat.FITS
and theold name is deprecated.
Specifying the FITS format for converting
Quantity
andUnitBase
instances to and from strings is not affected by this change. [#16455]
Conversion from one unit to another using
old_unit.to(new_unit, value)
no longerconverts
value
automatically to a numpy array, but passes through array duck typessuch as
dask
arrays, with equivalencies properly accounted for. [#16613]The
format_exponential_notation()
method of theBase
unit formatter haschanged.
Any unit formatters that inherit directly from
Base
but have notimplemented their own
format_exponential_notation()
and wish to retainprevious behavior should implement it as:
.. code-block:: python
Any formatters that inherit directly from
Base
and callsuper().format_exponential_notation(val, format_spec)
should instead callformat(val, format_spec)
The specific unit formatters in
astropy.units
and custom formatters thatinherit from any of them are not affected. [#16676]
The deprecated
units.format.Unscaled
has been removed. Useunits.format.Generic
instead. [#16707]
Added a round() dunder method to
Quantity
in order to support the built-in round() function. [#16784]
For
Masked
initialization in which a mask is passed in, ensure that thatmask is combined with any mask present on the input. [#16875]
The
get_format_name()
method ofNamedUnit
and its subclasses isdeprecated.
The
to_string()
method can be used instead. [#16958]The
UnitBase.in_units()
method is deprecated.The
to()
method can be used as a drop-in replacement. [#17121]Unit conversions to a given system with
unit.to_system()
,unit.si
, andunit.cgs
, will now prefer the simplest unit if itis in the given system, rather than prioritizing more complicated
units if those had a base unit component. E.g.,
u.Pa.si
will nowsimply return
Unit("Pa")
rather thanUnit("N / m2")
. However,the case where a unit can be simply described in base units remains
unchanged:
u.Gal.cgs
will still giveUnit("cm / s2")
. [#17122]The
CDS
,OGIP
andVOUnit
unit formatters are now subclasses of theFITS
unit formatter. [#17178]The
eV
andrydberg
units were moved toastropy.units.misc
(fromastropy.units.si
andastropy.units.astrophys
, respectively).Practically, this means that
Unit.to_system(u.si)
no longer includeseV
as a SI-compatible unit. [#17246]astropy.utils
^^^^^^^^^^^^^
IERS_Auto.open()
now always returns a table of typeIERS_Auto
thatcontains the combination of IERS-A and IERS-B data, even if automatic
updating of the IERS-A file is disabled or if downloading the new file fails.
Previously, under those conditions, it would return a table of a different type
(
IERS_B
) with only IERS-B data. [#16187]astropy.utils.check_broadcast
is now deprecated in favor ofnumpy.broadcast_shapes
[#16346]Added a new keyword
pending_warning_type
todeprecated
decorator so downstream developers could customize the type of warning for pending deprecation state. [#16463]The
introspection.resolve_name()
function is deprecated.It is better to use the standard library
importlib
instead. [#16479]format_exception()
is deprecated because it provides little benefit, ifany, over normal Python tracebacks. [#16807]
The
utils.masked
module has gained a mixin class,MaskableShapedLikeNDArray
,as well as two utility functions,
get_data_and_mask
andcombine_masks
,that can help make a container classes carry masked data. Within astropy, these
are now used in the implementation of masks for
Time
. [#16844]The deprecated
compat.override__dir__()
utility has been removed. [#17190]astropy.visualization
^^^^^^^^^^^^^^^^^^^^^
Removed deprecated
exp
attribute in theLogStretch
,InvertedLogStretch
,PowerDistStretch
, andInvertedPowerDistStretch
stretch classes, and thepower
attribute in the
PowerStretch
. Instead, use thea
attribute,which matches the input keyword. [#15751]
Removes the unintended NumPy export previously at
astropy.visualization.np
. [#15781]Accessing or setting the following attributes on
CoordinateHelper
has been deprecated:ticks
ticklabels
axislabels
Setting the following attributes on
CoordinateHelper
directly has been deprecated:parent_axes
parent_map
transform
coord_index
coord_unit
coord_type
(useset_coord_type
instead)coord_wrap
(useset_coord_type
instead)frame
default_label
Accessing or setting the following attributes on
CoordinateHelper
has beenremoved (without deprecation, as these were clearly internal variables):
grid_lines_kwargs
grid_lines
lblinfo
lbl_world
minor_frequency
(there were already public methods to set/get this) [#16685]The deprecated
nsamples
parameter ofZScaleInterval
is removed. [#17186]astropy.wcs
^^^^^^^^^^^
Errors may now occur if a
BaseLowLevelWCS
class definesworld_axis_object_components
which returns values that are not scalars orplain Numpy arrays as per APE 14. [#16287]
WCS.pixel_to_world_values
,WCS.world_to_pixel_values
,WCS.pixel_to_world
andWCS.world_to_pixel
now correctly return NaN values forpixel positions that are outside of
pixel_bounds
. [#16328]Bug Fixes
astropy.io.ascii
^^^^^^^^^^^^^^^^
This PR addresses the issue and improves the functionality. [#15774]
astropy.io.fits
^^^^^^^^^^^^^^^
Fix a number of bugs in
CompImageHDU
:CompImageHDU
objectsCompImageHDU
without data but with compression settings and setting the data later
CompImageHDU
to an existing image header.CompImageHDU.section
on instances that have not yetbeen written to disk
CompImageHDU.header
to be those for theimage HDU instead of for the underlying binary table. [#15474]
Fix a spurious exception when reading integer compressed images with blanks. [#17099]
Fix creating
CompImageHDU
from header with BSCALE/BZERO: keywords are nowignored, as done in
ImageHDU
. [#17237]astropy.io.votable
^^^^^^^^^^^^^^^^^^
Making the "votable.parquet" format available as a reader format to ensure
consistency with the writer formats, even though the format it recognised
automatically by "votable". [#16488]
Explicitly set
usedforsecurity=False
when usinghashlib.md5
. Without this,hashlib.md5
will be blocked in FIPS mode.FIPS (Federal Information Processing Standards) is a set of standards created by NIST (National Institute of Standards and Technology) for US government agencies regarding computer security and interoperability.
This affects validation results ingestion. [#17156]
astropy.modeling
^^^^^^^^^^^^^^^^
units of
dimensionless_unscaled
. [#16829]astropy.stats
^^^^^^^^^^^^^
Fixed accuracy of sigma clipping for large
float32
arrays whenbottleneck
is installed. Performance may be impacted for computationsinvolving arrays with dtype other than
float64
. This change has no impactfor environments that do not have
bottleneck
installed. [#17204]Fix an issue in sigma-clipping where the use of
np.copy()
was causingthe input data mask to be discarded in cases where
grow
was set. [#17402]astropy.table
^^^^^^^^^^^^^
Fix a bug where column names would be lost when instantiating
Table
from a list ofRow
objects. [#15735]Aggregating table groups for
MaskedColumn
now ensures that fully-maskedgroups result in masked elements rather than
NaN
. [#16498]Ensure that tables holding coordinates or representations can also be stacked
if they have zero length. This fix also ensures that the
insert
methodworks correctly with a zero-length table holding a coordinate object. [#17380]
Fixed table aggregate with empty columns when float is present. [#17385]
astropy.units
^^^^^^^^^^^^^
Allow SI-prefixes for radioactivity units
becquerel
andcurie
inastropy.units.si
, conforming to BIPM's guidelines for SI units. [#16529]The OGIP unit parser no longer accepts strings where a component unit is
followed by a parenthesized unit without a separator in between, such as
'm(s)'
or'm(s)**2'
.Such strings are not allowed by the OGIP standard. [#16749]
A few edge cases that could result in a power of a unit to be a numerical value
from
numpy
, instead of the intended Pythonint
,float
orfractions.Fraction
instance, have been fixed. [#16779]The OGIP unit parser now detects negative powers that are not enclosed in
parenthesis.
For example,
u.Unit("s**-1", format="ogip")
now raises an error because theOGIP standard expects the string to be written as
"s**(-1)"
instead, but itis still possible to parse the unit with
u.Unit("s**-1", format="ogip", parse_strict="warn")
orparse_strict="silent"
. [#16788]UnitScaleError
can now be imported from theastropy.units
namespace. [#16861]Parsing custom units with
u.Unit()
using the"vounit"
format now obeysthe
parse_strict
parameter, unless the custom units are made explicit withquotation marks.
For example,
u.Unit("custom_unit", format="vounit")
now raises an error,but
u.Unit("custom_unit", format="vounit", parse_strict="silent")
oru.Unit("'custom_unit'", format="vounit")
do not. [#17232]It is now possible to use
Unit
to create dimensionless units with a scalefactor that is a complex number or a
fractions.Fraction
instance.It was already possible to create such units directly with
CompositeUnit
. [#17355]astropy.utils
^^^^^^^^^^^^^
Fixed the unintended behavior where the IERS-A file bundled in
astropy-iers-data
would be ignored if automatic updating of the IERS-A file were disabled or if downloading the new file failed. [#16187]Ensure
MaskedQuantity
can be initialized with a list of maskedquantities (as long as their shapes match), just like regular
Quantity
andndarray
. [#16503]For
Masked
instances,np.put
,np.putmask
,np.place
andnp.copyto
can now handle putting/copying not justnp.ma.masked
butalso
np.ma.nomask
; for both cases, only the mask of the relevant entrieswill be set. [#17014]
Explicitly set
usedforsecurity=False
when usinghashlib.md5
. Without this,hashlib.md5
will be blocked in FIPS mode.FIPS (Federal Information Processing Standards) is a set of standards created by NIST (National Institute of Standards and Technology) for US government agencies regarding computer security and interoperability.
This affects download caching. [#17156]
Fixed a bug where an old IERS-A table with stale predictive values could trigger
the download of a new IERS-A table even if automatic downloading was disabled. [#17387]
astropy.wcs
^^^^^^^^^^^
RuntimeWarning
inWCS.world_to_array_index
by convertingNaN inputs to int. [#17236]
Performance Improvements
astropy.io.ascii
^^^^^^^^^^^^^^^^
astropy.io.ascii
has been improved. Now the process uses at most10000 lines of the file to check if it matches the format. This behavior can
be configured using the
astropy.io.ascii.conf.guess_limit_lines
configuration item, including disabling the limit entirely. [#16840]
astropy.io.fits
^^^^^^^^^^^^^^^
astropy.modeling
^^^^^^^^^^^^^^^^
Improved the performance of 1D models, models with scalar parameters, and models
without units, when evaluating them with scalar or small arrays of inputs. For
models that satisfy all of the conditions above, the improvement can be on the
order of 30-40% in execution time. [#16670]
Performance of most non-linear fitters has been significantly improved by reducing the overhead in evaluating models inside the objective function. [#16673]
Improved the performance of
parallel_fit_dask
by avoiding unnecessary copies of themodel inside the fitter. [#17033]
CompoundModel
now implements numerical derivatives of parameters when using the +, -, * or / operators. This improves the speed of fitting these models because numerical derivatives of the parameters are not calculated. [#17034]astropy.stats
^^^^^^^^^^^^^
biweight_midvariance, and median_absolute_deviation has been improved by
using the bottleneck nan* functions when available. This requires the
bottleneck optional dependency to be installed. [#16967]
astropy.units
^^^^^^^^^^^^^
The
units.quantity_input
decorator has been optimized, especially in the case that no equivalencies are provided to the decorator, and the speed-up is very noticeable when wrapping short functions. [#16742]Parsing composite units with the OGIP formatter is now up to 25% faster. [#16761]
Parsing units with scale factors is now up to 50% faster. [#16813]
Parsing strings representing non-composite units with
Unit
is now up to 25%faster. [#17004]
Converting composite units to strings with the
"cds"
,"fits"
,"ogip"
and"vounit"
formatters is now at least twice as fast. [#17043]astropy.visualization
^^^^^^^^^^^^^^^^^^^^^
for ticks/gridlines, which speeds up typical plot generation by ~10%, and by
much more if
astropy.visualization.wcsaxes.conf.coordinate_range_samples
isset to a large value [#16366]
Other Changes and Additions
Updated minimum supported Python version to 3.11. As a result, minimum
requirements were updated to compatible versions.
Astropy now requires
numpy>=1.23.2
PyYAML>=6.0.0
packaging>=22.0.0
[#16903]The minimum supported version of Pandas is now v2.0.
This is in line with https://scientific-python.org/specs/spec-0000/. [#16308]
Update minimal recommendation for matplotlib from version 3.3.4 to 3.6.0 [#16557]
The Contributor documentation has been significantly improved. It now includes a
Quickstart Guide with concise instructions on setting up a development environment and
making a pull request. In addition, the developer documentation was reorganized and
simplified where possible to improve readability and accessibility. [#16561]
Configuration
📅 Schedule: Branch creation - "every 4th week on Thursday before 10am" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.