-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More pint compatibility: silence UnitStrippedWarnings (#4163)
* globally promote UnitStrippedWarning to errors * separately test apply_ufunc with units in dims, coords and data * split the DataArray align test into data, dims and coords tests * use dtypes instead of python types and use a dtype specific fill value * rewrite the dataset align tests * compare with dtypes.NA instead of using np.isnan * mention the issue in the xfail reason * make sure the combine_* variants are properly separated from each other * improve the test case names * note that broadcast uses align * properly separate the test cases for concat * always use the same reason when xfailing units in indexes tests * also check that the replication functions work with dims and units * apply full_like to the data instead of the variable * check full_like with units in dims, data and coords separately * clearly separate the test variants of the merge tests * don't use indexes for the dataset where tests * replace numpy.testing.assert_allclose with assert numpy.allclose * remove a conditional xfail that depends on a very old pint version * use assert_identical from the local namespace * properly separate between the broadcast_like test variants * don't accept "data" as an alias of the DataArray's data * properly separate between the variants of the content manipulation tests * use assert np.allclose(...) instead of np.testing.assert_allclose(...) * don't test units in indexes in the isel tests * don't use units in indexes for the head / tail / thin tests * properly separate the variants of more tests * rewrite the squeeze tests * use assert_allclose from the module's namespace * rewrite the copy tests * xfail the equal comparison for a pint version lower than 0.14 * try to implement a duckarray friendly assert_array_equal * add tests for not raising an assertion error * skip only the dask test if it isn't installed * also check using pint if available * add a duckarray version of np.testing.assert_allclose * add both to __all__ * make both available in xarray.tests * don't inherit from VariableSubtests since that was not written to test duck arrays. * test the constant pad mode along with all other modes * remove most pint version checks, now that pint 0.13 has been released * use conda to install pint * xfail the DataArray comparison test until pint's dev version fixed it * add tests for the pad method of DataArray and Dataset * add tests for weighted * update whats-new.rst * replace assert np.allclose(...) with assert_duckarray_allclose(...) * fix the dask fallback * xfail the pint tests for now since there's a bug in pint * use utils.is_array_like and utils.is_scalar
- Loading branch information
Showing
13 changed files
with
919 additions
and
626 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.