Unyt

Latest version: v3.0.4

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

Scan your dependencies

Page 1 of 6

3.0.4

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

This new bugfix release of ``unyt`` fixes bugs discovered since the v3.0.3 release.
It also adds support for foe and bethe units:

* Add foe and bethe units (`PR 521 <https://github.com/yt-project/unyt/pull/521>`_).
Thank you to Michael Zingale (zingale on GitHub) for the contribution.

Following is a list of all bug fixes and documentation fixes included in the release.

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

* Fix stephan-boltzmann constant accuracy and add radiation constant (`PR 520
<https://github.com/yt-project/unyt/pull/520>`_). Thank you to Mike Zingale
(zingale on GitHub) for the contribution.

* Fix raising a unyt array to an array power in sensible cases (`PR 524
<https://github.com/yt-project/unyt/pull/524>`_). Thank you to Clément Robert
(neutrinoceros on GitHub) for the contribution.

* Typo fixes and documentation fix (`PR 529 <https://github.com/yt-
project/unyt/pull/529>`_). Thank you to Jeroen Van Goey (BioGeek on GitHub) for
the contribution.

* Fix return units from numpy.ftt functions (`PR 531 <https://github.com/yt-
project/unyt/pull/531>`_). Thank you to Josh Borrow (JBorrow on GitHub) for the
contribution.

* Fix incorrect output unit for ``np.prod`` with an axis argument (`PR 537
<https://github.com/yt-project/unyt/pull/537>`_). Thank you to Kyle Oman (kyleoman
on GitHub) for the contribution.

* ``np.histogram*`` functions give correct units when weights and/or density are set
(`PR 539 <https://github.com/yt-project/unyt/pull/539>`_). Thank you to Kyle Oman
(kyleoman on GitHub) for the contribution.

* Fix an issue where ``np.histogramdd`` could create infinite recursion on some
inputs (`PR 541 <https://github.com/yt-project/unyt/pull/541>`_). Thank you to
Clément Robert (neutrinoceros on GitHub) for the contribution.

* ``linspace`` and ``logspace`` give incorrect results or crash with some inputs (`PR
544 <https://github.com/yt-project/unyt/pull/544>`_). Thank you to Kyle Oman
(kyleoman on GitHub) for the contribution.

* Fix typo in array function implementations (ftt -> fft) (`PR 547
<https://github.com/yt-project/unyt/pull/547>`_). Thank you to Clément Robert
(neutrinoceros on GitHub) for the contribution.

* Apply_over_axes no longer assumes user-supplied function preserves units (`PR 548
<https://github.com/yt-project/unyt/pull/548>`_). Thank you to Kyle Oman (kyleoman
on GitHub) for the contribution.

* Allow subclassing in ``unyt_array.__array_func__`` (`PR 550
<https://github.com/yt-project/unyt/pull/550>`_). Thank you to Kyle Oman (kyleoman
on GitHub) for the contribution.

* Fix unit handling for ``np.take`` and ``unyt_array.take`` (`PR 551 <https://github
.com/yt-project/unyt/pull/551>`_). Thank you to Kyle Oman (kyleoman on GitHub) for
the contribution.

* Fix a regression where ``np.linspace`` 's num argument would be ignored for
``unyt_array`` instances (`PR 553 <https://github.com/yt-project/unyt/pull/553>`_).
Thank you to Clément Robert (neutrinoceros on GitHub) for the contribution.

* Handle ``np.vecdot`` as a ufunc rather than an arrayfunc (`PR 557
<https://github.com/yt-project/unyt/pull/557>`_). Thank you to Kyle Oman (kyleoman
on GitHub) for the contribution.

* Fix an issue where hdf5 io wouldn't roundtrip properly for a ``unyt_quantity``
object (`PR 560 <https://github.com/yt-project/unyt/pull/560>`_). Thank you to
Clément Robert (neutrinoceros on GitHub) for the contribution.

* Make ``test_unique_values`` order-agnostic and fix testing against numpy 2.3 dev
(`PR 565 <https://github.com/yt-project/unyt/pull/565>`_). Thank you to Clément
Robert (neutrinoceros on GitHub) for the contribution.

3.0.3

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

This new bugfix release of ``unyt`` fixes bugs discovered since the v3.0.2 release.

* Fix defects when running test suite in isolation from the project's pytest
configuration (`PR 495 <https://github.com/yt-project/unyt/pull/495>`_). Thank you
to Clément Robert (neutrinoceros on GitHub) for the contribution.

* Drop test case for unpickling old pickle files as too sensitive to upstream changes
(`PR 498 <https://github.com/yt-project/unyt/pull/498>`_). Thank you to Clément
Robert (neutrinoceros on GitHub) for the contribution.

* Fix signature incompatibilities in nep 18 wrapped functions (`PR 500
<https://github.com/yt-project/unyt/pull/500>`_). Thank you to Clément Robert
(neutrinoceros on GitHub) for the contribution.

* Fix an incompatibility with sympy 1.13.0rc1 (`PR 504
<https://github.com/yt-project/unyt/pull/504>`_). Thank you to Clément Robert
(neutrinoceros on GitHub) for the contribution.

* Adjust doctests to changes in array repr from numpy 2.0 (`PR 506
<https://github.com/yt-project/unyt/pull/506>`_). Thank you to Clément Robert
(neutrinoceros on GitHub) for the contribution.

* TST: declare np.unstack as subclass-safe (fix incompatibility with Numpy 2.1)
(`PR 509 <https://github.com/yt-project/unyt/pull/509>`_). Thank you to
Clément Robert (neutrinoceros on GitHub) for the contribution.

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.

Page 1 of 6

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.