| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| | |
Properly handle offset units for trapz
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Fix setitem with a masked array with multiple items (Fixes #1584)
|
| |\ \ |
|
| | | |
| | | |
| | | |
| | | | |
This was incorrectly passing through some non-masked values.
|
| | | | |
|
| |_|/
|/| | |
|
| | |
| | |
| | |
| | | |
Close #1505
|
| | |
| | |
| | |
| | | |
Close #1725
|
|\ \ \ |
|
| | | | |
|
| | | | |
|
| | | | |
|
|\ \ \ \ |
|
| |\ \ \ \ |
|
| | | | | | |
|
| | |\ \ \ \ |
|
| | | |\ \ \ \
| | | | | | | |
| | | | | | | | |
use `**kwargs` to pass along additional arguments to `ones_like`
|
| | | | | | | | |
|
| | | |\ \ \ \ \
| | | | |/ / / /
| | | |/| | | | |
Expose matplotlib formatter
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
* Support numpy delete
---------
Co-authored-by: Jules Chéron <43635101+jules-ch@users.noreply.github.com>
|
| | | |\ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Fix __dask_postcompute__() to better preserve type
|
| | | | |/ / / /
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
In Unidata/MetPy#2945, a call to dask's .compute() was causing the
resulting type to be a different Quantity() variant (from pint.util
rather than the parent registry), which resulted in isinstance()
failing. This changes things to use the appropriate type from `self`
rather than hard-coded class names.
|
| | | | | | | | |
|
| | | |/ / / / |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Closes #1658
|
| | | | | | | |
|
| | |/ / / /
| |/| | | | |
|
|/ / / / / |
|
|\ \ \ \ \
| | |_|_|/
| |/| | | |
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Add support for numpy positive ufunc
- Update CHANGES
- Add test for `positive`
Co-authored-by: Jules Chéron <43635101+jules-ch@users.noreply.github.com>
|
|/ / /
| | |
| | |
| | |
| | | |
Add a preprocessor to replace "%" by " percent " in order to avoid
eval interpreting `%` as an operator.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- api is now split into 3 parts
- files are reorganized in folders
Additionally, some class members (Quantity, Unit, Measurement, Group, Context, System)
are excluded from the docs as they confuse sphinx.
|
|\ \ \ |
|
| |\ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
1596: Add ndim attribute for pint-pandas compatibility r=hgrecco a=andrewgsavage
- [x] Closes #1599
- [x] Executed ``pre-commit run --all-files`` with no errors
- [x] The change is fully covered by automated unit tests
- [x] Documented in docs/ as appropriate
- [x] Added an entry to the CHANGES file
Co-authored-by: Andrew <andrewgsavage@gmail.com>
Co-authored-by: andrewgsavage <andrewgsavage@gmail.com>
|
| | |\ \ \ |
|
| | | | | | |
|
| | | | | | |
|
| | | |/ /
| | |/| | |
|
| |\ \ \ \
| | | | | |
| | | | | | |
Final step to split the registry from the parser
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | |/ / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Overview:
- All the code in facets is now independent of the definition textual format.
In particular, defintions such as UnitDefinition, ContextDefinition an so on
cannot be built directly from a string.
(some functions are kept only temporarily to simplify but transition)
Building Definition objects from string requires a parser that emits them.
- The standart pint format is implemented in delegates/txt_parser
using flexparser. Briefly each single line statement is mapped to
a ParsedStatement class and each larger construct to a Block class.
- The registry then has an adder function that takes a definition an
incorporate it into the registry.
A few nice features of this approach:
1. The Definition objects are standalone public objects,
you can now build them in a programatic way and incorporate
them to the registry using the define function that will
dispatch to the correct adder:
>>> new_unit = UnitDefintion( ....)
>>> ureg.define(new_unit) # might be called add in the future
No more being forced to use string definitions
(but you can still use them if you want)
2. Composition over inheritance. The Registry does not know how to
parse a definition, but it delegates this to another class which
can be changed. This makes it very easy to write another parser
(faster, simpler) o try out a completely different file format.
3. Error messages can be more meaningful.
Backwards incompatible changes
- is_base parameter Definitions is not needed any more. It is
now computed automatically leading to a leaner experience and
also avoiding incompatible states
- alias for dimensionality has been removed (for now at least)
The only one defined was speed as an alias of velocity.
- (Context|Group|System).from_lines and Definition.from string
have been rewritten in terms of the new parser.
But will be likely removed in the future
- Changing non_int_type is not possible after registry has been
created
- load_definition raises FileNotFoundError instead of a generic exception
if the file was not found
- the string representation of several definitions is now
not so user friendly terms of the new parser.
But will be likely removed in the future
- Changing non_int_type is not possible after registry has been
created
- load_definition raises FileNotFoundError instead of a generic exception
if the file was not found
- the string representation of several definitions is now
not so user friendly.
|
| |\ \ \ \
| | |_|_|/
| |/| | | |
String NaN creation with correct non_int_type
|
| | | |/
| | |/|
| | | |
| | | |
| | | |
| | | |
| | | | |
Creating NaN-value quantities should take into account the
non_int_type, and create a magnitude of the correct type. Not all
common non_int_type choices support NaN (eg, Fraction does not); this
will likely result in a ValueError in that case.
|
| | | | |
|