-
-
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.
Add support for cross product (#5365)
* Add support for cross * Update test_computation.py * Update computation.py * Update computation.py * Update test_computation.py * Update test_computation.py * Update test_computation.py * add more tests * Update xarray/core/computation.py Co-authored-by: keewis <keewis@users.noreply.github.com> * spatial_dim to dim * Update computation.py * use pad instead of concat * copy paste np.cross intro * Get last dim for each array, which is more inline with np.cross * examples in docs * Update computation.py * more doc examples * single dim required, tranpose after apply_ufunc * add dims to tests * Update computation.py * reduce code * support xr.Variable * Update computation.py * Update computation.py * reduce code * docstring explanations * Use same terms * docstring formatting * reduce code * add tests for dask * simplify check, align used variables * trim down tests * Update computation.py * simplify code * Add type hints * less type hints * Update computation.py * undo type hints * Update computation.py * Add support for datasets * determine dtype with np.result_type * test datasets, daskify the inputs not the results * rechunk padded values, handle 1 sized datasets * expand only unique dims, squeeze out dims in tests * rechunk along the dim * Attempt typing again * Update __init__.py * Update computation.py * Update computation.py * test fixing type in to_stacked_array * test fixing to_stacked_array * small is large * Update computation.py * Update xarray/core/computation.py Co-authored-by: Maximilian Roos <5635139+max-sixty@users.noreply.github.com> * obfuscate variable_dim some * Update computation.py * undo to_stacked_array changes * test sample_dims typing * to_stacked_array fixes * add reindex_like check * Update computation.py * Update computation.py * Update computation.py * test forcing int type in chunk() * Update computation.py * test collection in to_stacked_array * Update computation.py * Update computation.py * Update computation.py * Update computation.py * Update computation.py * whats new and api.rst * Update whats-new.rst * Output as dataset if any input is a dataset * Simplify the if terms instead of using pass. * Update computation.py * Remove support for datasets * Update computation.py * Add some typing to test. * doctest fix * lint * Update xarray/core/computation.py Co-authored-by: keewis <keewis@users.noreply.github.com> * Update xarray/core/computation.py Co-authored-by: keewis <keewis@users.noreply.github.com> * Update xarray/core/computation.py Co-authored-by: keewis <keewis@users.noreply.github.com> * Update computation.py * Update computation.py * Update computation.py * Update computation.py * Update computation.py * Can't narrow types with old type Seems using bounds in typevar makes it impossible to narrow the type using isinstance checks. * dim now keyword only * use all_dims in transpose * if in transpose indeed needed if a and b has size 2 it's needed. * Update xarray/core/computation.py Co-authored-by: keewis <keewis@users.noreply.github.com> * Update xarray/core/computation.py Co-authored-by: keewis <keewis@users.noreply.github.com> * Update xarray/core/computation.py Co-authored-by: keewis <keewis@users.noreply.github.com> * Update computation.py * Update computation.py * add todo comments * Update whats-new.rst Co-authored-by: keewis <keewis@users.noreply.github.com> Co-authored-by: Maximilian Roos <5635139+max-sixty@users.noreply.github.com>
- Loading branch information
1 parent
92ac89f
commit 379b5b7
Showing
5 changed files
with
330 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,7 @@ Top-level functions | |
ones_like | ||
cov | ||
corr | ||
cross | ||
dot | ||
polyval | ||
map_blocks | ||
|
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