BREAKING CHANGE:
Boolean value of Quantities with offsets units is ambiguous, and so, now a ValueError
is raised when attempting to cast such a Quantity to boolean.
(Issue #965, Thanks Jon Thielen)
BREAKING CHANGE:
__array_ufunc__ has been implemented on pint.Unit to permit
multiplication/division by units on the right of ufunc-reliant array types (like
Sparse) with proper respect for the type casting hierarchy. However, until an
upstream issue with NumPy is resolved,
this breaks creation of Masked Array Quantities by multiplication on the right.
Read Pint's NumPy support
documentation for more details.
(Issues #963 and #966, Thanks Jon Thielen)
Documentation on Pint's array type compatibility has been added to the NumPy support
page, including a graph of the duck array type casting hierarchy as understood by Pint
for N-dimensional arrays.
(Issue #963, Thanks Jon Thielen, Stephan Hoyer, and Guido Imperiale)
Improved compatibility for downcast duck array types like Sparse.COO. A collection
of basic tests has been added.
(Issue #963, Thanks Jon Thielen)
Improvements to wraps and check:
fail upon decoration (not execution) by checking wrapped function signature against
wraps/check arguments.
(might BREAK test code)
wraps only accepts strings and Units (not quantities) to avoid confusion with magnitude.
(might BREAK code not conforming to documentation)
when strict=True, strings that can be parsed to quantities are accepted as arguments.
Add revolutions per second (rps)
Improved compatibility for upcast types like xarray's DataArray or Dataset, to which
Pint Quantities now fully defer for arithmetic and NumPy operations. A collection of
basic tests for proper deferral has been added (for full integration tests, see
xarray's test suite). The list of upcast types is available at
pint.compat.upcast_types in the API.
(Issue #959, Thanks Jon Thielen)
Added tests for immutability of the magnitude's type under common operations
(Issue #957, Thanks Jon Thielen)
Switched test configuration to pytest and added tests of Pint's matplotlib support.
(Issue #954, Thanks Jon Thielen)
Deprecate array protocol fallback except where explicitly defined (__array__,
__array_priority__, __array_function__, __array_ufunc__). The fallback will
remain until the next minor version, or if the environment variable
PINT_ARRAY_PROTOCOL_FALLBACK is set to 0.
(Issue #953, Thanks Jon Thielen)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme
Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)
Bumps pint from 0.9 to 0.10.
Changelog
Sourced from pint's changelog.
Commits
a917620
Preparing release 0.106dc7867
Add version.py to make zest.releaser work with setuptools_scmd5669bb
Updated .gitignoree405ece
Release related fixes255fdd5
Merge #969cbf1268
Removed README to avoid having to keep it in sync with README.rst9da654f
Updated README and index.rst402c623
Updated CHANGES87ead73
Merge #96658cce93
Update documentation to address MaskedArray breaking changeDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language - `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com): - Update frequency (including time of day and day of week) - Pull request limits (per update run and/or open at any time) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired)