Unyt

Latest version: v3.0.2

Safety actively analyzes 619528 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 6

3.0.2

------------------

This new bugfix release of ``unyt`` fixes bugs discovered since the v3.0.1 release,
and is intended to be compatible with the upcoming NumPy 2.0 release.

* Fix minimal requirement on setuptools_scm (`PR 471 <https://github.com/yt-
project/unyt/pull/471>`_). Thank you to Clément Robert (neutrinoceros on GitHub)
for the contribution.

* Explicitly forbid destructive edits to the default unit registry (`PR 475
<https://github.com/yt-project/unyt/pull/475>`_). Thank you to Clément Robert
(neutrinoceros on GitHub) for the contribution.

* Fix an issue where array functions would raise ``UnitInconsistencyError`` when
operands' units differ by some dimensionless factor (`PR 478
<https://github.com/yt-project/unyt/pull/478>`_). Thank you to Clément Robert
(neutrinoceros on GitHub) for the contribution.

* Implement and test array functions new in numpy 2.0 (`PR 483
<https://github.com/yt-project/unyt/pull/483>`_). Thank you to Clément Robert
(neutrinoceros on GitHub) for the contribution.

* Fix compat with numpy dev for ``np.trapezoid`` (previously named np.trapz) (`PR
486 <https://github.com/yt-project/unyt/pull/486>`_). Thank you to Clément Robert
(neutrinoceros on GitHub) for the contribution.

* Implement missing support for ``np.cbrt`` (`PR 491 <https://github.com/yt-
project/unyt/pull/491>`_). Thank you to yuyttenhove for the contribution.

* Fix compatibility with numpy 2.0 copy semantics (`PR 492 <https://github.com/yt-
project/unyt/pull/492>`_). Thank you to Clément Robert (neutrinoceros on GitHub)
for the contribution.

3.0.1

------------------

This new bugfix release of ``unyt`` fixes a few bugs since the v3.0.0 release.

* Fix an issue where array functions would raise ``UnitConsistencyError`` on
``unyt_array`` objects using non-default unit registries
(`PR 463 <https://github.com/yt-project/unyt/pull/463>`_). Thank you to
Clément Robert (neutrinoceros on GitHub) for the contribution.

* Fix an issue where array functions would crash (``AttributeError``) when passed
non-``ndarray`` array-like objects (e.g. Python lists)
(`PR 464 <https://github.com/yt-project/unyt/pull/464>`_). Thank you to
Clément Robert (neutrinoceros on GitHub) for the contribution.

* Fix backward compatibility for calling ``numpy.histogram`` with implicit
range units (`PR 466 <https://github.com/yt-project/unyt/pull/466>`_). Thank
you to Clément Robert (neutrinoceros on GitHub) for the contribution.

3.0.0

------------------

This new major release of ``unyt`` fixes a number of issues and adds a number
of new features. Major contributions include:

* Support for Python 3.8 has been dropped.
* Support for Python 3.12 has been added.
* Support for NumPy <1.19.3 has been dropped.
* Support for SymPy <1.7 has been dropped.
* A new ``unyt_dask_array`` class, which implements a subclass of standard
`dask arrays <https://docs.dask.org/en/stable/>`_ with units attached, has
been added (`PR 185 <https://github.com/yt-project/unyt/pull/185>`_). See
:ref:`dask` for more details. Thank you to Chris Havlin (chrishavlin on
Github) for the contribution.

* A number of new metric and non-metric units have been added in
`PR 441 <https://github.com/yt-project/unyt/pull/442>`_. Thank you
to John ZuHone (jzuhone on GitHub) for the contribution.

* A number of common values for the solar metallicity found in the
literature have been added as new metallicity units
(`PR 315 <https://github.com/yt-project/unyt/pull/315>`_). See
:ref:`metal_conversions` for more details. Thank you to John ZuHone
(jzuhone on GitHub) for the contribution.

* The "liter" unit has been added (`PR 305 <https://github.com/yt-project/unyt/pull/305>`_).
Thank you to Nathan Goldbaum (ngoldbaum on GitHub) for the contribution.

* The following common systems engineering units for energy have been added:
``MMBTU``, ``therm``, ``quad``, and ``Wh``
(`PR 294 <https://github.com/yt-project/unyt/pull/294>`_). Thank you to
Sam Dotson (samgdotson on GitHub) for the contribution.

* The ``returns`` decorator (documented in :ref:`checking_units`) now allows
dimension-checking of multiple return values
(`PR 435 <https://github.com/yt-project/unyt/pull/435>`_).
Thank you to Daniel Bates (db434 on GitHub) for the contribution.

* A number of PRs to support
`NEP 18 <https://numpy.org/neps/nep-0018-array-function-protocol.html>`_,
including the following (thank you to Clément Robert, neutrinoceros on
GitHub, and Nathan Goldbaum, ngoldbaum on Github, for the contributions):

- `PR 200 <https://github.com/yt-project/unyt/pull/200>`_.
- `PR 293 <https://github.com/yt-project/unyt/pull/293>`_.
- `PR 295 <https://github.com/yt-project/unyt/pull/295>`_.
- `PR 304 <https://github.com/yt-project/unyt/pull/304>`_.
- `PR 309 <https://github.com/yt-project/unyt/pull/309>`_.
- `PR 313 <https://github.com/yt-project/unyt/pull/313>`_.
- `PR 316 <https://github.com/yt-project/unyt/pull/316>`_.
- `PR 317 <https://github.com/yt-project/unyt/pull/317>`_.
- `PR 319 <https://github.com/yt-project/unyt/pull/319>`_.
- `PR 320 <https://github.com/yt-project/unyt/pull/320>`_.
- `PR 324 <https://github.com/yt-project/unyt/pull/324>`_.
- `PR 325 <https://github.com/yt-project/unyt/pull/325>`_.
- `PR 329 <https://github.com/yt-project/unyt/pull/329>`_.
- `PR 338 <https://github.com/yt-project/unyt/pull/338>`_.
- `PR 348 <https://github.com/yt-project/unyt/pull/348>`_.
- `PR 351 <https://github.com/yt-project/unyt/pull/351>`_.
- `PR 352 <https://github.com/yt-project/unyt/pull/352>`_.
- `PR 388 <https://github.com/yt-project/unyt/pull/388>`_.
- `PR 394 <https://github.com/yt-project/unyt/pull/394>`_.
- `PR 395 <https://github.com/yt-project/unyt/pull/395>`_.
- `PR 396 <https://github.com/yt-project/unyt/pull/396>`_.
- `PR 397 <https://github.com/yt-project/unyt/pull/397>`_.
- `PR 398 <https://github.com/yt-project/unyt/pull/398>`_.

* A fix for for the LaTeX representation of Planck units
(`PR 379 <https://github.com/yt-project/unyt/pull/379>`_). Thank you to
Peter Hayman (haymanpf on GitHub) for the contribution.

* A fix for a bug that prevented the conversion of dimensionless arrays
to their corresponding `AstroPy Quantities <https://docs.astropy.org/en/stable/units/>`_
(`PR 437 <https://github.com/yt-project/unyt/pull/437>`_). Thank you to
Clément Robert (neutrinoceros on GitHub) for the contribution.

* A fix for a bug in subtraction of temperature quantities that resulted in
``degC`` units being returned instead of ``delta_degC`` units
(`PR 413 <https://github.com/yt-project/unyt/pull/413>`_). Thank you
to Clément Robert (neutrinoceros on GitHub) for the contribution.

* Fixes for issues with the comparison of temperature quantities
(`PR 408 <https://github.com/yt-project/unyt/pull/408>`_ and
`PR 412 <https://github.com/yt-project/unyt/pull/412>`_). Thank you
to Clément Robert (neutrinoceros on GitHub) for the contribution.

* Support for versions of NumPy < 1.19 has been dropped in this version
(`PR 403 <https://github.com/yt-project/unyt/pull/434>`_). Thank you
to Clément Robert (neutrinoceros on GitHub) for the contribution.

* A number of PRs to support NumPy 2.0, thank you to Clément Robert
(neutrinoceros on GitHub) for the contributions:

- `PR 434 <https://github.com/yt-project/unyt/pull/434>`_.
- `PR 442 <https://github.com/yt-project/unyt/pull/442>`_.
- `PR 443 <https://github.com/yt-project/unyt/pull/443>`_.
- `PR 445 <https://github.com/yt-project/unyt/pull/445>`_.
- `PR 448 <https://github.com/yt-project/unyt/pull/448>`_.
- `PR 455 <https://github.com/yt-project/unyt/pull/455>`_.
- `PR 456 <https://github.com/yt-project/unyt/pull/456>`_.

2.9.5

------------------

* Fix a regression where arrays elements with dtype ``'int8'`` would not compare to floats
as intended. See `PR 371 <https://github.com/yt-project/unyt/pull/371>`_. Thank you to
Clément Robert (neutrinoceros on GitHub) and Nathan Goldbaum (ngoldbaum on GitHub) for
the contribution.

* Raise an error in case an array element is assigned to a new value with incompatible
units. See `PR 375 <https://github.com/yt-project/unyt/pull/375>`_ and `PR #376
<https://github.com/yt-project/unyt/pull/376>`_. Thank you to Nathan Goldbaum
(ngoldbaum on GitHub) for the contribution.

2.9.4

------------------

* Make ``unyt_quantity.from_string`` parse ints.
See `PR 278 <https://github.com/yt-project/unyt/pull/278>`_.
Thank you to Nathan Goldbaum (ngoldbaum on GitHub) for the contribution.
* TST: migrate from tox-pyenv to tox-gh-actions 344
See `PR 344 <https://github.com/yt-project/unyt/pull/344>`_.
Thank you to Clément Robert (neutrinoceros on GitHub) for the contribution.
* Correctly test string comparison depending on numpy version 358
See `PR 358 <https://github.com/yt-project/unyt/pull/358>`_.
Thank you to Clément Robert (neutrinoceros on GitHub) for the contribution.
* Multiple fixes for ``unyt_quantity.from_string``

- fix a bug where ``unyt_quantity.from_string`` would drop part of the unit expression
- fix a bug where ``unyt_quantity.from_string`` would choke on unit expressions starting with ``'*'`` or ``'/'``
- fix a bug where ``unyt_quantity.from_string`` would choke on space-separated unit expressions
- fix roundtrip for ``unyt_quantity.from_string`` and ``unyt_quantity.to_string`` methods
- simplify unit regexp (``'**/2'`` isn't a valid exponent)
- fix a bug where malformed string input would be incorrectly parsed by ``unyt_quantity.from_string``

See `PR 362 <https://github.com/yt-project/unyt/pull/362>`_.
Thank you to Clément Robert (neutrinoceros on GitHub) for the contribution,
and to Chris Byrohl (cbyrohl on GitHub) for the report.

2.9.3

------------------

* Fix a future incompatibility with numpy 1.25 (unreleased) where comparing
``unyt_array`` objects to non-numeric objects (e.g. strings) would cause a
crash. See `PR 333 <https://github.com/yt-project/unyt/pull/333>`_. Thank you
to Clément Robert (neutrinoceros on GitHub) and Nathan Goldbaum (ngoldbaum
on GitHub) for the contribution.

Page 1 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.