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 August #69

Closed pyup-bot closed 5 years ago

pyup-bot commented 5 years ago

Update astropy from 3.1.2 to 3.2.1.

Changelog ### 3.2.1 ``` ================== Bug fixes --------- astropy.config ^^^^^^^^^^^^^^ astropy.constants ^^^^^^^^^^^^^^^^^ astropy.convolution ^^^^^^^^^^^^^^^^^^^ astropy.coordinates ^^^^^^^^^^^^^^^^^^^ astropy.cosmology ^^^^^^^^^^^^^^^^^ astropy.extern ^^^^^^^^^^^^^^ astropy.io.ascii ^^^^^^^^^^^^^^^^ astropy.io.misc ^^^^^^^^^^^^^^^ astropy.io.fits ^^^^^^^^^^^^^^^ - Avoid reporting a warning with ``BinTableHDU.from_columns`` with keywords that are not provided by the user. [8838] astropy.io.registry ^^^^^^^^^^^^^^^^^^^ astropy.io.votable ^^^^^^^^^^^^^^^^^^ astropy.modeling ^^^^^^^^^^^^^^^^ astropy.nddata ^^^^^^^^^^^^^^ astropy.samp ^^^^^^^^^^^^ astropy.stats ^^^^^^^^^^^^^ astropy.table ^^^^^^^^^^^^^ - Fix a problem where mask was dropped when creating a ``MaskedColumn`` from a list of ``MaskedArray`` objects. [8826] astropy.tests ^^^^^^^^^^^^^ astropy.time ^^^^^^^^^^^^ astropy.timeseries ^^^^^^^^^^^^^^^^^^ astropy.uncertainty ^^^^^^^^^^^^^^^^^^^ astropy.units ^^^^^^^^^^^^^ - Fixed a bug that prevented ``EarthLocation`` from being initialized with numpy >=1.17. [8849] astropy.utils ^^^^^^^^^^^^^ astropy.visualization ^^^^^^^^^^^^^^^^^^^^^ astropy.wcs ^^^^^^^^^^^ Other Changes and Additions --------------------------- ``` ### 3.2 ``` ================ New Features ------------ astropy.constants ^^^^^^^^^^^^^^^^^ - Add CODATA 2018 constants but not make them default because the redefinition of SI units that will follow has not been implemented yet. [8595] astropy.coordinates ^^^^^^^^^^^^^^^^^^^ - New ``BarycentricMeanEcliptic``, ``HeliocentricTrueEcliptic`` and ``GeocentricTrueEcliptic`` frames. The ecliptic frames are no longer considered experimental. [8394] - The default time scale for epochs like 'J2000' or 'B1975' is now "tt", which is the correct one for 'J2000' and avoids leap-second warnings for epochs in the far future or past. [8600] astropy.extern ^^^^^^^^^^^^^^ - Bundled ``six`` now emits ``AstropyDeprecationWarning``. It will be removed in 4.0. [8323] astropy.io.ascii ^^^^^^^^^^^^^^^^ - IPAC tables now output data types of ``float`` instead of ``double``, or ``int`` instead of ``long``, based on the column ``dtype.itemsize``. [8216] - Update handling of MaskedColumn columns when using the 'data_mask' serialization method. This can make writing ECSV significantly faster if the data do not actually have any masked values. [8447] - Fixed a bug that caused newlines to be incorrect when writing out ASCII tables on Windows (they were ``\r\r\n`` instead of ``\r\n``). [8659] astropy.io.misc ^^^^^^^^^^^^^^^ - Implement serialization of ``TimeDelta`` in ASDF. [8285] - Implement serialization of ``EarthLocation`` in ASDF. [8286] - Implement serialization of ``SkyCoord`` in ASDF. [8284] - Support serialization of Astropy tables with mixin columns in ASDF. [8337] - No warnings when reading HDF5 files with only one table and no ``path=`` argument [8483] - The HDF5 writer will now create a default table instead of raising an exception when ``path=`` is not specified and when writing to empty/new HDF5 files. [8553] astropy.io.fits ^^^^^^^^^^^^^^^ - Optimize parsing of cards within the ``Header`` class. [8428] - Optimize the parsing of headers to get the structural keywords that are needed to find extensions. Thanks to this, getting a random HDU from a file with many extensions is much faster than before, in particular when the extension headers contain many keywords. [8502] - Change behavior of FITS undefined value in ``Header`` such that ``None`` is used in Python to represent FITS undefined when using dict interface. ``Undefined`` can also be assigned and is translated to ``None``. Previously setting a header card value to ``None`` resulted in an empty string field rather than a FITS undefined value. [8572] - Allow ``Header.fromstring`` and ``Card.fromstring`` to accept ``bytes``. [8707] astropy.io.registry ^^^^^^^^^^^^^^^^^^^ - Implement ``Table`` reader and writer for ``ASDF``. [8261] - Implement ``Table`` reader and writer methods to wrap ``pandas`` I/O methods for CSV, Fixed width format, HTML, and JSON. [8381] - Add ``help()`` and ``list_formats()`` methods to unified I/O ``read`` and ``write`` methods. For example ``Table.read.help()`` gives help on available ``Table`` read formats and ``Table.read.help('fits')`` gives detailed help on the arguments for reading FITS table file. [8255] astropy.table ^^^^^^^^^^^^^ - Initializing a table with ``Table(rows=...)``, if the first item is an ``OrderedDict``, now uses the column order of the first row. [8587] - Added new pprint_all() and pformat_all() methods to Table. These two new methods print the entire table by default. [8577] - Removed restriction of initializing a Table from a dict with copy=False. [8541] - Improved speed of table row access by a factor of about 2-3. Improved speed of Table len() by a factor of around 3-10 (depending on the number of columns). [8494] - Improved the Table - pandas ``DataFrame`` interface (``to_pandas()`` and ``from_pandas()``). Mixin columns like ``Time`` and ``Quantity`` can now be converted to pandas by flattening the columns as necessary to plain columns. ``Time`` and ``TimeDelta`` columns get converted to corresponding pandas date or time delta types. The ``DataFrame`` index is now handled in the conversion methods. [8247] - Added ``rename_columns`` method to rename multiple columns in one call. [5159, 8070] - Improved Table performance by reducing unnecessary calls to copy and deepcopy, especially as related to the table and column ``meta`` attributes. Changed the behavior when slicing a table (either in rows or with a list of column names) so now the sliced output gets a light (key-only) copy of ``meta`` instead of a deepcopy. Changed the ``Table.meta`` class-level descriptor so that assigning directly to ``meta``, e.g. ``tbl.meta = new_meta`` no longer does a deepcopy and instead just directly assigns the ``new_meta`` object reference. Changed Table initialization so that input ``meta`` is copied only if ``copy=True``. [8404] - Improved Table slicing performance with internal implementation changes related to column attribute access and certain input validation. [8493] - Added ``reverse`` argument to the ``sort`` and ``argsort`` methods to allow sorting in reverse order. [8528] - Improved ``Table.sort()`` performance by removing ``self[keys]`` from code which is creating deep copies of ``meta`` attribute and adding a new keyword ``names`` in ``get_index()`` to get index by using a list or tuple containing names of columns. [8570] - Expose ``represent_mixins_as_columns`` as a public function in the ``astropy.table`` subpackage. This previously-private function in the ``table.serialize`` module is used to represent mixin columns in a Table as one or more plain Column objects. [7729] astropy.timeseries ^^^^^^^^^^^^^^^^^^ - Added a new astropy.timeseries sub-package to represent and manipulate sampled and binned time series. [8540] - The ``BoxLeastSquares`` and ``LombScargle`` classes have been moved to ``astropy.timeseries.periodograms`` from ``astropy.stats``. [8591] - Added the ability to provide absolute ``Time`` objects to the ``BoxLeastSquares`` and ``LombScargle`` periodogram classes. [8599] - Added model inspection methods (``model_parameters()``, ``design_matrix()``, and ``offset()``) to ``astropy.timeseries.LombScargle`` class [8397]. astropy.units ^^^^^^^^^^^^^ - ``Quantity`` overrides of ``ndarray`` methods such as ``sum``, ``min``, ``max``, which are implemented via reductions, have been removed since they are dealt with in ``Quantity.__array_ufunc__``. This should not affect subclasses, but they may consider doing similarly. [8316] Note that this does not include methods that use more complicated python code such as ``mean``, ``std`` and ``var``. [8370] astropy.visualization ^^^^^^^^^^^^^^^^^^^^^ - Added ``CompositeStretch``, which inherits from ``CompositeTransform`` and also ``BaseStretch`` so that it can be used with ``ImageNormalize``. [8564] - Added a ``log_a`` argument to the ``simple_norm`` method. Similar to the exposing of the ``asinh_a`` argument for ``AsinhStretch``, the new ``log_a`` argument is now exposed for ``LogStretch``. [8436] astropy.wcs ^^^^^^^^^^^ - WCSLIB was updated to v 6.2. This adds support for time-related WCS keywords (WCS Paper VII). FITS headers containing ``Time`` axis are parsed and the axis is included in the WCS object. [8592] - The ``OBSGEO`` attribute as expanded to 6 members - ``XYZLBH``. [8592] - Added a new class ``SlicedLowLevelWCS`` in ``astropy.wcs.wcsapi`` that can be used to slice any WCS that conforms to the ``BaseLowLevelWCS`` API. [8546] - Updated implementation of ``WCS.__getitem__`` and ``WCS.slice`` to now return a ``SlicedLowLevelWCS`` rather than raising an error when reducing the dimensionality of the WCS. [8546] API Changes ----------- astropy.coordinates ^^^^^^^^^^^^^^^^^^^ - ``QuantityAttribute`` no longer has a default value for ``default``. The previous value of None was misleading as it always was an error. [8450] - The default J2000 has been changed to use be January 1, 2000 12:00 TT instead of UTC. This is more in line with convention. [8594] astropy.io.ascii ^^^^^^^^^^^^^^^^ - IPAC tables now output data types of ``float`` instead of ``double``, or ``int`` instead of ``long``, based on the column ``dtype.itemsize``. [8216] astropy.io.misc ^^^^^^^^^^^^^^^ - Unit equivalencies can now be serialized to ASDF. [8252] astropy.modeling ^^^^^^^^^^^^^^^^ - Composition of model classes is deprecated and will be removed in 4.0. Composition of model instances remain unaffected. [8234, 8408] astropy.stats ^^^^^^^^^^^^^ - The ``BoxLeastSquares`` and ``LombScargle`` classes have been moved to the ``astropy.timeseries.periodograms`` module and will now emit a deprecation warning when imported from ``astropy.stats``. [8591] astropy.table ^^^^^^^^^^^^^ - Converting an empty table to an array using ``as_array`` method now returns an empty array instead of ``None``. [8647] - Changed the behavior when slicing a table (either in rows or with a list of column names) so now the sliced output gets a light (key-only) copy of ``meta`` instead of a deepcopy. Changed the ``Table.meta`` class-level descriptor so that assigning directly to ``meta``, e.g. ``tbl.meta = new_meta`` no longer does a deepcopy and instead just directly assigns the ``new_meta`` object reference. Changed Table initialization so that input ``meta`` is copied only if ``copy=True``. [8404] - Added a keyword ``names`` in ``Table.as_array()``. If provided this specifies a list of column names to include for the returned structured array. [8532] astropy.tests ^^^^^^^^^^^^^ - Removed ``pytest_plugins`` as they are completely broken for ``pytest>=4``. [7786] - Removed the ``astropy.tests.plugins.config`` plugin and removed the ``--astropy-config-dir`` and ``--astropy-cache-dir`` options from testing. Please use caching functionality that is natively in ``pytest``. [7787, 8489] astropy.time ^^^^^^^^^^^^ - The default time scale for epochs like 'J2000' or 'B1975' is now "tt", which is the correct one for 'J2000' and avoids leap-second warnings for epochs in the far future or past. [8600] astropy.units ^^^^^^^^^^^^^ - Unit equivalencies can now be introspected. [8252] astropy.wcs ^^^^^^^^^^^ - The ``world_to_pixel``, ``world_to_array_index*``, ``pixel_to_world*`` and ``array_index_to_world*`` methods now all consistently return scalars, arrays, or objects not wrapped in a one-element tuple/list when only one scalar, array, or object (as was previously already the case for ``WCS.pixel_to_world`` and ``WCS.array_index_to_world``). [8663] astropy.utils ^^^^^^^^^^^^^ - It is now possible to control the number of cores used by ``ProgressBar.map`` by passing a positive integer as the ``multiprocess`` keyword argument. Use ``True`` to use all cores. [8083] Bug Fixes --------- astropy.coordinates ^^^^^^^^^^^^^^^^^^^ - ``BarycentricTrueEcliptic``, ``HeliocentricTrueEcliptic`` and ``GeocentricTrueEcliptic`` now use the correct transformation (including nutation), whereas the new ``*MeanEcliptic`` classes use the nutation-free transformation. [8394] - Representations with ``float32`` coordinates can now be transformed, although the output will always be ``float64``. [8759] - Fixed bug that prevented using differentials with HCRS<->ICRS transformations. [8794] astropy.io.ascii ^^^^^^^^^^^^^^^^ - Fixed a bug where an exception was raised when writing a table which includes mixin columns (e.g. a Quantity column) and the output format was specified using the ``formats`` keyword. [8681] astropy.io.misc ^^^^^^^^^^^^^^^ - Fixed bug in ASDF tag that inadvertently introduced dependency on ``pytest``. [8456] astropy.modeling ^^^^^^^^^^^^^^^^ - Fixed slowness for certain compound models consisting of large numbers of multi-input models [8338, 8349] - Fixed bugs in fitting of compound models with units. [8369] astropy.nddata ^^^^^^^^^^^^^^ - Fixed bug in reading multi-extension FITS files written by earlier versions of ``CCDData``. [8534] - Fixed two errors in the way ``CCDData`` handles FITS files with WCS in the header. Some of the WCS keywords that should have been removed from the header were not, potentially leading to FITS files with inconsistent WCS. [8602] astropy.table ^^^^^^^^^^^^^ - Fixed a bug when initializing from an empty list: ``Table([])`` no longer results in a crash. [8647] - Fixed a bug when initializing from an existing ``Table``. In this case the input ``meta`` argument was being ignored. Now the input ``meta``, if supplied, will be used as the ``meta`` for the new ``Table``. [8404] - Fix the conversion of bytes values to Python ``str`` with ``Table.tolist``. [8739] astropy.time ^^^^^^^^^^^^ - Fixed a number of issues to ensure a consistent output type resulting from multiplication or division involving a ``TimeDelta`` instance. The output is now always a ``TimeDelta`` if the result is a time unit (like u.s or u.d), otherwise it will be a ``Quantity``. [8356] - Multiplication between two ``TimeDelta`` instances is now possible, resulting in a ``Quantity`` with units of time squared (division already correctly resulted in a dimensionless ``Quantity``). [8356] - Like for comparisons, addition, and subtraction of ``Time`` instances with with non-time instances, multiplication and division of ``TimeDelta`` instances with incompatible other instances no longer immediately raise an ``UnitsError`` or ``TypeError`` (depending on the other instance), but rather go through the regular Python mechanism of ``TimeDelta`` returning ``NotImplemented`` (which will lead to a regular ``TypeError`` unless the other instance can handle ``TimeDelta``). [8356] - Corrected small rounding errors that could cause the ``jd2`` values in ``Time`` to fall outside the range of -0.5 to 0.5. [8763] astropy.units ^^^^^^^^^^^^^ - Added a ``Quantity.to_string`` method to add flexibility to the string formatting of quantities. It produces unadorned or LaTeX strings, and accepts two different sets of delimiters in the latter case: ``inline`` and ``display``. [8313] - Ensure classes that mimic quantities by having a ``unit`` attribute and/or ``to`` and ``to_value`` methods can be properly used to initialize ``Quantity`` or set ``Quantity`` instance items. [8535] - Add support for ``<<`` to create logarithmic units. [8290] - Add support for the ``clip`` ufunc, which in numpy 1.17 is used to implement ``np.clip``. As part of that, remove the ``Quantity.clip`` method under numpy 1.17. [8747] - Fix parsing of numerical powers in FITS-compatible units. [8251] astropy.wcs ^^^^^^^^^^^ - Added a ``PyUnitListProxy_richcmp`` method in ``UnitListProxy`` class to enable ``WCS.wcs.cunit`` equality testing. It helps to check whether the two instances of ``WCS.wcs.cunit`` are equal or not by comparing the data members of ``UnitListProxy`` class [8480] - Fixed ``SlicedLowLevelWCS`` when ``array_shape`` is ``None``. [8649] - Do not attempt to delete repeated distortion keywords multiple times when loading distortions with ``_read_distortion_kw`` and ``_read_det2im_kw``. [8777] - Added ``None`` to be displayed as a ``world_axis_physical_types`` in the ``WCS`` repr, as ``None`` values are now supported in ``APE14``. [8811] Other Changes and Additions --------------------------- - Update bundled expat to 2.2.6. [8343] - Added instructions for uploading releases to Zenodo. [8395] - The bug fixes to the behaviour of ``TimeDelta`` for multiplcation and division, which ensure that the output is now always a ``TimeDelta`` if the result is a time unit (like u.s or u.d) and otherwise a ``Quantity``, imply that sometimes the output type will be different than it was before. [8356] - For types unrecognized by ``TimeDelta``, multiplication and division now will consistently return a ``TypeError`` if the other instance cannot handle ``TimeDelta`` (rather than ``UnitsError`` or ``TypeError`` depending on presumed abilities of the other instance). [8356] - Multiplication between two ``TimeDelta`` instances will no longer result in an ``OperandTypeError``, but rather result in a ``Quantity`` with units of time squared (division already correctly resulted in a dimensionless ``Quantity``). [8356] - Made running the tests insensitive to local user configuration when running the tests in parallel mode or directly with pytest. [8727] - Added a narrative style guide to the documentation for contributor reference. [8588] - Ensure we call numpy equality functions in a way that reduces the number of ``DeprecationWarning``. [8755] Installation ^^^^^^^^^^^^ - We now require setuptools 30.3.0 or later to install the core astropy package. [8240] - We now define groups of dependencies that can be installed with pip, e.g. ``pip install astropy[all]`` (to install all optional dependencies). [8198] ```
Links - PyPI: https://pypi.org/project/astropy - Changelog: https://pyup.io/changelogs/astropy/ - Homepage: http://astropy.org

Update matplotlib from 3.0.3 to 3.1.1.

Changelog ### 3.1.1 ``` The first bug-fix release of the 3.1 series * Locator.nonsingular return order API change Lots of backports of various bug fixes. ```
Links - PyPI: https://pypi.org/project/matplotlib - Changelog: https://pyup.io/changelogs/matplotlib/ - Homepage: https://matplotlib.org

Update numba from 0.43.1 to 0.45.0.

Changelog ### 0.45.0 ``` -------------- In this release, Numba gained an experimental :ref:`numba.typed.List <feature-typed-list>` container as a future replacement of the :ref:`reflected list <feature-reflected-list>`. In addition, functions decorated with ``parallel=True`` can now be cached to reduce compilation overhead associated with the auto-parallelization. Enhancements from user contributed PRs (with thanks!): * James Bourbeau added the Numba version to reportable error messages in 4227, added the ``signature`` parameter to ``inspect_types`` in 4200, improved the docstring of ``normalize_signature`` in 4205, and fixed 3658 by adding reference counting to ``register_dispatcher`` in 4254 * Guilherme Leobas implemented the dominator tree and dominance frontier algorithms in 4216 and 4149, respectively. * Nick White fixed the issue with ``round`` in the CUDA target in 4137. * Joshua Adelman added support for determining if a value is in a `range` (i.e. ``x in range(...)``) in 4129, and added windowing functions (``np.bartlett``, ``np.hamming``, ``np.blackman``, ``np.hanning``, ``np.kaiser``) from NumPy in 4076. * Lucio Fernandez-Arjona added support for ``np.select`` in 4077 * Rob Ennis added support for ``np.flatnonzero`` in 4157 * Keith Kraus extended the ``__cuda_array_interface__`` with an optional mask attribute in 4199. * Gregory R. Lee replaced deprecated use of ``inspect.getargspec`` in 4311. General Enhancements: * PR 4328: Replace GC macro with function call * PR 4311: Avoid deprecated use of inspect.getargspec * PR 4296: Slacken window function testing tol on ppc64le * PR 4254: Add reference counting to register_dispatcher * PR 4239: Support len() of multi-dim arrays in array analysis * PR 4234: Raise informative error for np.kron array order * PR 4232: Add unicodetype db, low level str functions and examples. * PR 4229: Make hashing cacheable * PR 4227: Include numba version in reportable error message * PR 4216: Add dominator tree * PR 4200: Add signature parameter to inspect_types * PR 4196: Catch missing imports of internal functions. * PR 4180: Update use of unlowerable global message. * PR 4166: Add tests for PR 4149 * PR 4157: Support for np.flatnonzero * PR 4149: Implement dominance frontier for SSA for the Numba IR * PR 4148: Call branch pruning in inline_closure_call() * PR 4132: Reduce usage of inttoptr * PR 4129: Support contains for range * PR 4112: better error messages for np.transpose and tuples * PR 4110: Add range attrs, start, stop, step * PR 4077: Add np select * PR 4076: Add numpy windowing functions support (np.bartlett, np.hamming, np.blackman, np.hanning, np.kaiser) * PR 4095: Support ir.Global/FreeVar in find_const() * PR 3691: Make TypingError abort compiling earlier * PR 3646: Log internal errors encountered in typeinfer Fixes: * PR 4303: Work around scipy bug 10206 * PR 4302: Fix flake8 issue on master * PR 4301: Fix integer literal bug in np.select impl * PR 4291: Fix pickling of jitclass type * PR 4262: Resolves 4251 - Fix bug in reshape analysis. * PR 4233: Fixes issue revealed by 4215 * PR 4224: Fix 4223. Looplifting error due to StaticSetItem in objectmode * PR 4222: Fix bad python path. * PR 4178: Fix unary operator overload, check with unicode impl * PR 4173: Fix return type in np.bincount with weights * PR 4153: Fix slice shape assignment in array analysis * PR 4152: fix status check in dict lookup * PR 4145: Use callable instead of checking __module__ * PR 4118: Fix inline assembly support on CPU. * PR 4088: Resolves 4075 - parfors array_analysis bug. * PR 4085: Resolves 3314 - parfors array_analysis bug with reshape. CUDA Enhancements/Fixes: * PR 4199: Extend `__cuda_array_interface__` with optional mask attribute, bump version to 1 * PR 4137: CUDA - Fix round Builtin * PR 4114: Support 3rd party activated CUDA context Documentation Updates: * PR 4317: Add docs for ARMv8/AArch64 * PR 4318: Add supported platforms to the docs. Closes 4316 * PR 4295: Alter deprecation schedules * PR 4253: fix typo in pysupported docs * PR 4252: fix typo on repomap * PR 4241: remove unused import * PR 4240: fix typo in jitclass docs * PR 4205: Update return value order in normalize_signature docstring * PR 4237: Update doc links to point to latest not dev docs. * PR 4197: hyperlink repomap * PR 4170: Clarify docs on accumulating into arrays in prange * PR 4147: fix docstring for DictType iterables * PR 3951: A guide to overloading CI Updates: * PR 4300: AArch64 has no faulthandler package * PR 4273: pin to MKL BLAS for testing to get consistent results * PR 4209: Revert previous network tol patch and try with conda config * PR 4138: Remove tbb before Azure test only on Python 3, since it was already removed for Python 2 Contributors: Ehsan Totoni (core dev) Gregory R. Lee Guilherme Leobas James Bourbeau Joshua L. Adelman Keith Kraus Lucio Fernandez-Arjona Nick White Rob Ennis Siu Kwan Lam (core dev) Stan Seibert (core dev) Stuart Archibald (core dev) Todd A. Anderson (core dev) Valentin Haenel (core dev) ``` ### 0.44.1 ``` -------------- This patch release addresses some regressions reported in the 0.44.0 release: - PR 4165: Fix 4164 issue with NUMBAPRO_NVVM. - PR 4172: Abandon branch pruning if an arg name is redefined. (Fixes 4163) - PR 4183: Fix 4156. Problem with defining in-loop variables. ``` ### 0.44.0 ``` -------------- IMPORTANT: In this release a few significant deprecations (and some less significant ones) are being made, users are encouraged to read the related documentation. General enhancements in this release include: - Numba is backed by LLVM 8 on all platforms apart from ppc64le, which, due to bugs, remains on the LLVM 7.x series. - Numba's dictionary support now includes type inference for keys and values. - The .view() method now works for NumPy scalar types. - Newly supported NumPy functions added: np.delete, np.nanquantile, np.quantile, np.repeat, np.shape. In addition considerable effort has been made to fix some long standing bugs and a large number of other bugs, the "Fixes" section is very large this time! Enhancements from user contributed PRs (with thanks!): - Max Bolingbroke added support for the selective use of ``fastmath`` flags in 3847. - Rob Ennis made min() and max() work on iterables in 3820 and added np.quantile and np.nanquantile in 3899. - Sergey Shalnov added numerous unicode string related features, zfill in 3978, ljust in 4001, rjust and center in 4044 and strip, lstrip and rstrip in 4048. - Guilherme Leobas added support for np.delete in 3890 - Christoph Deil exposed the Numba CLI via ``python -m numba`` in 4066 and made numerous documentation fixes. - Leo Schwarz wrote the bulk of the code for jitclass default constructor arguments in 3852. - Nick White enhanced the CUDA backend to use min/max PTX instructions where possible in 4054. - Lucio Fernandez-Arjona implemented the unicode string ``__mul__`` function in 3952. - Dimitri Vorona wrote the bulk of the code to implement getitem and setitem for jitclass in 3861. General Enhancements: * PR 3820: Min max on iterables * PR 3842: Unicode type iteration * PR 3847: Allow fine-grained control of fastmath flags to partially address 2923 * PR 3852: Continuation of PR 2894 * PR 3861: Continuation of PR 3730 * PR 3890: Add support for np.delete * PR 3899: Support for np.quantile and np.nanquantile * PR 3900: Fix 3457 :: Implements np.repeat * PR 3928: Add .view() method for NumPy scalars * PR 3939: Update icc_rt clone recipe. * PR 3952: __mul__ for strings, initial implementation and tests * PR 3956: Type-inferred dictionary * PR 3959: Create a view for string slicing to avoid extra allocations * PR 3978: zfill operation implementation * PR 4001: ljust operation implementation * PR 4010: Support `dict()` and `{}` * PR 4022: Support for llvm 8 * PR 4034: Make type.Optional str more representative * PR 4041: Deprecation warnings * PR 4044: rjust and center operations implementation * PR 4048: strip, lstrip and rstrip operations implementation * PR 4066: Expose numba CLI via python -m numba * PR 4081: Impl `np.shape` and support function for `asarray`. * PR 4091: Deprecate the use of iternext_impl without RefType CUDA Enhancements/Fixes: * PR 3933: Adds `.nbytes` property to CUDA device array objects. * PR 4011: Add .inspect_ptx() to cuda device function * PR 4054: CUDA: Use min/max PTX Instructions * PR 4096: Update env-vars for CUDA libraries lookup Documentation Updates: * PR 3867: Code repository map * PR 3918: adding Joris' Fosdem 2019 presentation * PR 3926: order talks on applications of Numba by date * PR 3943: fix two small typos in vectorize docs * PR 3944: Fixup jitclass docs * PR 3990: mention preprint repo in FAQ. Fixes 3981 * PR 4012: Correct runtests command in contributing.rst * PR 4043: fix typo * PR 4047: Ambiguous Documentation fix for guvectorize. * PR 4060: Remove remaining mentions of autojit in docs * PR 4063: Fix annotate example in docstring * PR 4065: Add FAQ entry explaining Numba project name * PR 4079: Add Documentation for atomicity of typed.Dict * PR 4105: Remove info about CUDA ENVVAR potential replacement Fixes: * PR 3719: Resolves issue 3528. Adds support for slices when not using parallel=True. * PR 3727: Remove dels for known dead vars. * PR 3845: Fix mutable flag transmission in .astype * PR 3853: Fix some minor issues in the C source. * PR 3862: Correct boolean reinterpretation of data * PR 3863: Comments out the appveyor badge * PR 3869: fixes flake8 after merge * PR 3871: Add assert to ir.py to help enforce correct structuring * PR 3881: fix preparfor dtype transform for datetime64 * PR 3884: Prevent mutation of objmode fallback IR. * PR 3885: Updates for llvmlite 0.29 * PR 3886: Use `safe_load` from pyyaml. * PR 3887: Add tolerance to network errors by permitting conda to retry * PR 3893: Fix casting in namedtuple ctor. * PR 3894: Fix array inliner for multiple array definition. * PR 3905: Cherrypick 3903 to main * PR 3920: Raise better error if unsupported jump opcode found. * PR 3927: Apply flake8 to the numpy related files * PR 3935: Silence DeprecationWarning * PR 3938: Better error message for unknown opcode * PR 3941: Fix typing of ufuncs in parfor conversion * PR 3946: Return variable renaming dict from inline_closurecall * PR 3962: Fix bug in alignment computation of `Record.make_c_struct` * PR 3967: Fix error with pickling unicode * PR 3964: Unicode split algo versioning * PR 3975: Add handler for unknown locale to numba -s * PR 3991: Permit Optionals in ufunc machinery * PR 3995: Remove assert in type inference causing poor error message. * PR 3996: add is_ascii flag to UnicodeType * PR 4009: Prevent zero division error in np.linalg.cond * PR 4014: Resolves 4007. * PR 4021: Add a more specific error message for invalid write to a global. * PR 4023: Fix handling of titles in record dtype * PR 4024: Do a check if a call is const before saying that an object is multiply defined. * PR 4027: Fix issue 4020. Turn off no_cpython_wrapper flag when compiling for… * PR 4033: [WIP] Fixing wrong dtype of array inside reflected list 4028 * PR 4061: Change IPython cache dir name to numba_cache * PR 4067: Delete examples/notebooks/LinearRegr.py * PR 4070: Catch writes to global typed.Dict and raise. * PR 4078: Check tuple length * PR 4084: Fix missing incref on optional return None * PR 4089: Make the warnings fixer flush work for warning comparing on type. * PR 4094: Fix function definition finding logic for commented def * PR 4100: Fix alignment check on 32-bit. * PR 4104: Use PEP 508 compliant env markers for install deps Contributors: * Benjamin Zaitlen * Christoph Deil * David Hirschfeld * Dimitri Vorona * Ehsan Totoni (core dev) * Guilherme Leobas * Leo Schwarz * Lucio Fernandez-Arjona * Max Bolingbroke * NanduTej * Nick White * Ravi Teja Gutta * Rob Ennis * Sergey Shalnov * Siu Kwan Lam (core dev) * Stan Seibert (core dev) * Stuart Archibald (core dev) * Todd A. Anderson (core dev) * Valentin Haenel (core dev) ```
Links - PyPI: https://pypi.org/project/numba - Changelog: https://pyup.io/changelogs/numba/ - Repo: http://numba.github.com

Update numpy from 1.16.2 to 1.17.0.

Changelog ### 1.17.0 ``` ========================== This NumPy release contains a number of new features that should substantially improve its performance and usefulness, see Highlights below for a summary. The Python versions supported are 3.5-3.7, note that Python 2.7 has been dropped. Python 3.8b1 should work with the released source packages, but there are no future guarantees. Downstream developers should use Cython >= 0.29.10 for Python 3.8 support and OpenBLAS >= 3.7 (not currently out) to avoid problems on the Skylake architecture. The NumPy wheels on PyPI are built from the OpenBLAS development branch in order to avoid those problems. Highlights ========== * A new extensible random module along with four selectable random number generators and improved seeding designed for use in parallel processes has been added. The currently available bit generators are MT19937, PCG64, Philox, and SFC64. See below under New Features. * NumPy's FFT implementation was changed from fftpack to pocketfft, resulting in faster, more accurate transforms and better handling of datasets of prime length. See below under Improvements. * New radix sort and timsort sorting methods. It is currently not possible to choose which will be used, but they are hardwired to the datatype and used when either ``stable`` or ``mergesort`` is passed as the method. See below under Improvements. * Overriding numpy functions is now possible by default, see ``__array_function__`` below. New functions ============= * `numpy.errstate` is now also a function decorator Deprecations ============ ``np.polynomial`` functions warn when passed ``float`` in place of ``int`` -------------------------------------------------------------------------- Previously functions in this module would accept ``float`` values provided they were integral (``1.0``, ``2.0``, etc). For consistency with the rest of numpy, doing so is now deprecated, and in future will raise a ``TypeError``. Similarly, passing a float like ``0.5`` in place of an integer will now raise a ``TypeError`` instead of the previous ``ValueError``. Deprecate ``numpy.distutils.exec_command`` and ``numpy.distutils.temp_file_name`` --------------------------------------------------------------------------------- The internal use of these functions has been refactored and there are better alternatives. Relace ``exec_command`` with `subprocess.Popen` and ``temp_file_name`` with `tempfile.mkstemp`. Writeable flag of C-API wrapped arrays -------------------------------------- When an array is created from the C-API to wrap a pointer to data, the only indication we have of the read-write nature of the data is the ``writeable`` flag set during creation. It is dangerous to force the flag to writeable. In the future it will not be possible to switch the writeable flag to ``True`` from python. This deprecation should not affect many users since arrays created in such a manner are very rare in practice and only available through the NumPy C-API. `numpy.nonzero` should no longer be called on 0d arrays ------------------------------------------------------- The behavior of nonzero on 0d arrays was surprising, making uses of it almost always incorrect. If the old behavior was intended, it can be preserved without a warning by using ``nonzero(atleast_1d(arr))`` instead of ``nonzero(arr)``. In a future release, it is most likely this will raise a `ValueError`. Writing to the result of `numpy.broadcast_arrays` will warn ----------------------------------------------------------- Commonly `numpy.broadcast_arrays` returns a writeable array with internal overlap, making it unsafe to write to. A future version will set the ``writeable`` flag to ``False``, and require users to manually set it to ``True`` if they are sure that is what they want to do. Now writing to it will emit a deprecation warning with instructions to set the ``writeable`` flag ``True``. Note that if one were to inspect the flag before setting it, one would find it would already be ``True``. Explicitly setting it, though, as one will need to do in future versions, clears an internal flag that is used to produce the deprecation warning. To help alleviate confusion, an additional `FutureWarning` will be emitted when accessing the ``writeable`` flag state to clarify the contradiction. Future Changes ============== Shape-1 fields in dtypes won't be collapsed to scalars in a future version -------------------------------------------------------------------------- Currently, a field specified as ``[(name, dtype, 1)]`` or ``"1type"`` is interpreted as a scalar field (i.e., the same as ``[(name, dtype)]`` or ``[(name, dtype, ()]``). This now raises a FutureWarning; in a future version, it will be interpreted as a shape-(1,) field, i.e. the same as ``[(name, dtype, (1,))]`` or ``"(1,)type"`` (consistently with ``[(name, dtype, n)]`` / ``"ntype"`` with ``n>1``, which is already equivalent to ``[(name, dtype, (n,)]`` / ``"(n,)type"``). Compatibility notes =================== float16 subnormal rounding -------------------------- Casting from a different floating point precision to float16 used incorrect rounding in some edge cases. This means in rare cases, subnormal results will now be rounded up instead of down, changing the last bit (ULP) of the result. Signed zero when using divmod ----------------------------- Starting in version 1.12.0, numpy incorrectly returned a negatively signed zero when using the ``divmod`` and ``floor_divide`` functions when the result was zero. For example:: >>> np.zeros(10)//1 array([-0., -0., -0., -0., -0., -0., -0., -0., -0., -0.]) With this release, the result is correctly returned as a positively signed zero:: >>> np.zeros(10)//1 array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]) ``MaskedArray.mask`` now returns a view of the mask, not the mask itself ------------------------------------------------------------------------ Returning the mask itself was unsafe, as it could be reshaped in place which would violate expectations of the masked array code. It's behavior is now consistent with the ``.data`` attribute, which also returns a view. The underlying mask can still be accessed with ``._mask`` if it is needed. Tests that contain ``assert x.mask is not y.mask`` or similar will need to be updated. Do not lookup ``__buffer__`` attribute in `numpy.frombuffer` ------------------------------------------------------------ Looking up ``__buffer__`` attribute in `numpy.frombuffer` was undocumented and non-functional. This code was removed. If needed, use ``frombuffer(memoryview(obj), ...)`` instead. ``out``is buffered for memory overlaps in ``np.take``, ``np.choose``, ``np.put`` -------------------------------------------------------------------------------- If the out argument to these functions is provided and has memory overlap with the other arguments, it is now buffered to avoid order-dependent behavior. Unpickling while loading requires explicit opt-in ------------------------------------------------- The functions ``np.load``, and ``np.lib.format.read_array`` take an ``allow_pickle`` keyword which now defaults to ``False`` in response to `CVE-2019-6446 <https://nvd.nist.gov/vuln/detail/CVE-2019-6446>`_. Potential changes to the random stream in old random module ----------------------------------------------------------- Due to bugs in the application of log to random floating point numbers, the stream may change when sampling from ``np.random.beta``, ``np.random.binomial``, ``np.random.laplace``, ``np.random.logistic``, ``np.random.logseries`` or ``np.random.multinomial`` if a 0 is generated in the underlying MT19937 random stream. There is a 1 in :math:`10^{53}` chance of this occurring, and so the probability that the stream changes for any given seed is extremely small. If a 0 is encountered in the underlying generator, then the incorrect value produced (either ``np.inf`` or ``np.nan``) is now dropped. ``i0`` now always returns a result with the same shape as the input ------------------------------------------------------------------- Previously, the output was squeezed, such that, e.g., input with just a single element would lead to an array scalar being returned, and inputs with shapes such as ``(10, 1)`` would yield results that would not broadcast against the input. Note that we generally recommend the SciPy implementation over the numpy one: it is a proper ufunc written in C, and more than an order of magnitude faster. ``np.can_cast`` no longer assumes all unsafe casting is allowed --------------------------------------------------------------- Previously, ``can_cast`` returned `True` for almost all inputs for ``casting='unsafe'``, even for cases where casting was not possible, such as from a structured dtype to a regular one. This has been fixed, making it more consistent with actual casting using, e.g., the ``.astype`` method. ``arr.writeable`` can be switched to true slightly more often ------------------------------------------------------------- In rare cases, it was not possible to switch an array from not writeable to writeable, although a base array is writeable. This can happen if an intermediate ``arr.base`` object is writeable. Previously, only the deepest base object was considered for this decision. However, in rare cases this object does not have the necessary information. In that case switching to writeable was never allowed. This has now been fixed. C API changes ============= dimension or stride input arguments are now passed by ``npy_intp const*`` ------------------------------------------------------------------------- Previously these function arguments were declared as the more strict ``npy_intp*``, which prevented the caller passing constant data. This change is backwards compatible, but now allows code like:: npy_intp const fixed_dims[] = {1, 2, 3}; // no longer complains that the const-qualifier is discarded npy_intp size = PyArray_MultiplyList(fixed_dims, 3); New Features ============ New extensible random module with selectable random number generators --------------------------------------------------------------------- A new extensible random module along with four selectable random number generators and improved seeding designed for use in parallel processes has been added. The currently available bit generators are MT19937, PCG64, Philox, and SFC64. PCG64 is the new default while MT19937 is retained for backwards compatibility. Note that the legacy random module is unchanged and is now frozen, your current results will not change. Extensive documentation for the new module is available online at `NumPy devdocs <http://www.numpy.org/devdocs/reference/random/index.html>`_. libFLAME -------- Support for building NumPy with the libFLAME linear algebra package as the LAPACK, implementation, see `libFLAME <https://www.cs.utexas.edu/~flame/web/libFLAME.html>`_ for details. User-defined BLAS detection order --------------------------------- ``numpy.distutils`` now uses an environment variable, comma-separated and case insensitive, to determine the detection order for BLAS libraries. By default ``NPY_BLAS_ORDER=mkl,blis,openblas,atlas,accelerate,blas``. However, to force the use of OpenBLAS simply do:: NPY_BLAS_ORDER=openblas python setup.py build which forces the use of OpenBLAS. This may be helpful for users which have a MKL installation but wishes to try out different implementations. User-defined LAPACK detection order ----------------------------------- ``numpy.distutils`` now uses an environment variable, comma-separated and case insensitive, to determine the detection order for LAPACK libraries. By default ``NPY_BLAS_ORDER=mkl,openblas,flame,atlas,accelerate,lapack``. However, to force the use of OpenBLAS simply do:: NPY_LAPACK_ORDER=openblas python setup.py build which forces the use of OpenBLAS. This may be helpful for users which have a MKL installation but wishes to try out different implementations. ``np.ufunc.reduce`` and related functions now accept a ``where`` mask --------------------------------------------------------------------- ``np.ufunc.reduce``, ``np.sum``, ``np.prod``, ``np.min``, ``np.max`` all now accept a ``where`` keyword argument, which can be used to tell which elements to include in the reduction. For reductions that do not have an identity, it is necessary to also pass in an initial value (e.g., ``initial=np.inf`` for ``np.min``). For instance, the equivalent of ``nansum`` would be, ``np.sum(a, where=~np.isnan(a))``. Timsort and radix sort have replaced mergesort for stable sorting ----------------------------------------------------------------- Both radix sort and timsort have been implemented and are now used in place of mergesort. Due to the need to maintain backward compatibility, the sorting ``kind`` options ``"stable"`` and ``"mergesort"`` have been made aliases of each other with the actual sort implementation depending on the array type. Radix sort is used for small integer types of 16 bits or less and timsort for the remaining types. Timsort features improved performace on data containing already or nearly sorted data and performs like mergesort on random data and requires O(n/2) working space. Details of the timsort algorithm can be found at `CPython listsort.txt <https://github.com/python/cpython/blob/3.7/Objects/listsort.txt>`_. ``np.unpackbits`` now accepts a ``count`` parameter --------------------------------------------------- ``count`` allows subsetting the number of bits that will be unpacked up-front, rather than reshaping and subsetting later, making the ``packbits`` operation invertible, and the unpacking less wasteful. Counts larger than the number of available bits add zero padding. Negative counts trim bits off the end instead of counting from the beginning. None counts implement the existing behavior of unpacking everything. ``np.linalg.svd`` and ``np.linalg.pinv`` can be faster on hermitian inputs -------------------------------------------------------------------------- These functions now accept a ``hermitian`` argument, matching the one added to ``np.linalg.matrix_rank`` in 1.14.0. divmod operation is now supported for two ``timedelta64`` operands ------------------------------------------------------------------ The divmod operator now handles two ``np.timedelta64`` operands, with type signature mm->qm. ``np.fromfile`` now takes an ``offset`` argument ------------------------------------------------ This function now takes an ``offset`` keyword argument for binary files, which specifics the offset (in bytes) from the file's current position. Defaults to 0. New mode "empty" for ``np.pad`` ------------------------------- This mode pads an array to a desired shape without initializing the new entries. ``np.empty_like`` and related functions now accept a ``shape`` argument ----------------------------------------------------------------------- ``np.empty_like``, ``np.full_like``, ``np.ones_like`` and ``np.zeros_like`` now accept a ``shape`` keyword argument, which can be used to create a new array as the prototype, overriding its shape as well. This is particularly useful when combined with the ``__array_function__`` protocol, allowing the creation of new arbitrary-shape arrays from NumPy-like libraries when such an array is used as the prototype. Floating point scalars implement ``as_integer_ratio`` to match the builtin float -------------------------------------------------------------------------------- This returns a (numerator, denominator) pair, which can be used to construct a `fractions.Fraction`. Structured ``dtype`` objects can be indexed with multiple fields names ---------------------------------------------------------------------- ``arr.dtype[['a', 'b']]`` now returns a dtype that is equivalent to ``arr[['a', 'b']].dtype``, for consistency with ``arr.dtype['a'] == arr['a'].dtype``. Like the dtype of structured arrays indexed with a list of fields, this dtype has the same ``itemsize`` as the original, but only keeps a subset of the fields. This means that ``arr[['a', 'b']]`` and ``arr.view(arr.dtype[['a', 'b']])`` are equivalent. ``.npy`` files support unicode field names ------------------------------------------ A new format version of 3.0 has been introduced, which enables structured types with non-latin1 field names. This is used automatically when needed. `numpy.packbits` and `numpy.unpackbits` accept an ``order`` keyword ------------------------------------------------------------------- The ``order`` keyword defaults to ``big``, and will order the **bits** accordingly. For ``'big'`` 3 will become ``[0, 0, 0, 0, 0, 0, 1, 1]``, and ``[1, 1, 0, 0, 0, 0, 0, 0]`` for ``little`` Improvements ============ 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. Replacement of the fftpack based FFT module by the pocketfft library -------------------------------------------------------------------- Both implementations have the same ancestor (Fortran77 FFTPACK by Paul N. Swarztrauber), but pocketfft contains additional modifications which improve both accuracy and performance in some circumstances. For FFT lengths containing large prime factors, pocketfft uses Bluestein's algorithm, which maintains ``O(N log N)`` run time complexity instead of deteriorating towards ``O(N*N)`` for prime lengths. Also, accuracy for real valued FFTs with near prime lengths has improved and is on par with complex valued FFTs. Further improvements to ``ctypes`` support in `numpy.ctypeslib` --------------------------------------------------------------- A new `numpy.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, `numpy.ctypeslib.as_ctypes` now supports a much wider range of array types, including structures, booleans, and integers of non-native endianness. `numpy.errstate` is now also a function decorator ------------------------------------------------- Currently, if you have a function like:: def foo(): pass and you want to wrap the whole thing in ``errstate``, you have to rewrite it like so:: def foo(): with np.errstate(...): pass but with this change, you can do:: np.errstate(...) def foo(): pass thereby saving a level of indentation `numpy.exp` and `numpy.log` speed up for float32 implementation --------------------------------------------------------------- float32 implementation of numpy.exp and numpy.log now benefit from AVX2/AVX512 instruction set which are detected during runtime. numpy.exp has a max ulp error of 2.52 and numpy.log has a max ulp error or 3.83. Improve performance of `numpy.pad` ---------------------------------- The performance of the function has been improved for most cases by filling in a preallocated array with the desired padded shape instead of using concatenation. `numpy.interp` handles infinities more robustly ----------------------------------------------- In some cases where ``np.interp`` would previously return ``np.nan``, it now returns an appropriate infinity. Pathlib support for ``np.fromfile``, ``ndarray.tofile`` and ``ndarray.dump`` ---------------------------------------------------------------------------- ``np.fromfile``, ``np.ndarray.tofile`` and ``np.ndarray.dump`` now support the `pathlib.Path` type for the ``file``/``fid`` parameter. Specialized ``np.isnan``, ``np.isinf``, and ``np.isfinite`` ufuncs for bool and int types ----------------------------------------------------------------------------------------- The boolean and integer types are incapable of storing ``np.nan`` and ``np.inf`` values, which allows us to provide specialized ufuncs that are up to 250x faster than the current approach. ``np.isfinite`` supports ``datetime64`` and ``timedelta64`` types ----------------------------------------------------------------- Previously, `np.isfinite` used to raise a ``TypeError`` on being used on these two types. New keywords added to ``np.nan_to_num`` --------------------------------------- ``np.nan_to_num`` now accepts keywords ``nan``, ``posinf`` and ``neginf`` allowing the user to define the value to replace the ``nan``, positive and negative ``np.inf`` values respectively. MemoryErrors caused by allocated overly large arrays are more descriptive ------------------------------------------------------------------------- Often the cause of a MemoryError is incorrect broadcasting, which results in a very large and incorrect shape. The message of the error now includes this shape to help diagnose the cause of failure. `floor`, `ceil`, and `trunc` now respect builtin magic methods -------------------------------------------------------------- These ufuncs now call the ``__floor__``, ``__ceil__``, and ``__trunc__`` methods when called on object arrays, making them compatible with `decimal.Decimal` and `fractions.Fraction` objects. ``quantile`` now works on ``fraction.Fraction`` and ``decimal.Decimal`` objects ------------------------------------------------------------------------------- In general, this handles object arrays more gracefully, and avoids floating- point operations if exact arithmetic types are used. Support of object arrays in ``np.matmul`` ----------------------------------------- It is now possible to use ``np.matmul`` (or the ` operator) with object arrays. For instance, it is now possible to do:: from fractions import Fraction a = np.array([[Fraction(1, 2), Fraction(1, 3)], [Fraction(1, 3), Fraction(1, 2)]]) b = a a Changes ======= ``median`` and ``percentile`` family of functions no longer warn about ``nan`` ------------------------------------------------------------------------------ `numpy.median`, `numpy.percentile`, and `numpy.quantile` used to emit a ``RuntimeWarning`` when encountering an `numpy.nan`. Since they return the ``nan`` value, the warning is redundant and has been removed. ``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 NumPy functions now always support overrides with ``__array_function__`` ------------------------------------------------------------------------ NumPy now always checks the ``__array_function__`` method to implement overrides of NumPy functions on non-NumPy arrays, as described in `NEP 18`_. The feature was available for testing with NumPy 1.16 if appropriate environment variables are set, but is now always enabled. .. _`NEP 18` : http://www.numpy.org/neps/nep-0018-array-function-protocol.html `numpy.lib.recfunctions.structured_to_unstructured` does not squeeze single-field views --------------------------------------------------------------------------------------- Previously ``structured_to_unstructured(arr[['a']])`` would produce a squeezed result inconsistent with ``structured_to_unstructured(arr[['a', b']])``. This was accidental. The old behavior can be retained with ``structured_to_unstructured(arr[['a']]).squeeze(axis=-1)`` or far more simply, ``arr['a']``. ``clip`` now uses a ufunc under the hood ---------------------------------------- This means that registering clip functions for custom dtypes in C via ``descr->f->fastclip`` is deprecated - they should use the ufunc registration mechanism instead, attaching to the ``np.core.umath.clip`` ufunc. It also means that ``clip`` accepts ``where`` and ``casting`` arguments, and can be override with ``__array_ufunc__``. A consequence of this change is that some behaviors of the old ``clip`` have been deprecated: * Passing ``nan`` to mean "do not clip" as one or both bounds. This didn't work in all cases anyway, and can be better handled by passing infinities of the appropriate sign. * Using "unsafe" casting by default when an ``out`` argument is passed. Using ``casting="unsafe"`` explicitly will silence this warning. Additionally, there are some corner cases with behavior changes: * Padding ``max < min`` has changed to be more consistent across dtypes, but should not be relied upon. * Scalar ``min`` and ``max`` take part in promotion rules like they do in all other ufuncs. ``__array_interface__`` offset now works as documented ------------------------------------------------------ The interface may use an ``offset`` value that was mistakenly ignored. Pickle protocol in ``np.savez`` set to 3 for ``force zip64`` flag ----------------------------------------------------------------- ``np.savez`` was not using the ``force_zip64`` flag, which limited the size of the archive to 2GB. But using the flag requires us to use pickle protocol 3 to write ``object`` arrays. The protocol used was bumped to 3, meaning the archive will be unreadable by Python2. Structured arrays indexed with non-existent fields raise ``KeyError`` not ``ValueError`` ---------------------------------------------------------------------------------------- ``arr['bad_field']`` on a structured type raises ``KeyError``, for consistency with ``dict['bad_field']``. .. _`NEP 18` : http://www.numpy.org/neps/nep-0018-array-function-protocol.html ========================= ``` ### 1.16.4 ``` ========================== The NumPy 1.16.4 release fixes bugs reported against the 1.16.3 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.7-dev, which should fix issues on Skylake series cpus. Downstream developers building this release should use Cython >= 0.29.2 and, if using OpenBLAS, OpenBLAS > v0.3.7. The supported Python versions are 2.7 and 3.5-3.7. New deprecations ================ Writeable flag of C-API wrapped arrays -------------------------------------- When an array is created from the C-API to wrap a pointer to data, the only indication we have of the read-write nature of the data is the ``writeable`` flag set during creation. It is dangerous to force the flag to writeable. In the future it will not be possible to switch the writeable flag to ``True`` from python. This deprecation should not affect many users since arrays created in such a manner are very rare in practice and only available through the NumPy C-API. Compatibility notes =================== Potential changes to the random stream -------------------------------------- Due to bugs in the application of log to random floating point numbers, the stream may change when sampling from ``np.random.beta``, ``np.random.binomial``, ``np.random.laplace``, ``np.random.logistic``, ``np.random.logseries`` or ``np.random.multinomial`` if a 0 is generated in the underlying MT19937 random stream. There is a 1 in :math:`10^{53}` chance of this occurring, and so the probability that the stream changes for any given seed is extremely small. If a 0 is encountered in the underlying generator, then the incorrect value produced (either ``np.inf`` or ``np.nan``) is now dropped. Changes ======= `numpy.lib.recfunctions.structured_to_unstructured` does not squeeze single-field views --------------------------------------------------------------------------------------- Previously ``structured_to_unstructured(arr[['a']])`` would produce a squeezed result inconsistent with ``structured_to_unstructured(arr[['a', b']])``. This was accidental. The old behavior can be retained with ``structured_to_unstructured(arr[['a']]).squeeze(axis=-1)`` or far more simply, ``arr['a']``. Contributors ============ A total of 10 people contributed to this release. People with a "+" by their names contributed a patch for the first time. * Charles Harris * Eric Wieser * Dennis Zollo + * Hunter Damron + * Jingbei Li + * Kevin Sheppard * Matti Picus * Nicola Soranzo + * Sebastian Berg * Tyler Reddy Pull requests merged ==================== A total of 16 pull requests were merged for this release. * `13392 <https://github.com/numpy/numpy/pull/13392>`__: BUG: Some PyPy versions lack PyStructSequence_InitType2. * `13394 <https://github.com/numpy/numpy/pull/13394>`__: MAINT, DEP: Fix deprecated ``assertEquals()`` * `13396 <https://github.com/numpy/numpy/pull/13396>`__: BUG: Fix structured_to_unstructured on single-field types (backport) * `13549 <https://github.com/numpy/numpy/pull/13549>`__: BLD: Make CI pass again with pytest 4.5 * `13552 <https://github.com/numpy/numpy/pull/13552>`__: TST: Register markers in conftest.py. * `13559 <https://github.com/numpy/numpy/pull/13559>`__: BUG: Removes ValueError for empty kwargs in arraymultiter_new * `13560 <https://github.com/numpy/numpy/pull/13560>`__: BUG: Add TypeError to accepted exceptions in crackfortran. * `13561 <https://github.com/numpy/numpy/pull/13561>`__: BUG: Handle subarrays in descr_to_dtype * `13562 <https://github.com/numpy/numpy/pull/13562>`__: BUG: Protect generators from log(0.0) * `13563 <https://github.com/numpy/numpy/pull/13563>`__: BUG: Always return views from structured_to_unstructured when... * `13564 <https://github.com/numpy/numpy/pull/13564>`__: BUG: Catch stderr when checking compiler version * `13565 <https://github.com/numpy/numpy/pull/13565>`__: BUG: longdouble(int) does not work * `13587 <https://github.com/numpy/numpy/pull/13587>`__: BUG: distutils/system_info.py fix missing subprocess import (13523) * `13620 <https://github.com/numpy/numpy/pull/13620>`__: BUG,DEP: Fix writeable flag setting for arrays without base * `13641 <https://github.com/numpy/numpy/pull/13641>`__: MAINT: Prepare for the 1.16.4 release. * `13644 <https://github.com/numpy/numpy/pull/13644>`__: BUG: special case object arrays when printing rel-, abs-error ``` ### 1.16.3 ``` ========================== The NumPy 1.16.3 release fixes bugs reported against the 1.16.2 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. The most noticeable change in this release is that unpickling object arrays when loading ``*.npy`` or ``*.npz`` files now requires an explicit opt-in. This backwards incompatible change was made in response to `CVE-2019-6446 <https://nvd.nist.gov/vuln/detail/CVE-2019-6446>`_. Compatibility notes =================== Unpickling while loading requires explicit opt-in ------------------------------------------------- The functions ``np.load``, and ``np.lib.format.read_array`` take an `allow_pickle` keyword which now defaults to ``False`` in response to `CVE-2019-6446 <https://nvd.nist.gov/vuln/detail/CVE-2019-6446>`_. Improvements ============ Covariance in `random.mvnormal` cast to double ---------------------------------------------- This should make the tolerance used when checking the singular values of the covariance matrix more meaningful. Changes ======= ``__array_interface__`` offset now works as documented ------------------------------------------------------ The interface may use an ``offset`` value that was previously mistakenly ignored. ========================= ```
Links - PyPI: https://pypi.org/project/numpy - Changelog: https://pyup.io/changelogs/numpy/ - Homepage: https://www.numpy.org

Update multiprocess from 0.70.7 to 0.70.8.

The bot wasn't able to find a changelog for this release. Got an idea?

Links - PyPI: https://pypi.org/project/multiprocess - Changelog: https://pyup.io/changelogs/multiprocess/ - Repo: https://github.com/uqfoundation/multiprocess/releases/download/multiprocess-0.70.8/multiprocess-0.70.8.tar.gz - Homepage: https://pypi.org/project/multiprocess

Update pandas from 0.24.2 to 0.25.0.

The bot wasn't able to find a changelog for this release. Got an idea?

Links - PyPI: https://pypi.org/project/pandas - Homepage: http://pandas.pydata.org

Update scipy

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.02%) to 55.948% when pulling a44ac614acf624f62f6bd4299f630d890618884d on pyup/scheduled-update-2019-08-01 into 3571af6c8c2c6a8c259999e7bd569696059940ad on develop.