summaryrefslogtreecommitdiff
path: root/pint/facets
Commit message (Collapse)AuthorAgeFilesLines
* Remove deprecated use_decimalHernan Grecco2023-04-291-28/+2
|
* Merge pull request #1594 from dopplershift/fix-trapz-tempHernan Grecco2023-04-291-3/+56
|\ | | | | Properly handle offset units for trapz
| * Fix up dot/cross wrapper for non-multiplicative unitsRyan May2023-04-271-2/+25
| |
| * Properly handle offset units for trapz (Fixes #1593)Ryan May2023-04-271-2/+32
| |
* | Merge pull request #1608 from dopplershift/fix-1584Hernan Grecco2023-04-291-1/+6
|\ \ | | | | | | Fix setitem with a masked array with multiple items (Fixes #1584)
| * \ Merge branch 'master' into fix-1584Ryan May2022-11-2819-796/+671
| |\ \
| * | | Fix setitem with a masked array with multiple items (Fixes #1584)Ryan May2022-10-141-1/+6
| | | | | | | | | | | | | | | | This was incorrectly passing through some non-masked values.
* | | | Honor non_int_type when dividing (fix bug).Hernan Grecco2023-04-281-2/+2
| | | |
* | | | Honor non_int_type when dividing.Hernan Grecco2023-04-282-3/+13
| |_|/ |/| |
* | | Honor non_int_type when a unit without a magnitude is given as string.Hernan Grecco2023-04-271-3/+3
| | | | | | | | | | | | Close #1505
* | | Fix get_compatible_units for dynamically add units/dimensionsHernan Grecco2023-04-261-1/+1
| | | | | | | | | | | | Close #1725
* | | Fixed pr/1574 conflictsHernan Grecco2023-04-252-0/+232
|\ \ \
| * | | Silence verbose mip outputblewis22022-09-231-0/+1
| | | |
| * | | Fix pre-commit problemsblewis22022-08-301-53/+72
| | | |
| * | | Add to_preferredblewis22022-08-302-0/+213
| | | |
* | | | Merge branch 'master' into masterHernan Grecco2023-04-2519-56/+28
|\ \ \ \
| * \ \ \ Merge branch 'master' into patch-type-importsHernan Grecco2023-04-2417-46/+16
| |\ \ \ \
| | * | | | Run pre-commit run --all-files . Mostly removed empty linesHernan2023-04-2416-24/+0
| | | | | |
| | * | | | Merge branch 'master' into fix-1658Hernan Grecco2023-04-243-20/+17
| | |\ \ \ \
| | | * \ \ \ Merge pull request #1741 from keewis/fix-full_likeHernan Grecco2023-04-241-9/+3
| | | |\ \ \ \ | | | | | | | | | | | | | | | | use `**kwargs` to pass along additional arguments to `ones_like`
| | | | * | | | use **kwargs to pass along additional arguments to `ones_like`Justus Magin2023-04-141-9/+3
| | | | | | | |
| | | * | | | | Merge pull request #1703 from RemDelaporteMathurin/expose_matplotlib_formatterHernan Grecco2023-04-241-0/+4
| | | |\ \ \ \ \ | | | | |/ / / / | | | |/| | | | Expose matplotlib formatter
| | | | * | | | Added mpl_formatter attribute to PlainRegistryRemDelaporteMathurin2023-01-201-0/+4
| | | | | | | |
| | | * | | | | Support numpy delete (#1699)Dennis Göries2023-03-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Support numpy delete --------- Co-authored-by: Jules Chéron <43635101+jules-ch@users.noreply.github.com>
| | | * | | | | Merge pull request #1722 from dopplershift/fix-daskJules Chéron2023-03-221-11/+3
| | | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | Fix __dask_postcompute__() to better preserve type
| | | | * | | | | Fix __dask_postcompute__() to better preserve typeRyan May2023-03-081-11/+3
| | | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | | * | | | | add a override for `round`Justus Magin2023-03-071-0/+1
| | | | | | | |
| | | * | | | | add `min` and `max` to the array function overridesJustus Magin2023-03-071-0/+2
| | | |/ / / /
| | * | | | | Fix unit check with `atol` using np.allclose.Jules Chéron2022-11-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes #1658
| * | | | | | appease lintersAustin Orr2022-12-202-2/+5
| | | | | | |
| * | | | | | patch imports during type checkAustin Orr2022-12-206-11/+10
| | |/ / / / | |/| | | |
* | | | | | Remove deprecated `alen` function from numpy_funcTy Balduf2022-12-131-1/+0
|/ / / / /
* | | | | Merge branch 'master' into fix1277Jules Chéron2022-11-281-0/+1
|\ \ \ \ \ | | |_|_|/ | |/| | |
| * | | | Add positive ufunc (#1663)andrewgsavage2022-11-281-0/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 default preprocessor to support % symbolCarlos Pascual2022-11-231-0/+2
|/ / / | | | | | | | | | | | | Add a preprocessor to replace "%" by " percent " in order to avoid eval interpreting `%` as an operator.
* | | Partially reorganized docsHernan2022-10-264-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | - 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.
* | | Merge branch 'master' into broadcast_arraysandrewgsavage2022-10-2214-786/+653
|\ \ \
| * \ \ Merge #1596bors[bot]2022-10-221-0/+6
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * \ \ Merge branch 'master' into ndimandrewgsavage2022-10-081-0/+6
| | |\ \ \
| | * | | | accidenltal commentAndrew2022-10-081-5/+5
| | | | | |
| | * | | | add dataframe to upcast typesAndrew2022-10-081-5/+5
| | | | | |
| | * | | | adds ndim attribute for pandas compatabilityAndrew2022-10-011-0/+6
| | | |/ / | | |/| |
| * | | | Merge pull request #1595 from hgrecco/using_flexparserHernan Grecco2022-10-2113-784/+645
| |\ \ \ \ | | | | | | | | | | | | Final step to split the registry from the parser
| | * | | | Brings back [speed] as an alias for [velocity]Hernan2022-10-211-2/+0
| | | | | |
| | * | | | Rename parser to defparserHernan2022-10-125-15/+15
| | | | | |
| | * | | | Fixed Context.redefineHernan2022-09-301-5/+10
| | | | | |
| | * | | | Final step to split the registry from the parserHernan2022-09-3013-779/+637
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | Merge pull request #1600 from cgevans/fix-nonint-nanJules Chéron2022-10-181-2/+2
| |\ \ \ \ | | |_|_|/ | |/| | | String NaN creation with correct non_int_type
| | * | | String NaN creation with correct non_int_typeConstantine Evans2022-10-091-2/+2
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | 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.
* | | | subokAndrew2022-10-151-1/+3
| | | |