-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for UFloat in PintArray (#139) #140
base: master
Are you sure you want to change the base?
Add support for UFloat in PintArray (#139) #140
Commits on Oct 15, 2022
-
Add support for UFloat in PintArray (hgrecco#139)
Signed-off-by: MichaelTiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b5954fd - Browse repository at this point
Copy the full SHA b5954fdView commit details
Commits on Oct 19, 2022
-
Fix failures and errors found by test_pandas_extensions test suite.
Big remaining problem is unhanshable UFloat type. Signed-off-by: MichaelTiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0ad1cf9 - Browse repository at this point
Copy the full SHA 0ad1cf9View commit details
Commits on Oct 21, 2022
-
Preserve incoming np.array when promoting float to ufloat in PintArray
Signed-off-by: [email protected]
Configuration menu - View commit details
-
Copy full SHA for 52ab185 - Browse repository at this point
Copy the full SHA 52ab185View commit details
Commits on Oct 25, 2022
-
Fix logic to detect heterogeneous arrays of Ufloats and floats.
Signed-off-by: MichaelTiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f3cdcad - Browse repository at this point
Copy the full SHA f3cdcadView commit details
Commits on Nov 3, 2022
-
Add support for UFloat in PintArray (hgrecco#139)
Signed-off-by: MichaelTiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3ffb617 - Browse repository at this point
Copy the full SHA 3ffb617View commit details -
Fix failures and errors found by test_pandas_extensions test suite.
Big remaining problem is unhanshable UFloat type. Signed-off-by: MichaelTiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2f89897 - Browse repository at this point
Copy the full SHA 2f89897View commit details -
Preserve incoming np.array when promoting float to ufloat in PintArray
Signed-off-by: [email protected]
Configuration menu - View commit details
-
Copy full SHA for dce2668 - Browse repository at this point
Copy the full SHA dce2668View commit details -
Fix logic to detect heterogeneous arrays of Ufloats and floats.
Signed-off-by: MichaelTiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d4ca9f0 - Browse repository at this point
Copy the full SHA d4ca9f0View commit details -
Merge branch 'ducks-unlimited' of https://github.com/MichaelTiemannOS…
…C/pint-pandas into ducks-unlimited Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c375aeb - Browse repository at this point
Copy the full SHA c375aebView commit details
Commits on Jan 2, 2023
-
Deal with duality of np.nan and _ufloat_nans when constructing PintArrays, creating float64 magnitude arrays when possible and ufloat magnitudes when necessary. Note that PintArray columns don't advertise whether magnitudes are np.float64 or np.obejct; they are what they are. Also commented out warning, which simply creates noise. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9fffcc5 - Browse repository at this point
Copy the full SHA 9fffcc5View commit details
Commits on Jan 3, 2023
-
Fix conditional expression. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8b06708 - Browse repository at this point
Copy the full SHA 8b06708View commit details -
Don't try to build a large-enough-to-hold-uncertainties array if we are not using uncertainties in any way. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c5b7926 - Browse repository at this point
Copy the full SHA c5b7926View commit details
Commits on Jun 26, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 232857c - Browse repository at this point
Copy the full SHA 232857cView commit details -
The manual merge process created a syntax error and various things that black didn't like. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0b0e4d4 - Browse repository at this point
Copy the full SHA 0b0e4d4View commit details -
Fix ruff complaints in testsuite
Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 959570f - Browse repository at this point
Copy the full SHA 959570fView commit details
Commits on Jun 28, 2023
-
Fix numerous regressions in test_pandas_extensiontests
Fixes include: * Factorization * NaN handling (several more issues still need to be resolved) * Proper unit declarations in test_offset_concat * Integration of new `numeric_dtype` parameter A major outstanding issue (presently being discussed as pandas-dev/pandas#53904) concerns whether we can make AffineScalarFunc hashable and/or whether other legacy Pandas code (which has been deprecated) can be further removed. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5270a46 - Browse repository at this point
Copy the full SHA 5270a46View commit details -
Make `ruff` and `black` happy. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6ddf204 - Browse repository at this point
Copy the full SHA 6ddf204View commit details
Commits on Jul 2, 2023
-
Update to us pd.NA instead of np.nan / _ufloat_nan
To resolve the question of the proper na_value for EA dtypes (np.nan vs. uncertainties _ufloat_nan), use the gender-neutral pd.NA value. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e1d367c - Browse repository at this point
Copy the full SHA e1d367cView commit details -
Make black happy. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for dbf5ad1 - Browse repository at this point
Copy the full SHA dbf5ad1View commit details
Commits on Jul 5, 2023
-
Progress: 2608 pass, 97 skip, 84 xfail, 6 xpass
With these changes (and pandas-dev/pandas#53970 and hgrecco/pint#1615) the test suite passes or xpasses everything (no failures or error). Indeed, the uncertainties code has essentially doubled the scope of the test suite (to test with and without it). The biggest gotcha is that the EA for complex numbers is not compatible with the EA for uncertainties, due to incompatible hacks: The hack for complex numbers is to np.nan (which is, technically, a complex number) for na_value across all numeric types. But that doesn't work for uncertainties, because uncertainties doesn't accept np.nan as an uncertain value. The hack for uncertainties is to use pd.NA for na_value. This works for Int64, Float64, and uncertainties, but doesn't work for complex (which cannot tolerate NAType). Some careful subclassing fills in what doesn't easily work, with fixtures to prevent the improper mixing of complex and uncertainty types in the same python environment. Happy to discuss! Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3c6eff4 - Browse repository at this point
Copy the full SHA 3c6eff4View commit details -
Except that ruff cannot be made happy, see astral-sh/ruff#2044 Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a0625f8 - Browse repository at this point
Copy the full SHA a0625f8View commit details -
Make ruff happy (na_frame fixture import vs F811)
Moving the # noqa: F811 to the correct line allows the file to pass ruff. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 94d3524 - Browse repository at this point
Copy the full SHA 94d3524View commit details -
Arrgh! Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a6c4040 - Browse repository at this point
Copy the full SHA a6c4040View commit details -
Missed this. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1506df2 - Browse repository at this point
Copy the full SHA 1506df2View commit details
Commits on Jul 23, 2023
-
Fix DataFrame reduction for upcoming Pandas
Issue hgrecco#174 reports that DataFrame reduction was broken by the latest Pint-Pandas changes. This commit adapts Pint-Pandas to work with upcoming Pandas 2.1, currently scheduled for release Aug 20, 2023. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 772636b - Browse repository at this point
Copy the full SHA 772636bView commit details -
Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b759adb - Browse repository at this point
Copy the full SHA b759adbView commit details
Commits on Jul 24, 2023
-
Remove print statement mistakenly copied into _accumulate code that was never (properly) tested. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bfb4a99 - Browse repository at this point
Copy the full SHA bfb4a99View commit details
Commits on Jul 28, 2023
-
Using np.nan actually simplifies the integration of uncertainties into pint_pandas. Recent changes in Pandas 2.1 are now sufficient to pass all Pint-Pandas tests. Also added a fixture validating that we can use either `np.nan` or `ufloat(np.nan, 0)` as NA value (the latter being something that should naturally arise in the course of uncertainties calculations, not just missing data from the start). Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9d169f1 - Browse repository at this point
Copy the full SHA 9d169f1View commit details
Commits on Aug 6, 2023
-
Updated to Pandas 2.1.0.dev0+1401.gb0bfd0effd
The internal Pandas 2.1 interfaces continue to move and change. These changes adapt to those changes, adjsting and removing some redundant subclass methods. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 289c604 - Browse repository at this point
Copy the full SHA 289c604View commit details
Commits on Aug 12, 2023
-
Keep up with pandas21_compat changes
Merge in important bugfixes for `na_value` handling. And keep `black` happy. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 602a804 - Browse repository at this point
Copy the full SHA 602a804View commit details -
Configuration menu - View commit details
-
Copy full SHA for 866bf7a - Browse repository at this point
Copy the full SHA 866bf7aView commit details
Commits on Aug 14, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 9f723f9 - Browse repository at this point
Copy the full SHA 9f723f9View commit details
Commits on Aug 15, 2023
-
First draft of 100% working test cases after (re)merging with changes extracted from these changes as part of PR hgrecco#196. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f0c7e64 - Browse repository at this point
Copy the full SHA f0c7e64View commit details -
Fix so that it works in a world without uncertainties (or with uncertainties). Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5b39a3e - Browse repository at this point
Copy the full SHA 5b39a3eView commit details -
Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8ed4c1d - Browse repository at this point
Copy the full SHA 8ed4c1dView commit details -
Update CI/CD to anticipate, not install or test uncertainties
For now disable testing of `uncertainties` specifically, as that also requires an uncertainties-aware `pint`. When that becomes available we can update the CI/CD scripts to enable optional uncertainty testing with versions of pint and pint-pandas that can tolerate it. From local testing with uncertainties, remember: if you don't put a fixture XYZ in the parameter list, then testing `if XYZ` is really testing whether the fixture's function is not None (it's always not None). When XYZ is in the parameter list, testing `if XYZ` tells you whether the value of XYZ fixture is non-False. Also increase version compatibility by using `np.array([f(x) for x in arr])` instead of `arr.map(f)` when `arr` is a numpy array. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2cb50f4 - Browse repository at this point
Copy the full SHA 2cb50f4View commit details -
Added blurb about supporting `uncertainties`. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8c4bf7d - Browse repository at this point
Copy the full SHA 8c4bf7dView commit details
Commits on Sep 8, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 37c6f6d - Browse repository at this point
Copy the full SHA 37c6f6dView commit details
Commits on Sep 15, 2023
-
Configuration menu - View commit details
-
Copy full SHA for fc2814a - Browse repository at this point
Copy the full SHA fc2814aView commit details
Commits on Sep 18, 2023
-
Test with Pint-0.23rc0 and uncertainties in ci/cd
Settle changes that work with Pandas 2.1.0 and Pint-0.23rc0 and see if we can pass Pint-Pandas CI/CD. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e365cbc - Browse repository at this point
Copy the full SHA e365cbcView commit details -
2nd attempt integrating uncertainties and CI/CD
Allow pip install command to unpack uncertainties option into multiple arguments. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 108cb71 - Browse repository at this point
Copy the full SHA 108cb71View commit details
Commits on Sep 19, 2023
-
Use
include
to handle uncertainties testingBy using `include` directive, we can add a special case to the matrix of possibilities. In this case we add to the matrix the case where pandas>=2.1.0 and pint>=0.23rc0, which are both necessary for the UFloat array changes to work. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a5758e7 - Browse repository at this point
Copy the full SHA a5758e7View commit details -
Only test
uncertainties
in ci.ymlDon't test uncertainties in ci-pint-pre or ci-pint-master, as these don't have the necessary versions of Pandas or Pint to make the matrix include operation work. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 82442ab - Browse repository at this point
Copy the full SHA 82442abView commit details -
Also test Pint-Pandas without uncertainties. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5d351fc - Browse repository at this point
Copy the full SHA 5d351fcView commit details -
Trying again with different syntax to avoid duplicate key issue. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c4e3a06 - Browse repository at this point
Copy the full SHA c4e3a06View commit details -
Trying yet another syntax to make `uncertainties` one of two options when pandas==2.1.0 and pint==0.23rc0. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8d5feb9 - Browse repository at this point
Copy the full SHA 8d5feb9View commit details -
Try using null instead of "" for uncertainties that we don't want to run. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bfe9a77 - Browse repository at this point
Copy the full SHA bfe9a77View commit details -
Try using "null" to represent a condition where we don't want uncertainties installed. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 25adf35 - Browse repository at this point
Copy the full SHA 25adf35View commit details -
Try using "no-thank-you" instead of "null" for matrix permutations not intended to use uncertainties. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for afc3eb4 - Browse repository at this point
Copy the full SHA afc3eb4View commit details -
Wrap `uncertainties` matrix parameter in `[]`. If we get this working, can try setting parameter to `''`' from several commits ago. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e281dfc - Browse repository at this point
Copy the full SHA e281dfcView commit details -
Use single quotes when testing the value of `uncertainties`. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a208163 - Browse repository at this point
Copy the full SHA a208163View commit details -
Tweak conditional matrix logic by using a "same-but-different" value for `pint` value assignment. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 296bbdc - Browse repository at this point
Copy the full SHA 296bbdcView commit details -
Untabify yaml file... Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 585f38d - Browse repository at this point
Copy the full SHA 585f38dView commit details -
Make uncertainties a default null value in the matrix. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 75d4c56 - Browse repository at this point
Copy the full SHA 75d4c56View commit details -
Attempt to explicitly add python-version and numpy to `uncertainties` case. Otherwise, pytest never gets installed. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6988212 - Browse repository at this point
Copy the full SHA 6988212View commit details -
We cannot reference the matrix when building the matrix, so unroll all parameter values. Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 764b609 - Browse repository at this point
Copy the full SHA 764b609View commit details -
Remove unused `uncertainties` from -pre and -master CI files. Only test one configuration of Python against uncertainties (trying to work around duplicate key problem). Signed-off-by: Michael Tiemann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9ed23c1 - Browse repository at this point
Copy the full SHA 9ed23c1View commit details
Commits on Nov 14, 2023
-
Configuration menu - View commit details
-
Copy full SHA for b609001 - Browse repository at this point
Copy the full SHA b609001View commit details