astropy v4.0.5 Release Notes

Release Date: 2021-03-26 // about 3 years ago
  • ๐Ÿ› Bug Fixes

    astropy.io.fits ^

    • ๐Ÿ›  Fix bug where manual fixes to invalid header cards were not preserved when saving a FITS file. [#11108]

    • ๐Ÿ›  Fix parsing of RVKC header card patterns that were not recognised where multiple spaces were separating field-specifier and value like "DP1.AXIS.1: 1". [#11301]

    • ๐Ÿ›  Fix misleading missing END card error when extra data are found at the end of the file. [#11285]

    • ๐Ÿ›  Fix incorrect wrapping of long card values as CONTINUE cards when some words in the value are longer than a single card. [#11304]

    astropy.io.misc ^

    • ๐Ÿ›  Fixed problem when writing serialized metadata to HDF5 using h5py >= 3.0. With the newer h5py this was writing the metadata table as a variable-length string array instead of the previous fixed-length bytes array. Fixed astropy to force using a fixed-length bytes array. [#11359]

    astropy.modeling ^

    • ๐Ÿ”„ Change Voigt1D function to use Humlicek's approximation to avoid serious inaccuracies + option to use (compiled) scipy.special.wofz error function for yet more accurate results. [#11177]

    astropy.table ^

    • ๐Ÿ›  Fixed bug when initializing a Table with a column as list of Quantity, for example Table({'x': [1*u.m, 2*u.m]}). Previously this resulted in an object dtype with no column unit set, but now gives a float array with the correct unit. [#11329]

    • ๐Ÿ›  Fixed byteorder conversion in to_pandas(), which had incorrectly triggered swapping when native endianness was stored with explicit dtype code '<' (or '>') instead of '='. [#11288, #11294]

    • ๐Ÿ›  Fixed a compatibility issue with numpy 1.21. Initializing a Table with a column like ['str', np.ma.masked] was failing in tests due to a change in numpy. [#11364]

    • ๐Ÿ›  Fixed bug when validating the inputs to table.hstack, table.vstack, and table.dstack. Previously, mistakenly calling table.hstack(t1, t2) (instead of table.hstack([t1, t2])) would return t1 instead of raising an exception. [#11336]

    • ๐Ÿ›  Fixed byteorder conversion in to_pandas(), which had incorrectly triggered swapping when native endianness was stored with explicit dtype code '<' (or '>') instead of '='. [#11288]

    astropy.time ^

    • ๐Ÿ›  Fix leap second update when using a non english locale. [#11062]

    • ๐Ÿ›  Fix default assumed location to be the geocenter when transforming times to and from solar-system barycenter scales. [#11134]

    • ๐Ÿ›  Fix inability to write masked times with formatted_value. [#11195]

    astropy.units ^

    • Ensure keepdims works for taking mean, std, and var of Quantity. [#11198]

    • For Quantity.to_string(), ensure that the precision argument is also used when the format is not latex. [#11145]

    astropy.wcs ^

    • ๐Ÿ‘ Allow "un-setting" of auxiliary WCS parameters in the aux attribute of Wcsprm. [#11166]