Metadata-Version: 2.1
Name: unyt
Version: 1.0.5
Summary: A package for handling numpy arrays with units
Home-page: https://github.com/yt-project/unyt
Author: The yt project
Author-email: yt-dev@python.org
License: BSD license
Keywords: unyt
Platform: UNKNOWN
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Requires-Dist: numpy (>="1.13.0")
Requires-Dist: sympy
Requires-Dist: six
Requires-Dist: backports.functools-lru-cache; python_version < "3.3"

====
unyt
====


.. image:: https://img.shields.io/pypi/v/unyt.svg
        :target: https://pypi.python.org/pypi/unyt

.. image:: https://img.shields.io/conda/vn/conda-forge/unyt.svg
        :target: https://anaconda.org/conda-forge/unyt
        :alt: conda-forge

.. image:: https://img.shields.io/travis/yt-project/unyt.svg
        :target: https://travis-ci.org/yt-project/unyt

.. image:: https://ci.appveyor.com/api/projects/status/4j1nxunkj759pgo0?svg=true
        :target: https://ci.appveyor.com/project/ngoldbaum/unyt

.. image:: https://readthedocs.org/projects/unyt/badge/?version=latest
        :target: https://unyt.readthedocs.io/en/latest/?badge=latest
        :alt: Documentation Status

.. image:: https://codecov.io/gh/yt-project/unyt/branch/master/graph/badge.svg
        :target: https://codecov.io/gh/yt-project/unyt
        :alt: Test Coverage

.. image:: http://joss.theoj.org/papers/dbc27acb614dd33eb02b029ef20e7fe7/status.svg
        :target: http://joss.theoj.org/papers/dbc27acb614dd33eb02b029ef20e7fe7
        :alt: Code Paper

|

 .. image:: docs/_static/yt_logo_small.png
         :target: https://yt-project.org
         :alt: The yt Project

A package for handling numpy arrays with units.

Often writing code that deals with data that has units can be confusing. A
function might return an array but at least with plain NumPy arrays, there is no
way to easily tell what the units of the data are without somehow knowing *a
priori*.

The ``unyt`` package (pronounced like "unit") provides a subclass of NumPy's
``ndarray`` class that knows about units. For example, one could do:

    >>> import unyt as u
    >>> distance_traveled = [3.4, 5.8, 7.2] * u.mile
    >>> print(distance_traveled.to('km'))
    [ 5.4717696  9.3341952 11.5872768] km

And a whole lot more! See `the documentation <http://unyt.readthedocs.io>`_ for
installation instructions, more examples, and full API reference.

This package only depends on ``numpy``, ``sympy``, ``six`` and, on Python 2.7,
``backports.functools_lru_cache`` (a backport of ``functools.lru_cache``).
Notably, it does *not* depend on ``yt`` and it is written in pure Python.

Code of Conduct
---------------

The ``unyt`` package is part of `The yt Project
<https://yt-project.org>`_. Participating in ``unyt`` development therefore
happens under the auspices of the `yt community code of conduct
<http://yt-project.org/doc/developing/developing.html#yt-community-code-of-conduct>`_. If
for any reason you feel that the code of conduct has been violated, please send
an e-mail to confidential@yt-project.org with details describing the
incident. All emails sent to this address will be treated with the strictest
confidence by an individual who does not normally participate in yt development.

License
-------

The unyt package is licensed under the BSD 3-clause license.

Citation
--------

If you make use of unyt in a publication we would appreciate a mention in the
text of the paper or in the acknowledgements.

We have `submitted a paper
<https://joss.theoj.org/papers/dbc27acb614dd33eb02b029ef20e7fe7>`_ to the
Journal of Open Source Software. A `preprint
<https://arxiv.org/abs/1806.02417>`_ is available on the arxiv. We would
appreciate a citation (`BibTeX
<http://adsabs.harvard.edu/cgi-bin/nph-bib_query?bibcode=2018arXiv180602417G&data_type=BIBTEX>`_)
to the paper if you make use of ``unyt`` for work that leads to a publication.


=======
History
=======

unyt began life as a submodule of yt named yt.units.

It was separated from yt.units as its own package in 2018.

1.0.5 (2018-08-03)
------------------

``unyt`` 1.0.5 includes changes that reflect the peew review process for the
JOSS method paper. The peer reviewers were Stuart Mumfork (`@cadair
<https://github.com/cadair>`_), Trevor Bekolay (`@tbekolay
<https://github.com/tbekolay>`_), and Yan Grange (`@ygrange
<https://github.com/ygrange>`_). The editor was Kyle Niemeyer (`@kyleniemeyer
<https://github.com/kyleniemeyer>`_). The` `unyt`` development team thank our
reviewers and editor for their help getting the ``unyt`` paper out the door as
well as for the numerous comments and suggestions that improved the paper and
package as a whole.

In addition we'd like to thank Mike Zingale, Meagan Lang, Maksin Ratkin,
DougAJ4, Ma Jianjun, Paul Ivanov, and Stephan Hoyer for reporting issues.

* Added docstrings for the custom exception classes defined by ``unyt``. See `PR
  #44 <https://github.com/yt-project/unyt/pull/44>`_.
* Added improved documentation to the contributor guide on how to run the tests
  and what the PR review guidelines are. See `PR #43
  <https://github.com/yt-project/unyt/pull/43>`_.
* Updates to the text of the method paper in response to reviewer
  suggestions. See `PR #42 <https://github.com/yt-project/unyt/pull/42>`_.
* It is now possible to run the tests on an installed copy of ``unyt`` by
  executing ``unyt.test()``. See `PR #41
  <https://github.com/yt-project/unyt/pull/41>`_.
* Minor edit to LICENSE file so GitHub recognizes it. See `PR #40
  <https://github.com/yt-project/unyt/pull/35>`_. Thank you to Kyle Sunden
  (`@ksunden <https://github.com/ksunden>`_) for the contribution.
* Add spatial frequency as a dimension and added support in the ``spectral``
  equivalence for the spatial frequency dimension. See `PR #38
  <https://github.com/yt-project/unyt/pull/38>`_ Thank you to Kyle Sunden
  (`@ksunden <https://github.com/ksunden>`_) for the contribution.
* Add support for Python 3.7. See `PR #37
  <https://github.com/yt-project/unyt/pull/35>`_.
* Importing ``unyt`` will now fail if ``numpy`` and ``sympy`` are not
  installed. See `PR #35 <https://github.com/yt-project/unyt/pull/35>`_
* Testing whether a unit name is contained in a unit registry using the Python
  ``in`` keyword will now work correctly for all unit names. See `PR #31
  <https://github.com/yt-project/unyt/pull/31>`_.
* The aliases for megagram in the top-level unyt namespace were incorrectly set
  to reference kilogram and now have the correct value. See `PR #29
  <https://github.com/yt-project/unyt/pull/29>`_.
* Make it possible to take scalars to dimensionless array powers with a properly
  broadcasted result without raising an error about units. See `PR #23
  <https://github.com/yt-project/unyt/pull/23>`_.
* Whether or not a unit is allowed to be SI-prefixable (for example, meter is
  SI-prefixable to form centimeter, kilometer, and many other units) is now
  stored as metadata in the unit registry rather than as global state inside
  ``unyt``. See `PR #21 <https://github.com/yt-project/unyt/pull/21>`_.
* Made adjustments to the rules for converting between CGS and MKS E&M units so
  that errors are only raised when going between unit systems and not merely
  when doing a complicated unit conversion invoving E&M units. See `PR #20
  <https://github.com/yt-project/unyt/pull/20>`_.
* ``round(q)`` where ``q`` is a ``unyt_quantity`` instance will no
  longer raise an error and will now return the nearest rounded float.
  See `PR #19 <https://github.com/yt-project/unyt/pull/19>`_.
* Fixed a typo in the readme. Thank you to Paul Ivanov (`@ivanov
  <https://github.com/ivanov>`_) for `the fix
  <https://github.com/yt-project/unyt/pull/16>`_.
* Added smoot as a unit. See `PR #14
  <https://github.com/yt-project/unyt/pull/14>`_.

1.0.4 (2018-06-08)
------------------

* Expand installation instructions
* Mention paper and arxiv submission in the readme.

1.0.3 (2018-06-06)
------------------

* Fix readme rendering on pypi

1.0.2 (2018-06-06)
------------------

* Added a paper to be submitted to the Journal of Open Source Software.
* Tweaks for the readme

1.0.1 (2018-05-24)
------------------

* Don't use setup_requires in setup.py

1.0.0 (2018-05-24)
------------------

* First release on PyPI.


