jason-neal / companion_simulations

Simulating combined host+companion spectra, and fitting to observed crires spectra.
MIT License
2 stars 0 forks source link

Scheduled monthly dependency update for March #64

Closed pyup-bot closed 5 years ago

pyup-bot commented 5 years ago

Update astropy from 3.0.4 to 3.1.2.

Changelog ### 3.1.2 ``` ================== Bug fixes --------- astropy.config ^^^^^^^^^^^^^^ astropy.constants ^^^^^^^^^^^^^^^^^ astropy.convolution ^^^^^^^^^^^^^^^^^^^ astropy.coordinates ^^^^^^^^^^^^^^^^^^^ - Convert the default of ``QuantityAttribute``, thereby catching the error case case of it being set to None at attribute creation, and giving a more useful error message in the process. [8300] astropy.cosmology ^^^^^^^^^^^^^^^^^ astropy.extern ^^^^^^^^^^^^^^ astropy.io.ascii ^^^^^^^^^^^^^^^^ astropy.io.misc ^^^^^^^^^^^^^^^ astropy.io.fits ^^^^^^^^^^^^^^^ astropy.io.registry ^^^^^^^^^^^^^^^^^^^ astropy.io.votable ^^^^^^^^^^^^^^^^^^ astropy.modeling ^^^^^^^^^^^^^^^^ - Fixed slowness for certain compound models consisting of large numbers of multi-input models [8338, 8349] astropy.nddata ^^^^^^^^^^^^^^ astropy.samp ^^^^^^^^^^^^ astropy.stats ^^^^^^^^^^^^^ astropy.table ^^^^^^^^^^^^^ astropy.tests ^^^^^^^^^^^^^ astropy.time ^^^^^^^^^^^^ astropy.uncertainty ^^^^^^^^^^^^^^^^^^^ astropy.units ^^^^^^^^^^^^^ astropy.utils ^^^^^^^^^^^^^ astropy.visualization ^^^^^^^^^^^^^^^^^^^^^ astropy.visualization.wcsaxes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Fix a bug that caused an error when passing an array with all values the same to contour or contourf. [8321] - Fix a bug that caused contour and contourf to return None instead of the contour set. [8321] astropy.wcs ^^^^^^^^^^^ Other Changes and Additions --------------------------- ``` ### 3.1.1 ``` ================== Bug fixes --------- astropy.io.ascii ^^^^^^^^^^^^^^^^ - Fix error when writing out empty table. [8279] astropy.io.fits ^^^^^^^^^^^^^^^ - ``fitsdiff --ignore-hdus`` now prints input filenames in the diff report instead of ``<HDUList object at 0x1150f9778>``. [8295] astropy.units ^^^^^^^^^^^^^ - Ensure correctness of units when raising to a negative power. [8263] - Fix ``with_H0`` equivalency to use the correct direction of conversion. [8292] ``` ### 3.1 ``` ================ New Features ------------ astropy.convolution ^^^^^^^^^^^^^^^^^^^ - ``convolve`` now accepts any array-like input, not just ``numpy.ndarray`` or lists. [7303] - ``convolve`` Now raises AstropyUserWarning if nan_treatment='interpolate' and preserve_nan=False and NaN values are present post convolution. [8088] astropy.coordinates ^^^^^^^^^^^^^^^^^^^ - The ``SkyCoord.from_name`` constructor now has the ability to create coordinate objects by parsing object catalogue names that have embedded J-coordinates. [7830] - The new function ``make_transform_graph_docs`` can be used to create a docstring graph from a custom ``TransformGraph`` object. [7135] - ``KDTree`` for catalog matching is now built with sliding midpoint rule rather than standard. In code, this means setting ``compact_nodes=False`` and ``balanced_tree=False`` in ``cKDTree``. The sliding midpoint rule is much more suitable for catalog matching, and results in 1000x speedup in some cases. [7324] - Additional information about a site loaded from the Astropy sites registry is now available in ``EarthLocation.info.meta``. [7857] - Added a ``concatenate_representations`` function to combine coordinate representation data and any associated differentials. [7922] - ``BaseCoordinateFrame`` will now check for a method named ``_astropy_repr_in_frame`` when constructing the string forms of attributes. Allowing any class to control how ``BaseCoordinateFrame`` represents it when it is an attribute of a frame. [7745] - Some rarely-changed attributes of frame classes are now cached, resulting in speedups (up to 50% in some cases) when creating new scalar frame or ``SkyCoord`` objects. [7949, 5952] - Added a ``directional_offset_by`` method to ``SkyCoord`` that computes a new coordinate given a coordinate, position angle, and angular separation [5727] astropy.cosmology ^^^^^^^^^^^^^^^^^ - The default cosmology has been changed from ``WMAP9`` to ``Planck15``. [8123] - Distance calculations with ``LambaCDM`` with no radiation (T_CMB0=0) are now 20x faster by using elliptic integrals for non-flat cases. [7155] - Distance calculations with ``FlatLambaCDM`` with no radiation (T_CMB0=0) are now 20x faster by using the hypergeometric function solution for this special case. [7087] - Age calculations with ``FlatLambdaCDM`` with no radiation (Tcmb0=0) are now 1000x faster by using analytic solutions instead of integrating. [7117] astropy.io.ascii ^^^^^^^^^^^^^^^^ - Latex reader now ignores ``\toprule``, ``\midrule``, and ``\bottomrule`` commands. [7349] - Added the RST (Restructured-text) table format and the fast version of the RDB reader to the set of formats that are guessed by default. [5578] - The read trace (used primarily for debugging) now includes guess argument sets that were skipped entirely e.g. for not supporting user-supplied kwargs. All guesses thus removed from ``filtered_guess_kwargs`` are now listed as "Disabled" at the beginning of the trace. [5578] - Emit a warning when reading an ECSV file without specifying the ``format`` and without PyYAML installed. Previously this silently fell through to parsing as a basic format file and the file metadata was lost. [7580] - Optionally allow writing masked columns to ECSV with the mask explicitly specified as a separate column instead of marking masked elements with "" (empty string). This allows handling the case of a masked string column with "" data rows. [7481] astropy.io.misc ^^^^^^^^^^^^^^^ - Added support for saving all representation classes and many coordinate frames to the asdf format. [7079] - Added support for saving models with units to the asdf format. [7237] - Added a new ``character_as_bytes`` keyword to the HDF5 Table reading function to control whether byte string columns in the HDF5 file are left as bytes or converted to unicode. The default is to read as bytes (``character_as_bytes=True``). [7024, 8017] astropy.io.fits ^^^^^^^^^^^^^^^ - ``HDUList.pop()`` now accepts string and tuple extension name specifications. [7236] - Add an ``ignore_hdus`` keyword to ``FITSDiff`` to allow ignoring HDUs by NAME when diffing two FITS files [7538] - Optionally allow writing masked columns to FITS with the mask explicitly specified as a separate column instead of using the FITS standard of certain embedded null values (``NaN`` for float, ``TNULL`` for integers). This can be used to work around limitations in the FITS standard. [7481] - All time coordinates can now be written to and read from FITS binary tables, including those with vectorized locations. [7430] - The ``fitsheader`` command line tool now supports a ``dfits+fitsort`` mode, and the dotted notation for keywords (e.g. ``ESO.INS.ID``). [7240] - Fall back to reading arrays using mode='denywrite' if mode='readonly' fails when using memory-mapping. This solves cases on some platforms when the available address space was less than the file size (even when using memory mapping). [7926] astropy.modeling ^^^^^^^^^^^^^^^^ - Add a ``Multiply`` model which preserves unit through evaluate, unlike ``Scale`` which is dimensionless. [7210] - Add a ``uses_quantity`` property to ``Model`` which allows introspection of if the ``Model`` can accept ``Quantity`` objects. [7417] - Add a ``separability_matrix`` function which returns the correlation matrix of inputs and outputs. [7803] - Fixed compatibility of ``JointFitter`` with the latest version of Numpy. [7984] - Add ``prior`` and ``posterior`` constraints to modeling parameters. These are not used by any current fitters, but are provided to allow user code to experiment with Bayesian fitters. [7558] astropy.nddata ^^^^^^^^^^^^^^ - ``NDUncertainty`` objects now have a ``quantity`` attribute for simple conversion to quantities. [7704] - Add a ``bitmask`` module that provides functions for manipulating bitmasks and data quality (DQ) arrays. [7944] astropy.stats ^^^^^^^^^^^^^ - Add an ``astropy.stats.bls`` module with an implementation of the "box least squares" periodogram that is commonly used for discovering transiting exoplanets and eclipsing binaries. [7391] astropy.table ^^^^^^^^^^^^^ - Added support for full use of ``Time`` mixin column for join, hstack, and vstack table operations. [6888] - Added a new table index engine, ``SCEngine``, based on the Sorted Containers package. [7574] - Add a new keyword argument ``serialize_method`` to ``Table.write`` to control how ``Time`` and ``MaskedColumn`` columns are written. [7481] - Allow mixin columns to be used in table ``group`` and ``unique`` functions. This applies to both the key columns and the other data columns. [7712] - Added support for stacking ``Column``, mixin column (e.g. ``Quantity``, ``Time``) or column-like objects. [7674] - Added support for inserting a row into a Table that has ``Time`` or ``TimeDelta`` column(s). [7897] astropy.tests ^^^^^^^^^^^^^ - Added an option ``--readonly`` to the test command to change the permissions on the temporary installation location to read-only. [7598] astropy.time ^^^^^^^^^^^^ - Allow array-valued ``Time`` object to be modified in place. [6028] - Added support for missing values (masking) to the ``Time`` class. [6028] - Added supper for a 'local' time scale (for free-running clocks, etc.), and round-tripping to the corresponding FITS time scale. [7122] - Added `datetime.timedelta` format class for ``TimeDelta``. [7441] - Added ``strftime`` and ``strptime`` methods to ``Time`` class. These methods are similar to those in the Python standard library `time` package and provide flexible input and output formatting. [7323] - Added ``datetime64`` format to the ``Time`` class to support working with ``numpy.datetime64`` dtype arrays. [7361] - Add fractional second support for ``strftime`` and ``strptime`` methods of ``Time`` class. [7705] - Added an ``insert`` method to allow inserting one or more values into a ``Time`` or ``TimeDelta`` object. [7897] - Remove timescale from string version of FITS format time string. The timescale is not part of the FITS standard and should not be included. This change may cause some compatibility issues for code that relies on round-tripping a FITS format string with a timescale. Strings generated from previous versions of this package are still understood but a DeprecationWarning will be issued. [7870] astropy.uncertainty ^^^^^^^^^^^^^^^^^^^ - This sub-package was added as a "preview" (i.e. API unstable), containing the ``Distribution`` class and associated convenience functions. [6945] astropy.units ^^^^^^^^^^^^^ - Add complex numbers support for ``Quantity._repr_latex_``. [7676] - Add ``thermodynamic_temperature`` equivalency to convert between Jy/sr and "thermodynamic temperature" for cosmology. [7054] - Add millibar unit. [7863] - Add maggy and nanomaggy unit, as well as associated ``zero_point_flux`` equivalency. [7891] - ``AB`` and ``ST`` are now enabled by default, and have alternate names ``ABflux`` and ``STflux``. [7891] - Added ``littleh`` unit and associated ``with_H0`` equivalency. [7970] astropy.visualization ^^^^^^^^^^^^^^^^^^^^^ - Added ``imshow_norm`` function, which combines imshow and creation of a ``ImageNormalize`` object. [7785] astropy.visualization.wcsaxes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Add support for setting ``set_separator(None)`` in WCSAxes to use default separators. [7570] - Added two keyword argument options to ``CoordinateHelper.set_format_unit``: ``decimal`` can be used to specify whether to use decimal formatting for the labels (by default this is False for degrees and hours and True otherwise), and ``show_decimal_unit`` can be used to determine whether the units should be shown for decimal labels. [7318] - Added documentation for ``transform=`` and ``coord_meta=``. [7698] - Allow ``coord_meta=`` to optionally include ``format_unit=``. [7848] - Add support for more rcParams related to the grid, ticks, and labels, and should work with most built-in Matplotlib styles. [7961] - Improved rendering of outward-facing ticks. [7961] - Add support for ``tick_params`` (which is a standard Matplotlib function/method) on both the ``WCSAxes`` class and the individual ``CoordinateHelper`` classes. Note that this is provided for compatibility with Matplotlib syntax users may be familiar with, but it is not the preferred way to change settings. Instead, methods such as ``set_ticks`` should be preferred. [7969] - Moved the argument ``exclude_overlapping`` from ``set_ticks`` to ``set_ticklabel``. [7969] - Added a ``pad=`` argument to ``set_ticklabel`` to provide a way to control the padding between ticks and tick labels. [7969] - Added support for setting the tick direction in ``set_ticks`` using the ``direction=`` keyword argument. [7969] astropy.wcs ^^^^^^^^^^^ - Map ITRS frames to terrestrial WCS coordinates. This will make it possible to use WCSAxes to make figures that combine both celestial and terrestrial features. An example is plotting the coordinates of an astronomical transient over an all- sky satellite image to illustrate the position relative to the Earth at the time of the event. The ITRS frame is identified with WCSs that use the ``TLON-`` and ``TLAT-`` coordinate types. There are several examples of WCSs where this syntax is used to describe terrestrial coordinate systems: Section 7.4.1 of `WCS in FITS "Paper II" <http://adsabs.harvard.edu/abs/2002A%26A...395.1077C>`_ and the `WCSTools documentation <http://tdc-www.harvard.edu/software/wcstools/wcstools.multiwcs.html>`_. [6990] - Added the abstract base class for the low-level WCS API described in APE 14 (https://doi.org/10.5281/zenodo.1188875). [7325] - Add ``WCS.contains()`` function to check if the WCS footprint contains a given sky coordinate. [7273] - Added the abstract base class for the high-level WCS API described in APE 14 (https://doi.org/10.5281/zenodo.1188875). [7325] - Added the high-level wrapper class for low-level WCS objects as described in APE 14 (https://doi.org/10.5281/zenodo.1188875). [7326] - Added a new property ``WCS.has_distortion``. [7326] - Deprecated ``_naxis1`` and ``_naxis2`` in favor of ``pixel_shape``. [7973] - Added compatibility to wcslib version 6. [8093] API Changes ----------- astropy.convolution ^^^^^^^^^^^^^^^^^^^ - ``kernel`` can now be a tuple. [7561] - Not technically an API changes, however, the doc string indicated that ``boundary=None`` was the default when actually it is ``boundary='fill'``. The doc string has been corrected, however, someone may interpret this as an API change not realising that nothing has actually changed. [7293] - ``interpolate_replace_nans()`` can no longer accept the keyword argument ``preserve_nan``. It is explicitly set to ``False``. [8088] astropy.coordinates ^^^^^^^^^^^^^^^^^^^ - Fixed ``astropy.coordinates.concatenate`` to include velocity data in the concatenation. [7922] - Changed the name of the single argument to ``Frame.realize_frame()`` from the (incorrect) ``representation_type`` to ``data``. [7923] - Negative parallaxes passed to ``Distance()`` now raise an error by default (``allow_negative=False``), or are converted to NaN values with a warning (``allow_negative=True``). [7988] - Negating a ``SphericalRepresentation`` object now changes the angular coordinates (by rotating 180º) instead of negating the distance. [7988] - Creation of new frames now generally creates copies of frame attributes, rather than inconsistently either copying or making references. [8204] - The frame class method ``is_equivalent_frame`` now checks for equality of components to determine if a frame is the same when it has frame attributes that are representations, rather than checking if they are the same object. [8218] astropy.io.ascii ^^^^^^^^^^^^^^^^ - If a fast reader is explicitly selected (e.g. ``fast_reader='force'``) and options which are incompatible with the fast reader are provided (e.g. ``quotechar=''``) then now a ``ParameterError`` exception will be raised. [5578] - The fast readers will now raise ``InconsistentTableError`` instead of ``CParserError`` if the number of data and header columns do not match. [5578] - Changed a number of ``ValueError`` exceptions to ``InconsistentTableError`` in places where the exception is related to parsing a table which is inconsistent with the specified table format. Note that ``InconsistentTableError`` inherits from ``ValueError`` so no user code changes are required. [7425] astropy.io.fits ^^^^^^^^^^^^^^^ - The ``fits.table_to_hdu()`` function will translate any column ``format`` attributes to a TDISPn format string, if possible, and store it as a TDISPn keyword in the ``HDU`` header. [7226] astropy.modeling ^^^^^^^^^^^^^^^^ - Change the order of the return values from ``FittingWithOutlierRemoval``, such that ``fitted_model`` comes first, for consistency with other fitters. For the second value, return only a boolean outlier ``mask``, instead of the previous ``MaskedArray`` (which included a copy of the input data that was both redundant and inadvertently corrupted at masked points). Return a consistent type for the second value when ``niter=0``. [7407] - Set the minimum value for the ``bolometric_flux`` parameter of the ``BlackBody1D`` model to zero. [7045] astropy.nddata ^^^^^^^^^^^^^^ - Add two new uncertainty classes, ``astropy.nddata.VarianceUncertainty`` and ``astropy.nddata.InverseVariance``. [6971] astropy.stats ^^^^^^^^^^^^^ - String values can now be used for the ``cenfunc`` and ``stdfunc`` keywords in the ``SigmaClip`` class and ``sigma_clip`` and ``sigma_clipped_stats`` functions. [7478] - The ``SigmaClip`` class and ``sigma_clip`` and ``sigma_clipped_stats`` functions now have a ``masked`` keyword, which can be used to return either a masked array (default) or an ndarray with the min/max values. [7478] - The ``iters`` keyword has been renamed (and deprecated) to ``maxiters`` in the ``SigmaClip`` class and ``sigma_clip`` and ``sigma_clipped_stats`` functions. [7478] astropy.table ^^^^^^^^^^^^^ - ``Table.read()`` on a FITS binary table file will convert any TDISPn header keywords to a Python formatting string when possible, and store it in the column ``format`` attribute. [7226] - No values provided to stack will now raise ``ValueError`` rather than ``TypeError``. [7674] astropy.tests ^^^^^^^^^^^^^ - ``from astropy.tests.helper import *`` no longer includes ``quantity_allclose``. However, ``from astropy.tests.helper import quantity_allclose`` would still work. [7381] - ``warnings_to_ignore_by_pyver`` option in ``enable_deprecations_as_exceptions()`` now takes ``None`` as key. Any deprecation message that is mapped to ``None`` will be ignored regardless of the Python version. [7790] astropy.time ^^^^^^^^^^^^ - Added the ability to use ``local`` as time scale in ``Time`` and ``TimeDelta``. [6487] - Comparisons, addition, and subtraction of ``Time`` instances with non-time instances will now return ``NotImplemented`` rather than raise the ``Time``-specific ``OperandTypeError``. This will generally lead to a regular ``TypeError``. As a result, ``OperandTypeError`` now only occurs if the operation is between ``Time`` instances of incompatible type or scale. [7584] astropy.units ^^^^^^^^^^^^^ - In ``UnitBase.compose()``, if a sequence (list|tuple) is passed in to ``units``, the default for ``include_prefix_units`` is set to `True`, so that no units get ignored. [6957] - Negative parallaxes are now converted to NaN values when using the ``parallax`` equivalency. [7988] astropy.utils ^^^^^^^^^^^^^ - ``InheritDocstrings`` now also works on class properties. [7166] - ``diff_values()``, ``report_diff_values()``, and ``where_not_allclose()`` utility functions are moved from ``astropy.io.fits.diff``. [7444] - ``invalidate_caches()`` has been removed from the ``astropy.utils.compat`` namespace, use it directly from ``importlib``. [7872] astropy.visualization ^^^^^^^^^^^^^^^^^^^^^ - In ``ImageNormalize``, the default for ``clip`` is set to ``True``. [7800] - Changed ``AsymmetricPercentileInterval`` and ``MinMaxInterval`` to ignore NaN values in arrays. [7360] - Automatically default to using ``grid_type='contours'`` in WCSAxes when using a custom ``Transform`` object if the transform has no inverse. [7847] Performance Improvements ------------------------ - Reduced import time by more cautious use of the standard library. [7647] astropy.convolution ^^^^^^^^^^^^^^^^^^^ - Major performance overhaul to ``convolve()``. [7293] - ``convolve()``: Boundaries ``fill``, ``extend``, and ``wrap`` now use a single implementation that pads the image with the correct boundary values before convolving. The runtimes of these three were significantly skewed. They now have equivalent runtimes that are also faster than before due to performant contiguous memory access. However, this does increase the memory footprint as an entire new image array is required plus that needed for the padded region.[7293] - ``convolve()``: Core computation ported from Cython to C. Several optimization techniques have been implemented to achieve performance gains, e.g. compiler hoisting, and vectorization, etc. Compiler optimization level ``-O2`` required for hoisting and ``-O3`` for vectorization. [7293] - ``convolve()``: ``nan_treatment=‘interpolate’`` was slow to compute irrespective of whether any NaN values exist within the array. The input array is now checked for NaN values and interpolation is disabled if non are found. This is a significant performance boost for arrays without NaN values. [7293] astropy.coordinates ^^^^^^^^^^^^^^^^^^^ - Sped up creating SkyCoord objects by a factor of ~2 in some cases. [7615] - Sped up getting xyz vectors from ``CartesianRepresentation`` (which is used a lot internally). [7638] - Sped up transformations and some representation methods by replacing python code with (compiled) ``erfa`` ufuncs. [7639] - Sped up adding differential (velocity) data to representations by a factor of ~20, which improves the speed of frame and SkyCoord initialization. [7924] - Refactored ``SkyCoord`` initializer to improve performance and code clarity. [7958] - Sped up initialization of ``Longitude`` by ~40%. [7616] astropy.stats ^^^^^^^^^^^^^ - The ``SigmaClip`` class and ``sigma_clip`` and ``sigma_clipped_stats`` functions are now significantly faster. [7478] - A Cython implementation for `astropy.stats.kuiper_two` and a vectorized implementation for `astropy.stats.kuiper_false_positive_probability` have been added, speeding up both functions. [8104] astropy.units ^^^^^^^^^^^^^ - Sped up creating new composite units, and raising units to some power [7549, 7649] - Sped up Unit.to when target unit is the same as the original unit. [7643] - Lazy-load ``scipy.special`` to shorten ``astropy.units`` import time. [7636] astropy.visualization ^^^^^^^^^^^^^^^^^^^^^ - Significantly sped up drawing of contours in WCSAxes. [7568] Bug Fixes --------- astropy.convolution ^^^^^^^^^^^^^^^^^^^ - Fixed bug in ``convolve_fft`` where masked input was copied with ``numpy.asarray`` instead of ``numpy.asanyarray``. ``numpy.asarray`` removes the mask subclass causing ``numpy.ma.ismasked(input)`` to fail, causing ``convolve_fft`` to ignore all masked input. [8137] - Remove function side-effects of input data from ``convolve_fft``. It was possible for input data to remain modified if particular exceptions were raised. [8152] astropy.coordinates ^^^^^^^^^^^^^^^^^^^ - ``EarthLocation.of_address`` now uses the OpenStreetMap geocoding API by default to retrieve coordinates, with the Google API (which now requires an API key) as an option. [7918] - Fixed a bug that caused frame objects with NaN distances to have NaN sky positions, even if valid sky coordinates were specified. [7988] - Fixed ``represent_as()`` to not round-trip through cartesian if the same representation class as the instance is passed in. [7988] astropy.io.ascii ^^^^^^^^^^^^^^^^ - Fixed a problem when ``guess=True`` that ``fast_reader`` options could be dropped after the first fast reader class was tried. [5578] - Units in CDS-formatted tables are now parsed correctly by the units module. [7348] astropy.io.misc ^^^^^^^^^^^^^^^ - Fixed bug when writing a table with masked columns to HDF5. Previously the mask was being silently dropped. If the ``serialize_meta`` option is enabled the data mask will now be written as an additional column and the masked columns will round-trip correctly. [7481] - Fixed a bug where writing to HDF5 failed for for tables with columns of unicode strings. Now those columns are first encoded to UTF-8 and written as byte strings. [7024, 8017] - Fixed a bug with serializing the bounding_box of models initialized with ``Quantities`` . [8052] astropy.io.fits ^^^^^^^^^^^^^^^ - Added support for ``copy.copy`` and ``copy.deepcopy`` for ``HDUList``. [7218] - Override ``HDUList.copy()`` to return a shallow HDUList instance. [7218] astropy.modeling ^^^^^^^^^^^^^^^^ - Fix behaviour of certain models with units, by making certain unit-related attributes readonly. [7210] - Fixed an issue with validating a ``bounding_box`` whose items are ``Quantities``. [8052] - Fix ``Moffat1D`` and ``Moffat2D`` derivatives. [8108] astropy.nddata ^^^^^^^^^^^^^^ - Fixed rounding behavior in ``overlap_slices`` for even-sized small arrays. [7859] - Added support for pickling ``NDData`` instances that have an uncertainty. [7383] astropy.stats ^^^^^^^^^^^^^ - Fix errors in ``kuiper_false_positive_probability``. [7975] astropy.tests ^^^^^^^^^^^^^ - Fixing bug that prevented to run the doctests on only a single rst documentation file rather than all of them. [8055] astropy.time ^^^^^^^^^^^^ - Fix a bug when setting a ``TimeDelta`` array item with plain float value(s). This was always interpreted as a JD (day) value regardless of the ``TimeDelta`` format. [7990] astropy.units ^^^^^^^^^^^^^ - To simplify fast creation of ``Quantity`` instances from arrays, one can now write ``array << unit`` (equivalent to ``Quantity(array, unit, copy=False)``). If ``array`` is already a ``Quantity``, this will convert the quantity to the requested units; in-place conversion can be done with ``quantity <<= unit``. [7734] astropy.utils ^^^^^^^^^^^^^ - Fixed a bug due to which ``report_diff_values()`` was reporting incorrect number of differences when comparing two ``numpy.ndarray``. [7470] - The download progress bar is now only displayed in terminals, to avoid polluting piped output. [7577] - Ignore URL mirror caching when there is no internet. [8163] astropy.visualization ^^^^^^^^^^^^^^^^^^^^^ - Right ascension coordinates are now shown in hours by default, and the ``set_format_unit`` method on ``CoordinateHelper`` now works correctly with angle coordinates. [7215] Other Changes and Additions --------------------------- - The documentation build now uses the Sphinx configuration from sphinx-astropy rather than from astropy-helpers. [7139] - Versions of Numpy <1.13 are no longer supported. [7058] - Running tests now suppresses the output of the installation stage by default, to allow easier viewing of the test results. To re-enable the output as before, use ``python setup.py test --verbose-install``. [7512] - The ERFA functions are now wrapped in ufuncs instead of custom C code, leading to some speed improvements, and setting the stage for allowing overrides with ``__array_ufunc__``. [7502] - Updated the bundled CFITSIO library to 3.450. See ``cextern/cfitsio/docs/changes.txt`` for additional information. [8014] - The ``representation`` keywords in coordinate frames are now deprecated in favor of the ``representation_type`` keywords (which are less ambiguously named). [8119] ``` ### 3.0.5 ``` ================== Bug Fixes --------- astropy.coordinates ^^^^^^^^^^^^^^^^^^^ - Fixed bug in which consecutive ``StaticMatrixTransform``'s in a frame transform path would be combined in the incorrect order. [7707] astropy.tests ^^^^^^^^^^^^^ - Fixing bug that doctests were not picked up from the narrative documentation when tests were run for all modules. [7767] ```
Links - PyPI: https://pypi.org/project/astropy - Changelog: https://pyup.io/changelogs/astropy/ - Homepage: http://astropy.org

Update matplotlib from 3.0.0 to 3.0.3.

Changelog
Links - PyPI: https://pypi.org/project/matplotlib - Changelog: https://pyup.io/changelogs/matplotlib/ - Homepage: http://matplotlib.org

Update joblib from 0.12.5 to 0.13.2.

Changelog ### 0.13.2 ``` -------------- Pierre Glaser Upgrade to cloudpickle 0.8.0 Add a non-regression test related to joblib issues 836 and 833, reporting that cloudpickle versions between 0.5.4 and 0.7 introduced a bug where global variables changes in a parent process between two calls to joblib.Parallel would not be propagated into the workers ``` ### 0.13.1 ``` -------------- Pierre Glaser Memory now accepts pathlib.Path objects as ``location`` parameter. Also, a warning is raised if the returned backend is None while ``location`` is not None. Olivier Grisel Make ``Parallel`` raise an informative ``RuntimeError`` when the active parallel backend has zero worker. Make the ``DaskDistributedBackend`` wait for workers before trying to schedule work. This is useful in particular when the workers are provisionned dynamically but provisionning is not immediate (for instance using Kubernetes, Yarn or an HPC job queue). ``` ### 0.13.0 ``` -------------- Thomas Moreau Include loky 2.4.2 with default serialization with ``cloudpickle``. This can be tweaked with the environment variable ``LOKY_PICKLER``. Thomas Moreau Fix nested backend in SequentialBackend to avoid changing the default backend to Sequential. (792) Thomas Moreau, Olivier Grisel Fix nested_backend behavior to avoid setting the default number of workers to -1 when the backend is not dask. (784) ```
Links - PyPI: https://pypi.org/project/joblib - Changelog: https://pyup.io/changelogs/joblib/ - Docs: https://joblib.readthedocs.io

Update numba from 0.40.0 to 0.42.1.

Changelog ### 0.42.0 ``` -------------- In this release the major features are: - The capability to launch and attach the GDB debugger from within a jitted function. - The upgrading of LLVM to version 7.0.0. We added a draft of the project roadmap to the developer manual. The roadmap is for informational purposes only as priorities and resources may change. Here are some enhancements from contributed PRs: - 3532. Daniel Wennberg improved the ``cuda.{pinned, mapped}`` API so that the associated memory is released immediately at the exit of the context manager. - 3531. Dimitri Vorona enabled the inlining of jitclass methods. - 3516. Simon Perkins added the support for passing numpy dtypes (i.e. ``np.dtype("int32")``) and their type constructor (i.e. ``np.int32``) into a jitted function. - 3509. Rob Ennis added support for ``np.corrcoef``. A regression issue (3554, 3461) relating to making an empty slice in parallel mode is resolved by 3558. General Enhancements: * PR 3392: Launch and attach gdb directly from Numba. * PR 3437: Changes to accommodate LLVM 7.0.x * PR 3509: Support for np.corrcoef * PR 3516: Typeof dtype values * PR 3520: Fix stencil ignoring cval if out kwarg supplied. * PR 3531: Fix jitclass method inlining and avoid unnecessary increfs * PR 3538: Avoid future C-level assertion error due to invalid visibility * PR 3543: Avoid implementation error being hidden by the try-except * PR 3544: Add `long_running` test flag and feature to exclude tests. * PR 3549: ParallelAccelerator caching improvements * PR 3558: Fixes array analysis for inplace binary operators. * PR 3566: Skip alignment tests on armv7l. * PR 3567: Fix unifying literal types in namedtuple * PR 3576: Add special copy routine for NumPy out arrays * PR 3577: Fix example and docs typos for `objmode` context manager. reorder statements. * PR 3580: Use alias information when determining whether it is safe to * PR 3583: Use `ir.unknown_loc` for unknown `Loc`, as 3390 with tests * PR 3587: Fix llvm.memset usage changes in llvm7 * PR 3596: Fix Array Analysis for Global Namedtuples * PR 3597: Warn users if threading backend init unsafe. * PR 3605: Add guard for writing to read only arrays from ufunc calls * PR 3606: Improve the accuracy of error message wording for undefined type. * PR 3611: gdb test guard needs to ack ptrace permissions * PR 3616: Skip gdb tests on ARM. CUDA Enhancements: * PR 3532: Unregister temporarily pinned host arrays at once * PR 3552: Handle broadcast arrays correctly in host->device transfer. * PR 3578: Align cuda and cuda simulator kwarg names. Documentation Updates: * PR 3545: Fix njit description in 5 min guide * PR 3570: Minor documentation fixes for numba.cuda * PR 3581: Fixing minor typo in `reference/types.rst` * PR 3594: Changing `stencil` docs to correctly reflect `func_or_mode` param * PR 3617: Draft roadmap as of Dec 2018 Contributors: * Aaron Critchley * Daniel Wennberg * Dimitri Vorona * Dominik Stańczak * Ehsan Totoni (core dev) * Iskander Sharipov * Rob Ennis * Simon Muller * Simon Perkins * Siu Kwan Lam (core dev) * Stan Seibert (core dev) * Stuart Archibald (core dev) * Todd A. Anderson (core dev) ``` ### 0.41.0 ``` -------------- This release adds the following major features: * Diagnostics showing the optimizations done by ParallelAccelerator * Support for profiling Numba-compiled functions in Intel VTune * Additional NumPy functions: partition, nancumsum, nancumprod, ediff1d, cov, conj, conjugate, tri, tril, triu * Initial support for Python 3 Unicode strings General Enhancements: * PR 1968: armv7 support * PR 2983: invert mapping b/w binop operators and the operator module 2297 * PR 3160: First attempt at parallel diagnostics * PR 3307: Adding NUMBA_ENABLE_PROFILING envvar, enabling jit event * PR 3320: Support for np.partition * PR 3324: Support for np.nancumsum and np.nancumprod * PR 3325: Add location information to exceptions. * PR 3337: Support for np.ediff1d * PR 3345: Support for np.cov * PR 3348: Support user pipeline class in with lifting * PR 3363: string support * PR 3373: Improve error message for empty imprecise lists. * PR 3375: Enable overload(operator.getitem) * PR 3402: Support negative indexing in tuple. * PR 3414: Refactor Const type * PR 3416: Optimized usage of alloca out of the loop * PR 3424: Updates for llvmlite 0.26 * PR 3462: Add support for `np.conj/np.conjugate`. * PR 3480: np.tri, np.tril, np.triu - default optional args * PR 3481: Permit dtype argument as sole kwarg in np.eye CUDA Enhancements: * PR 3399: Add max_registers Option to cuda.jit Continuous Integration / Testing: * PR 3303: CI with Azure Pipelines * PR 3309: Workaround race condition with apt * PR 3371: Fix issues with Azure Pipelines * PR 3362: Fix 3360: `RuntimeWarning: 'numba.runtests' found in sys.modules` * PR 3374: Disable openmp in wheel building * PR 3404: Azure Pipelines templates * PR 3419: Fix cuda tests and error reporting in test discovery * PR 3491: Prevent faulthandler installation on armv7l * PR 3493: Fix CUDA test that used negative indexing behaviour that's fixed. * PR 3495: Start Flake8 checking of Numba source Fixes: * PR 2950: Fix dispatcher to only consider contiguous-ness. * PR 3124: Fix 3119, raise for 0d arrays in reductions * PR 3228: Reduce redundant module linking * PR 3329: Fix AOT on windows. * PR 3335: Fix memory management of __cuda_array_interface__ views. * PR 3340: Fix typo in error name. * PR 3365: Fix the default unboxing logic * PR 3367: Allow non-global reference to objmode() context-manager * PR 3381: Fix global reference in objmode for dynamically created function * PR 3382: CUDA_ERROR_MISALIGNED_ADDRESS Using Multiple Const Arrays * PR 3384: Correctly handle very old versions of colorama * PR 3394: Add 32bit package guard for non-32bit installs * PR 3397: Fix with-objmode warning * PR 3403 Fix label offset in call inline after parfor pass * PR 3429: Fixes raising of user defined exceptions for exec(<string>). * PR 3432: Fix error due to function naming in CI in py2.7 * PR 3444: Fixed TBB's single thread execution and test added for 3440 * PR 3449: Allow matching non-array objects in find_callname() * PR 3455: Change getiter and iternext to not be pure. Resolves 3425 * PR 3467: Make ir.UndefinedType singleton class. * PR 3478: Fix np.random.shuffle sideeffect * PR 3487: Raise unsupported for kwargs given to `print()` * PR 3488: Remove dead script. * PR 3498: Fix stencil support for boolean as return type * PR 3511: Fix handling make_function literals (regression of 3414) * PR 3514: Add missing unicode != unicode * PR 3527: Fix complex math sqrt implementation for large -ve values * PR 3530: This adds arg an check for the pattern supplied to Parfors. * PR 3536: Sets list dtor linkage to `linkonce_odr` to fix visibility in AOT Documentation Updates: * PR 3316: Update 0.40 changelog with additional PRs * PR 3318: Tweak spacing to avoid search box wrapping onto second line * PR 3321: Add note about memory leaks with exceptions to docs. Fixes 3263 * PR 3322: Add FAQ on CUDA + fork issue. Fixes 3315. * PR 3343: Update docs for argsort, kind kwarg partially supported. * PR 3357: Added mention of njit in 5minguide.rst * PR 3434: Fix parallel reduction example in docs. * PR 3452: Fix broken link and mark up problem. * PR 3484: Size Numba logo in docs in em units. Fixes 3313 * PR 3502: just two typos * PR 3506: Document string support * PR 3513: Documentation for parallel diagnostics. * PR 3526: Fix 5 min guide with respect to njit decl Contributors: * Alex Ford * Andreas Sodeur * Anton Malakhov * Daniel Stender * Ehsan Totoni (core dev) * Henry Schreiner * Marcel Bargull * Matt Cooper * Nick White * Nicolas Hug * rjenc29 * Siu Kwan Lam (core dev) * Stan Seibert (core dev) * Stuart Archibald (core dev) * Todd A. Anderson (core dev) ``` ### 0.40.1 ``` -------------- This is a PyPI-only patch release to ensure that PyPI wheels can enable the TBB threading backend, and to disable the OpenMP backend in the wheels. Limitations of manylinux1 and variation in user environments can cause segfaults when OpenMP is enabled on wheel builds. Note that this release has no functional changes for users who obtained Numba 0.40.0 via conda. Patches: * PR 3338: Accidentally left Anton off contributor list for 0.40.0 * PR 3374: Disable OpenMP in wheel building * PR 3376: Update 0.40.1 changelog and docs on OpenMP backend ```
Links - PyPI: https://pypi.org/project/numba - Changelog: https://pyup.io/changelogs/numba/ - Repo: http://numba.github.com

Update numpy from 1.15.2 to 1.16.2.

Changelog ### 1.16.1 ``` ========================== The NumPy 1.16.1 release fixes bugs reported against the 1.16.0 release, and also backports several enhancements from master that seem appropriate for a release series that is the last to support Python 2.7. The wheels on PyPI are linked with OpenBLAS v0.3.4+, which should fix the known threading issues found in previous OpenBLAS versions. Downstream developers building this release should use Cython >= 0.29.2 and, if using OpenBLAS, OpenBLAS > v0.3.4. If you are installing using pip, you may encounter a problem with older installed versions of NumPy that pip did not delete becoming mixed with the current version, resulting in an ``ImportError``. That problem is particularly common on Debian derived distributions due to a modified pip. The fix is to make sure all previous NumPy versions installed by pip have been removed. See `12736 <https://github.com/numpy/numpy/issues/12736>`__ for discussion of the issue. Note that previously this problem resulted in an ``AttributeError``. Contributors ============ A total of 16 people contributed to this release. People with a "+" by their names contributed a patch for the first time. * Antoine Pitrou * Arcesio Castaneda Medina + * Charles Harris * Chris Markiewicz + * Christoph Gohlke * Christopher J. Markiewicz + * Daniel Hrisca + * EelcoPeacs + * Eric Wieser * Kevin Sheppard * Matti Picus * OBATA Akio + * Ralf Gommers * Sebastian Berg * Stephan Hoyer * Tyler Reddy Enhancements ============ * `12767 <https://github.com/numpy/numpy/pull/12767>`__: ENH: add mm->q floordiv * `12768 <https://github.com/numpy/numpy/pull/12768>`__: ENH: port np.core.overrides to C for speed * `12769 <https://github.com/numpy/numpy/pull/12769>`__: ENH: Add np.ctypeslib.as_ctypes_type(dtype), improve `np.ctypeslib.as_ctypes` * `12773 <https://github.com/numpy/numpy/pull/12773>`__: ENH: add "max difference" messages to np.testing.assert_array_equal... * `12820 <https://github.com/numpy/numpy/pull/12820>`__: ENH: Add mm->qm divmod * `12890 <https://github.com/numpy/numpy/pull/12890>`__: ENH: add _dtype_ctype to namespace for freeze analysis Compatibility notes =================== * The changed error message emited by array comparison testing functions may affect doctests. See below for detail. * Casting from double and single denormals to float16 has been corrected. In some rare cases, this may result in results being rounded up instead of down, changing the last bit (ULP) of the result. New Features ============ divmod operation is now supported for two ``timedelta64`` operands ------------------------------------------------------------------ The divmod operator now handles two ``np.timedelta64`` operands, with type signature ``mm->qm``. Improvements ============ Further improvements to ``ctypes`` support in ``np.ctypeslib`` -------------------------------------------------------------- A new ``np.ctypeslib.as_ctypes_type`` function has been added, which can be used to converts a `dtype` into a best-guess `ctypes` type. Thanks to this new function, ``np.ctypeslib.as_ctypes`` now supports a much wider range of array types, including structures, booleans, and integers of non-native endianness. Array comparison assertions include maximum differences ------------------------------------------------------- Error messages from array comparison tests such as `np.testing.assert_allclose` now include "max absolute difference" and "max relative difference," in addition to the previous "mismatch" percentage. This information makes it easier to update absolute and relative error tolerances. Changes ======= ``timedelta64 % 0`` behavior adjusted to return ``NaT`` ------------------------------------------------------- The modulus operation with two ``np.timedelta64`` operands now returns ``NaT`` in the case of division by zero, rather than returning zero ========================== ``` ### 1.16.0 ``` ========================== This NumPy release is the last one to support Python 2.7 and will be maintained as a long term release with bug fixes until 2020. Support for Python 3.4 been dropped, the supported Python versions are 2.7 and 3.5-3.7. The wheels on PyPI are linked with OpenBLAS v0.3.4+, which should fix the known threading issues found in previous OpenBLAS versions. Downstream developers building this release should use Cython >= 0.29 and, if using OpenBLAS, OpenBLAS > v0.3.4. This release has seen a lot of refactoring and features many bug fixes, improved code organization, and better cross platform compatibility. Not all of these improvements will be visible to users, but they should help make maintenance easier going forward. Highlights ========== * Experimental (opt-in only) support for overriding numpy functions, see ``__array_function__`` below. * The ``matmul`` function is now a ufunc. This provides better performance and allows overriding with ``__array_ufunc__``. * Improved support for the ARM and POWER architectures. * Improved support for AIX and PyPy. * Improved interop with ctypes. * Improved support for PEP 3118. New functions ============= * New functions added to the `numpy.lib.recfuntions` module to ease the structured assignment changes: * ``assign_fields_by_name`` * ``structured_to_unstructured`` * ``unstructured_to_structured`` * ``apply_along_fields`` * ``require_fields`` See the user guide at <https://docs.scipy.org/doc/numpy/user/basics.rec.html> for more info. New deprecations ================ * The type dictionaries `numpy.core.typeNA` and `numpy.core.sctypeNA` are deprecated. They were buggy and not documented and will be removed in the 1.18 release. Use`numpy.sctypeDict` instead. * The `numpy.asscalar` function is deprecated. It is an alias to the more powerful `numpy.ndarray.item`, not tested, and fails for scalars. * The `numpy.set_array_ops` and `numpy.get_array_ops` functions are deprecated. As part of `NEP 15`, they have been deprecated along with the C-API functions :c:func:`PyArray_SetNumericOps` and :c:func:`PyArray_GetNumericOps`. Users who wish to override the inner loop functions in built-in ufuncs should use :c:func:`PyUFunc_ReplaceLoopBySignature`. * The `numpy.unravel_index` keyword argument ``dims`` is deprecated, use ``shape`` instead. * The `numpy.histogram` ``normed`` argument is deprecated. It was deprecated previously, but no warning was issued. * The ``positive`` operator (``+``) applied to non-numerical arrays is deprecated. See below for details. * Passing an iterator to the stack functions is deprecated Expired deprecations ==================== * NaT comparisons now return ``False`` without a warning, finishing a deprecation cycle begun in NumPy 1.11. * ``np.lib.function_base.unique`` was removed, finishing a deprecation cycle begun in NumPy 1.4. Use `numpy.unique` instead. * multi-field indexing now returns views instead of copies, finishing a deprecation cycle begun in NumPy 1.7. The change was previously attempted in NumPy 1.14 but reverted until now. * ``np.PackageLoader`` and ``np.pkgload`` have been removed. These were deprecated in 1.10, had no tests, and seem to no longer work in 1.15. Future changes ============== * NumPy 1.17 will drop support for Python 2.7. Compatibility notes =================== f2py script on Windows ---------------------- On Windows, the installed script for running f2py is now an ``.exe`` file rather than a ``*.py`` file and should be run from the command line as ``f2py`` whenever the ``Scripts`` directory is in the path. Running ``f2py`` as a module ``python -m numpy.f2py [...]`` will work without path modification in any version of NumPy. NaT comparisons --------------- Consistent with the behavior of NaN, all comparisons other than inequality checks with datetime64 or timedelta64 NaT ("not-a-time") values now always return ``False``, and inequality checks with NaT now always return ``True``. This includes comparisons beteween NaT values. For compatibility with the old behavior, use ``np.isnat`` to explicitly check for NaT or convert datetime64/timedelta64 arrays with ``.astype(np.int64)`` before making comparisons. complex64/128 alignment has changed ----------------------------------- The memory alignment of complex types is now the same as a C-struct composed of two floating point values, while before it was equal to the size of the type. For many users (for instance on x64/unix/gcc) this means that complex64 is now 4-byte aligned instead of 8-byte aligned. An important consequence is that aligned structured dtypes may now have a different size. For instance, ``np.dtype('c8,u1', align=True)`` used to have an itemsize of 16 (on x64/gcc) but now it is 12. More in detail, the complex64 type now has the same alignment as a C-struct ``struct {float r, i;}``, according to the compiler used to compile numpy, and similarly for the complex128 and complex256 types. nd_grid __len__ removal ----------------------- ``len(np.mgrid)`` and ``len(np.ogrid)`` are now considered nonsensical and raise a ``TypeError``. ``np.unravel_index`` now accepts ``shape`` keyword argument ----------------------------------------------------------- Previously, only the ``dims`` keyword argument was accepted for specification of the shape of the array to be used for unraveling. ``dims`` remains supported, but is now deprecated. multi-field views return a view instead of a copy ------------------------------------------------- Indexing a structured array with multiple fields, e.g., ``arr[['f1', 'f3']]``, returns a view into the original array instead of a copy. The returned view will often have extra padding bytes corresponding to intervening fields in the original array, unlike before, which will affect code such as ``arr[['f1', 'f3']].view('float64')``. This change has been planned since numpy 1.7. Operations hitting this path have emitted ``FutureWarnings`` since then. Additional ``FutureWarnings`` about this change were added in 1.12. To help users update their code to account for these changes, a number of functions have been added to the ``numpy.lib.recfunctions`` module which safely allow such operations. For instance, the code above can be replaced with ``structured_to_unstructured(arr[['f1', 'f3']], dtype='float64')``. See the "accessing multiple fields" section of the `user guide <https://docs.scipy.org/doc/numpy/user/basics.rec.htmlaccessing-multiple-fields>`__. C API changes ============= The :c:data:`NPY_API_VERSION` was incremented to 0x0000D, due to the addition of: * :c:member:`PyUFuncObject.core_dim_flags` * :c:member:`PyUFuncObject.core_dim_sizes` * :c:member:`PyUFuncObject.identity_value` * :c:function:`PyUFunc_FromFuncAndDataAndSignatureAndIdentity` New Features ============ Integrated squared error (ISE) estimator added to ``histogram`` --------------------------------------------------------------- This method (``bins='stone'``) for optimizing the bin number is a generalization of the Scott's rule. The Scott's rule assumes the distribution is approximately Normal, while the ISE_ is a non-parametric method based on cross-validation. .. _ISE: https://en.wikipedia.org/wiki/HistogramMinimizing_cross-validation_estimated_squared_error ``max_rows`` keyword added for ``np.loadtxt`` --------------------------------------------- New keyword ``max_rows`` in `numpy.loadtxt` sets the maximum rows of the content to be read after ``skiprows``, as in `numpy.genfromtxt`. modulus operator support added for ``np.timedelta64`` operands -------------------------------------------------------------- The modulus (remainder) operator is now supported for two operands of type ``np.timedelta64``. The operands may have different units and the return value will match the type of the operands. Improvements ============ no-copy pickling of numpy arrays -------------------------------- Up to protocol 4, numpy array pickling created 2 spurious copies of the data being serialized. With pickle protocol 5, and the ``PickleBuffer`` API, a large variety of numpy arrays can now be serialized without any copy using out-of-band buffers, and with one less copy using in-band buffers. This results, for large arrays, in an up to 66% drop in peak memory usage. build shell independence ------------------------ NumPy builds should no longer interact with the host machine shell directly. ``exec_command`` has been replaced with ``subprocess.check_output`` where appropriate. `np.polynomial.Polynomial` classes render in LaTeX in Jupyter notebooks ----------------------------------------------------------------------- When used in a front-end that supports it, `Polynomial` instances are now rendered through LaTeX. The current format is experimental, and is subject to change. ``randint`` and ``choice`` now work on empty distributions ---------------------------------------------------------- Even when no elements needed to be drawn, ``np.random.randint`` and ``np.random.choice`` raised an error when the arguments described an empty distribution. This has been fixed so that e.g. ``np.random.choice([], 0) == np.array([], dtype=float64)``. ``linalg.lstsq``, ``linalg.qr``, and ``linalg.svd`` now work with empty arrays ------------------------------------------------------------------------------ Previously, a ``LinAlgError`` would be raised when an empty matrix/empty matrices (with zero rows and/or columns) is/are passed in. Now outputs of appropriate shapes are returned. Chain exceptions to give better error messages for invalid PEP3118 format strings --------------------------------------------------------------------------------- This should help track down problems. Einsum optimization path updates and efficiency improvements ------------------------------------------------------------ Einsum was synchronized with the current upstream work. `numpy.angle` and `numpy.expand_dims` now work on ``ndarray`` subclasses ------------------------------------------------------------------------ In particular, they now work for masked arrays. ``NPY_NO_DEPRECATED_API`` compiler warning suppression ------------------------------------------------------ Setting ``NPY_NO_DEPRECATED_API`` to a value of 0 will suppress the current compiler warnings when the deprecated numpy API is used. ``np.diff`` Added kwargs prepend and append ------------------------------------------- New kwargs ``prepend`` and ``append``, allow for values to be inserted on either end of the differences. Similar to options for `ediff1d`. Now the inverse of `cumsum` can be obtained easily via ``prepend=0``. ARM support updated ------------------- Support for ARM CPUs has been updated to accommodate 32 and 64 bit targets, and also big and little endian byte ordering. AARCH32 memory alignment issues have been addressed. CI testing has been expanded to include AARCH64 targets via the services of shippable.com. Appending to build flags ------------------------ `numpy.distutils` has always overridden rather than appended to `LDFLAGS` and other similar such environment variables for compiling Fortran extensions. Now, if the `NPY_DISTUTILS_APPEND_FLAGS` environment variable is set to 1, the behavior will be appending. This applied to: `LDFLAGS`, `F77FLAGS`, `F90FLAGS`, `FREEFLAGS`, `FOPT`, `FDEBUG`, and `FFLAGS`. See gh-11525 for more details. Generalized ufunc signatures now allow fixed-size dimensions ------------------------------------------------------------ By using a numerical value in the signature of a generalized ufunc, one can indicate that the given function requires input or output to have dimensions with the given size. E.g., the signature of a function that converts a polar angle to a two-dimensional cartesian unit vector would be ``()->(2)``; that for one that converts two spherical angles to a three-dimensional unit vector would be ``(),()->(3)``; and that for the cross product of two three-dimensional vectors would be ``(3),(3)->(3)``. Note that to the elementary function these dimensions are not treated any differently from variable ones indicated with a name starting with a letter; the loop still is passed the corresponding size, but it can now count on that size being equal to the fixed one given in the signature. Generalized ufunc signatures now allow flexible dimensions ---------------------------------------------------------- Some functions, in particular numpy's implementation of ` as ``matmul``, are very similar to generalized ufuncs in that they operate over core dimensions, but one could not present them as such because they were able to deal with inputs in which a dimension is missing. To support this, it is now allowed to postfix a dimension name with a question mark to indicate that the dimension does not necessarily have to be present. With this addition, the signature for ``matmul`` can be expressed as ``(m?,n),(n,p?)->(m?,p?)``. This indicates that if, e.g., the second operand has only one dimension, for the purposes of the elementary function it will be treated as if that input has core shape ``(n, 1)``, and the output has the corresponding core shape of ``(m, 1)``. The actual output array, however, has the flexible dimension removed, i.e., it will have shape ``(..., m)``. Similarly, if both arguments have only a single dimension, the inputs will be presented as having shapes ``(1, n)`` and ``(n, 1)`` to the elementary function, and the output as ``(1, 1)``, while the actual output array returned will have shape ``()``. In this way, the signature allows one to use a single elementary function for four related but different signatures, ``(m,n),(n,p)->(m,p)``, ``(n),(n,p)->(p)``, ``(m,n),(n)->(m)`` and ``(n),(n)->()``. ``np.clip`` and the ``clip`` method check for memory overlap ------------------------------------------------------------ The ``out`` argument to these functions is now always tested for memory overlap to avoid corrupted results when memory overlap occurs. New value ``unscaled`` for option ``cov`` in ``np.polyfit`` ----------------------------------------------------------- A further possible value has been added to the ``cov`` parameter of the ``np.polyfit`` function. With ``cov='unscaled'`` the scaling of the covariance matrix is disabled completely (similar to setting ``absolute_sigma=True`` in ``scipy.optimize.curve_fit``). This would be useful in occasions, where the weights are given by 1/sigma with sigma being the (known) standard errors of (Gaussian distributed) data points, in which case the unscaled matrix is already a correct estimate for the covariance matrix. Detailed docstrings for scalar numeric types -------------------------------------------- The ``help`` function, when applied to numeric types such as `numpy.intc`, `numpy.int_`, and `numpy.longlong`, now lists all of the aliased names for that type, distinguishing between platform -dependent and -independent aliases. ``__module__`` attribute now points to public modules ----------------------------------------------------- The ``__module__`` attribute on most NumPy functions has been updated to refer to the preferred public module from which to access a function, rather than the module in which the function happens to be defined. This produces more informative displays for functions in tools such as IPython, e.g., instead of ``<function 'numpy.core.fromnumeric.sum'>`` you now see ``<function 'numpy.sum'>``. Large allocations marked as suitable for transparent hugepages -------------------------------------------------------------- On systems that support transparent hugepages over the madvise system call numpy now marks that large memory allocations can be backed by hugepages which reduces page fault overhead and can in some fault heavy cases improve performance significantly. On Linux the setting for huge pages to be used, `/sys/kernel/mm/transparent_hugepage/enabled`, must be at least `madvise`. Systems which already have it set to `always` will not see much difference as the kernel will automatically use huge pages where appropriate. Users of very old Linux kernels (~3.x and older) should make sure that `/sys/kernel/mm/transparent_hugepage/defrag` is not set to `always` to avoid performance problems due concurrency issues in the memory defragmentation. Alpine Linux (and other musl c library distros) support ------------------------------------------------------- We now default to use `fenv.h` for floating point status error reporting. Previously we had a broken default that sometimes would not report underflow, overflow, and invalid floating point operations. Now we can support non-glibc distrubutions like Alpine Linux as long as they ship `fenv.h`. Speedup ``np.block`` for large arrays ------------------------------------- Large arrays (greater than ``512 * 512``) now use a blocking algorithm based on copying the data directly into the appropriate slice of the resulting array. This results in significant speedups for these large arrays, particularly for arrays being blocked along more than 2 dimensions. ``arr.ctypes.data_as(...)`` holds a reference to arr ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Previously the caller was responsible for keeping the array alive for the lifetime of the pointer. Speedup ``np.take`` for read-only arrays ---------------------------------------- The implementation of ``np.take`` no longer makes an unnecessary copy of the source array when its ``writeable`` flag is set to ``False``. Support path-like objects for more functions -------------------------------------------- The ``np.core.records.fromfile`` function now supports ``pathlib.Path`` and other path-like objects in addition to a file object. Furthermore, the ``np.load`` function now also supports path-like objects when using memory mapping (``mmap_mode`` keyword argument). Better behaviour of ufunc identities during reductions ------------------------------------------------------ Universal functions have an ``.identity`` which is used when ``.reduce`` is called on an empty axis. As of this release, the logical binary ufuncs, `logical_and`, `logical_or`, and `logical_xor`, now have ``identity`` s of type `bool`, where previously they were of type `int`. This restores the 1.14 behavior of getting ``bool`` s when reducing empty object arrays with these ufuncs, while also keeping the 1.15 behavior of getting ``int`` s when reducing empty object arrays with arithmetic ufuncs like ``add`` and ``multiply``. Additionally, `logaddexp` now has an identity of ``-inf``, allowing it to be called on empty sequences, where previously it could not be. This is possible thanks to the new :c:function:`PyUFunc_FromFuncAndDataAndSignatureAndIdentity`, which allows arbitrary values to be used as identities now. Improved conversion from ctypes objects --------------------------------------- Numpy has always supported taking a value or type from ``ctypes`` and converting it into an array or dtype, but only behaved correctly for simpler types. As of this release, this caveat is lifted - now: * The ``_pack_`` attribute of ``ctypes.Structure``, used to emulate C's ``__attribute__((packed))``, is respected. * Endianness of all ctypes objects is preserved * ``ctypes.Union`` is supported * Non-representable constructs raise exceptions, rather than producing dangerously incorrect results: * Bitfields are no longer interpreted as sub-arrays * Pointers are no longer replaced with the type that they point to A new ``ndpointer.contents`` member ----------------------------------- This matches the ``.contents`` member of normal ctypes arrays, and can be used to construct an ``np.array`` around the pointers contents. This replaces ``np.array(some_nd_pointer)``, which stopped working in 1.15. As a side effect of this change, ``ndpointer`` now supports dtypes with overlapping fields and padding. ``matmul`` is now a ``ufunc`` ----------------------------- `numpy.matmul` is now a ufunc which means that both the function and the ``__matmul__`` operator can now be overridden by ``__array_ufunc__``. Its implementation has also changed. It uses the same BLAS routines as `numpy.dot`, ensuring its performance is similar for large matrices. Start and stop arrays for ``linspace``, ``logspace`` and ``geomspace`` ---------------------------------------------------------------------- These functions used to be limited to scalar stop and start values, but can now take arrays, which will be properly broadcast and result in an output which has one axis prepended. This can be used, e.g., to obtain linearly interpolated points between sets of points. CI extended with additional services -------------------------------
coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 55.948% when pulling 68b7bdefcd8502314b38af66ab5b535beafff949 on pyup/scheduled-update-2019-03-01 into d190800968019066c05c32ad8afcaf6786ec9c0b on develop.

pyup-bot commented 5 years ago

Closing this in favor of #65