|
9 | 9 | from xarray.core import duck_array_ops
|
10 | 10 | from xarray.core.options import OPTIONS
|
11 | 11 | from xarray.core.types import Dims
|
12 |
| -from xarray.core.utils import contains_only_dask_or_numpy, module_available |
| 12 | +from xarray.core.utils import contains_only_chunked_or_numpy, module_available |
13 | 13 |
|
14 | 14 | if TYPE_CHECKING:
|
15 | 15 | from xarray.core.dataarray import DataArray
|
@@ -2413,7 +2413,7 @@ def count(
|
2413 | 2413 | if (
|
2414 | 2414 | flox_available
|
2415 | 2415 | and OPTIONS["use_flox"]
|
2416 |
| - and contains_only_dask_or_numpy(self._obj) |
| 2416 | + and contains_only_chunked_or_numpy(self._obj) |
2417 | 2417 | ):
|
2418 | 2418 | return self._flox_reduce(
|
2419 | 2419 | func="count",
|
@@ -2511,7 +2511,7 @@ def all(
|
2511 | 2511 | if (
|
2512 | 2512 | flox_available
|
2513 | 2513 | and OPTIONS["use_flox"]
|
2514 |
| - and contains_only_dask_or_numpy(self._obj) |
| 2514 | + and contains_only_chunked_or_numpy(self._obj) |
2515 | 2515 | ):
|
2516 | 2516 | return self._flox_reduce(
|
2517 | 2517 | func="all",
|
@@ -2609,7 +2609,7 @@ def any(
|
2609 | 2609 | if (
|
2610 | 2610 | flox_available
|
2611 | 2611 | and OPTIONS["use_flox"]
|
2612 |
| - and contains_only_dask_or_numpy(self._obj) |
| 2612 | + and contains_only_chunked_or_numpy(self._obj) |
2613 | 2613 | ):
|
2614 | 2614 | return self._flox_reduce(
|
2615 | 2615 | func="any",
|
@@ -2723,7 +2723,7 @@ def max(
|
2723 | 2723 | if (
|
2724 | 2724 | flox_available
|
2725 | 2725 | and OPTIONS["use_flox"]
|
2726 |
| - and contains_only_dask_or_numpy(self._obj) |
| 2726 | + and contains_only_chunked_or_numpy(self._obj) |
2727 | 2727 | ):
|
2728 | 2728 | return self._flox_reduce(
|
2729 | 2729 | func="max",
|
@@ -2839,7 +2839,7 @@ def min(
|
2839 | 2839 | if (
|
2840 | 2840 | flox_available
|
2841 | 2841 | and OPTIONS["use_flox"]
|
2842 |
| - and contains_only_dask_or_numpy(self._obj) |
| 2842 | + and contains_only_chunked_or_numpy(self._obj) |
2843 | 2843 | ):
|
2844 | 2844 | return self._flox_reduce(
|
2845 | 2845 | func="min",
|
@@ -2957,7 +2957,7 @@ def mean(
|
2957 | 2957 | if (
|
2958 | 2958 | flox_available
|
2959 | 2959 | and OPTIONS["use_flox"]
|
2960 |
| - and contains_only_dask_or_numpy(self._obj) |
| 2960 | + and contains_only_chunked_or_numpy(self._obj) |
2961 | 2961 | ):
|
2962 | 2962 | return self._flox_reduce(
|
2963 | 2963 | func="mean",
|
@@ -3092,7 +3092,7 @@ def prod(
|
3092 | 3092 | if (
|
3093 | 3093 | flox_available
|
3094 | 3094 | and OPTIONS["use_flox"]
|
3095 |
| - and contains_only_dask_or_numpy(self._obj) |
| 3095 | + and contains_only_chunked_or_numpy(self._obj) |
3096 | 3096 | ):
|
3097 | 3097 | return self._flox_reduce(
|
3098 | 3098 | func="prod",
|
@@ -3229,7 +3229,7 @@ def sum(
|
3229 | 3229 | if (
|
3230 | 3230 | flox_available
|
3231 | 3231 | and OPTIONS["use_flox"]
|
3232 |
| - and contains_only_dask_or_numpy(self._obj) |
| 3232 | + and contains_only_chunked_or_numpy(self._obj) |
3233 | 3233 | ):
|
3234 | 3234 | return self._flox_reduce(
|
3235 | 3235 | func="sum",
|
@@ -3363,7 +3363,7 @@ def std(
|
3363 | 3363 | if (
|
3364 | 3364 | flox_available
|
3365 | 3365 | and OPTIONS["use_flox"]
|
3366 |
| - and contains_only_dask_or_numpy(self._obj) |
| 3366 | + and contains_only_chunked_or_numpy(self._obj) |
3367 | 3367 | ):
|
3368 | 3368 | return self._flox_reduce(
|
3369 | 3369 | func="std",
|
@@ -3497,7 +3497,7 @@ def var(
|
3497 | 3497 | if (
|
3498 | 3498 | flox_available
|
3499 | 3499 | and OPTIONS["use_flox"]
|
3500 |
| - and contains_only_dask_or_numpy(self._obj) |
| 3500 | + and contains_only_chunked_or_numpy(self._obj) |
3501 | 3501 | ):
|
3502 | 3502 | return self._flox_reduce(
|
3503 | 3503 | func="var",
|
@@ -3927,7 +3927,7 @@ def count(
|
3927 | 3927 | if (
|
3928 | 3928 | flox_available
|
3929 | 3929 | and OPTIONS["use_flox"]
|
3930 |
| - and contains_only_dask_or_numpy(self._obj) |
| 3930 | + and contains_only_chunked_or_numpy(self._obj) |
3931 | 3931 | ):
|
3932 | 3932 | return self._flox_reduce(
|
3933 | 3933 | func="count",
|
@@ -4025,7 +4025,7 @@ def all(
|
4025 | 4025 | if (
|
4026 | 4026 | flox_available
|
4027 | 4027 | and OPTIONS["use_flox"]
|
4028 |
| - and contains_only_dask_or_numpy(self._obj) |
| 4028 | + and contains_only_chunked_or_numpy(self._obj) |
4029 | 4029 | ):
|
4030 | 4030 | return self._flox_reduce(
|
4031 | 4031 | func="all",
|
@@ -4123,7 +4123,7 @@ def any(
|
4123 | 4123 | if (
|
4124 | 4124 | flox_available
|
4125 | 4125 | and OPTIONS["use_flox"]
|
4126 |
| - and contains_only_dask_or_numpy(self._obj) |
| 4126 | + and contains_only_chunked_or_numpy(self._obj) |
4127 | 4127 | ):
|
4128 | 4128 | return self._flox_reduce(
|
4129 | 4129 | func="any",
|
@@ -4237,7 +4237,7 @@ def max(
|
4237 | 4237 | if (
|
4238 | 4238 | flox_available
|
4239 | 4239 | and OPTIONS["use_flox"]
|
4240 |
| - and contains_only_dask_or_numpy(self._obj) |
| 4240 | + and contains_only_chunked_or_numpy(self._obj) |
4241 | 4241 | ):
|
4242 | 4242 | return self._flox_reduce(
|
4243 | 4243 | func="max",
|
@@ -4353,7 +4353,7 @@ def min(
|
4353 | 4353 | if (
|
4354 | 4354 | flox_available
|
4355 | 4355 | and OPTIONS["use_flox"]
|
4356 |
| - and contains_only_dask_or_numpy(self._obj) |
| 4356 | + and contains_only_chunked_or_numpy(self._obj) |
4357 | 4357 | ):
|
4358 | 4358 | return self._flox_reduce(
|
4359 | 4359 | func="min",
|
@@ -4471,7 +4471,7 @@ def mean(
|
4471 | 4471 | if (
|
4472 | 4472 | flox_available
|
4473 | 4473 | and OPTIONS["use_flox"]
|
4474 |
| - and contains_only_dask_or_numpy(self._obj) |
| 4474 | + and contains_only_chunked_or_numpy(self._obj) |
4475 | 4475 | ):
|
4476 | 4476 | return self._flox_reduce(
|
4477 | 4477 | func="mean",
|
@@ -4606,7 +4606,7 @@ def prod(
|
4606 | 4606 | if (
|
4607 | 4607 | flox_available
|
4608 | 4608 | and OPTIONS["use_flox"]
|
4609 |
| - and contains_only_dask_or_numpy(self._obj) |
| 4609 | + and contains_only_chunked_or_numpy(self._obj) |
4610 | 4610 | ):
|
4611 | 4611 | return self._flox_reduce(
|
4612 | 4612 | func="prod",
|
@@ -4743,7 +4743,7 @@ def sum(
|
4743 | 4743 | if (
|
4744 | 4744 | flox_available
|
4745 | 4745 | and OPTIONS["use_flox"]
|
4746 |
| - and contains_only_dask_or_numpy(self._obj) |
| 4746 | + and contains_only_chunked_or_numpy(self._obj) |
4747 | 4747 | ):
|
4748 | 4748 | return self._flox_reduce(
|
4749 | 4749 | func="sum",
|
@@ -4877,7 +4877,7 @@ def std(
|
4877 | 4877 | if (
|
4878 | 4878 | flox_available
|
4879 | 4879 | and OPTIONS["use_flox"]
|
4880 |
| - and contains_only_dask_or_numpy(self._obj) |
| 4880 | + and contains_only_chunked_or_numpy(self._obj) |
4881 | 4881 | ):
|
4882 | 4882 | return self._flox_reduce(
|
4883 | 4883 | func="std",
|
@@ -5011,7 +5011,7 @@ def var(
|
5011 | 5011 | if (
|
5012 | 5012 | flox_available
|
5013 | 5013 | and OPTIONS["use_flox"]
|
5014 |
| - and contains_only_dask_or_numpy(self._obj) |
| 5014 | + and contains_only_chunked_or_numpy(self._obj) |
5015 | 5015 | ):
|
5016 | 5016 | return self._flox_reduce(
|
5017 | 5017 | func="var",
|
@@ -5436,7 +5436,7 @@ def count(
|
5436 | 5436 | if (
|
5437 | 5437 | flox_available
|
5438 | 5438 | and OPTIONS["use_flox"]
|
5439 |
| - and contains_only_dask_or_numpy(self._obj) |
| 5439 | + and contains_only_chunked_or_numpy(self._obj) |
5440 | 5440 | ):
|
5441 | 5441 | return self._flox_reduce(
|
5442 | 5442 | func="count",
|
@@ -5527,7 +5527,7 @@ def all(
|
5527 | 5527 | if (
|
5528 | 5528 | flox_available
|
5529 | 5529 | and OPTIONS["use_flox"]
|
5530 |
| - and contains_only_dask_or_numpy(self._obj) |
| 5530 | + and contains_only_chunked_or_numpy(self._obj) |
5531 | 5531 | ):
|
5532 | 5532 | return self._flox_reduce(
|
5533 | 5533 | func="all",
|
@@ -5618,7 +5618,7 @@ def any(
|
5618 | 5618 | if (
|
5619 | 5619 | flox_available
|
5620 | 5620 | and OPTIONS["use_flox"]
|
5621 |
| - and contains_only_dask_or_numpy(self._obj) |
| 5621 | + and contains_only_chunked_or_numpy(self._obj) |
5622 | 5622 | ):
|
5623 | 5623 | return self._flox_reduce(
|
5624 | 5624 | func="any",
|
@@ -5723,7 +5723,7 @@ def max(
|
5723 | 5723 | if (
|
5724 | 5724 | flox_available
|
5725 | 5725 | and OPTIONS["use_flox"]
|
5726 |
| - and contains_only_dask_or_numpy(self._obj) |
| 5726 | + and contains_only_chunked_or_numpy(self._obj) |
5727 | 5727 | ):
|
5728 | 5728 | return self._flox_reduce(
|
5729 | 5729 | func="max",
|
@@ -5830,7 +5830,7 @@ def min(
|
5830 | 5830 | if (
|
5831 | 5831 | flox_available
|
5832 | 5832 | and OPTIONS["use_flox"]
|
5833 |
| - and contains_only_dask_or_numpy(self._obj) |
| 5833 | + and contains_only_chunked_or_numpy(self._obj) |
5834 | 5834 | ):
|
5835 | 5835 | return self._flox_reduce(
|
5836 | 5836 | func="min",
|
@@ -5939,7 +5939,7 @@ def mean(
|
5939 | 5939 | if (
|
5940 | 5940 | flox_available
|
5941 | 5941 | and OPTIONS["use_flox"]
|
5942 |
| - and contains_only_dask_or_numpy(self._obj) |
| 5942 | + and contains_only_chunked_or_numpy(self._obj) |
5943 | 5943 | ):
|
5944 | 5944 | return self._flox_reduce(
|
5945 | 5945 | func="mean",
|
@@ -6063,7 +6063,7 @@ def prod(
|
6063 | 6063 | if (
|
6064 | 6064 | flox_available
|
6065 | 6065 | and OPTIONS["use_flox"]
|
6066 |
| - and contains_only_dask_or_numpy(self._obj) |
| 6066 | + and contains_only_chunked_or_numpy(self._obj) |
6067 | 6067 | ):
|
6068 | 6068 | return self._flox_reduce(
|
6069 | 6069 | func="prod",
|
@@ -6189,7 +6189,7 @@ def sum(
|
6189 | 6189 | if (
|
6190 | 6190 | flox_available
|
6191 | 6191 | and OPTIONS["use_flox"]
|
6192 |
| - and contains_only_dask_or_numpy(self._obj) |
| 6192 | + and contains_only_chunked_or_numpy(self._obj) |
6193 | 6193 | ):
|
6194 | 6194 | return self._flox_reduce(
|
6195 | 6195 | func="sum",
|
@@ -6312,7 +6312,7 @@ def std(
|
6312 | 6312 | if (
|
6313 | 6313 | flox_available
|
6314 | 6314 | and OPTIONS["use_flox"]
|
6315 |
| - and contains_only_dask_or_numpy(self._obj) |
| 6315 | + and contains_only_chunked_or_numpy(self._obj) |
6316 | 6316 | ):
|
6317 | 6317 | return self._flox_reduce(
|
6318 | 6318 | func="std",
|
@@ -6435,7 +6435,7 @@ def var(
|
6435 | 6435 | if (
|
6436 | 6436 | flox_available
|
6437 | 6437 | and OPTIONS["use_flox"]
|
6438 |
| - and contains_only_dask_or_numpy(self._obj) |
| 6438 | + and contains_only_chunked_or_numpy(self._obj) |
6439 | 6439 | ):
|
6440 | 6440 | return self._flox_reduce(
|
6441 | 6441 | func="var",
|
@@ -6842,7 +6842,7 @@ def count(
|
6842 | 6842 | if (
|
6843 | 6843 | flox_available
|
6844 | 6844 | and OPTIONS["use_flox"]
|
6845 |
| - and contains_only_dask_or_numpy(self._obj) |
| 6845 | + and contains_only_chunked_or_numpy(self._obj) |
6846 | 6846 | ):
|
6847 | 6847 | return self._flox_reduce(
|
6848 | 6848 | func="count",
|
@@ -6933,7 +6933,7 @@ def all(
|
6933 | 6933 | if (
|
6934 | 6934 | flox_available
|
6935 | 6935 | and OPTIONS["use_flox"]
|
6936 |
| - and contains_only_dask_or_numpy(self._obj) |
| 6936 | + and contains_only_chunked_or_numpy(self._obj) |
6937 | 6937 | ):
|
6938 | 6938 | return self._flox_reduce(
|
6939 | 6939 | func="all",
|
@@ -7024,7 +7024,7 @@ def any(
|
7024 | 7024 | if (
|
7025 | 7025 | flox_available
|
7026 | 7026 | and OPTIONS["use_flox"]
|
7027 |
| - and contains_only_dask_or_numpy(self._obj) |
| 7027 | + and contains_only_chunked_or_numpy(self._obj) |
7028 | 7028 | ):
|
7029 | 7029 | return self._flox_reduce(
|
7030 | 7030 | func="any",
|
@@ -7129,7 +7129,7 @@ def max(
|
7129 | 7129 | if (
|
7130 | 7130 | flox_available
|
7131 | 7131 | and OPTIONS["use_flox"]
|
7132 |
| - and contains_only_dask_or_numpy(self._obj) |
| 7132 | + and contains_only_chunked_or_numpy(self._obj) |
7133 | 7133 | ):
|
7134 | 7134 | return self._flox_reduce(
|
7135 | 7135 | func="max",
|
@@ -7236,7 +7236,7 @@ def min(
|
7236 | 7236 | if (
|
7237 | 7237 | flox_available
|
7238 | 7238 | and OPTIONS["use_flox"]
|
7239 |
| - and contains_only_dask_or_numpy(self._obj) |
| 7239 | + and contains_only_chunked_or_numpy(self._obj) |
7240 | 7240 | ):
|
7241 | 7241 | return self._flox_reduce(
|
7242 | 7242 | func="min",
|
@@ -7345,7 +7345,7 @@ def mean(
|
7345 | 7345 | if (
|
7346 | 7346 | flox_available
|
7347 | 7347 | and OPTIONS["use_flox"]
|
7348 |
| - and contains_only_dask_or_numpy(self._obj) |
| 7348 | + and contains_only_chunked_or_numpy(self._obj) |
7349 | 7349 | ):
|
7350 | 7350 | return self._flox_reduce(
|
7351 | 7351 | func="mean",
|
@@ -7469,7 +7469,7 @@ def prod(
|
7469 | 7469 | if (
|
7470 | 7470 | flox_available
|
7471 | 7471 | and OPTIONS["use_flox"]
|
7472 |
| - and contains_only_dask_or_numpy(self._obj) |
| 7472 | + and contains_only_chunked_or_numpy(self._obj) |
7473 | 7473 | ):
|
7474 | 7474 | return self._flox_reduce(
|
7475 | 7475 | func="prod",
|
@@ -7595,7 +7595,7 @@ def sum(
|
7595 | 7595 | if (
|
7596 | 7596 | flox_available
|
7597 | 7597 | and OPTIONS["use_flox"]
|
7598 |
| - and contains_only_dask_or_numpy(self._obj) |
| 7598 | + and contains_only_chunked_or_numpy(self._obj) |
7599 | 7599 | ):
|
7600 | 7600 | return self._flox_reduce(
|
7601 | 7601 | func="sum",
|
@@ -7718,7 +7718,7 @@ def std(
|
7718 | 7718 | if (
|
7719 | 7719 | flox_available
|
7720 | 7720 | and OPTIONS["use_flox"]
|
7721 |
| - and contains_only_dask_or_numpy(self._obj) |
| 7721 | + and contains_only_chunked_or_numpy(self._obj) |
7722 | 7722 | ):
|
7723 | 7723 | return self._flox_reduce(
|
7724 | 7724 | func="std",
|
@@ -7841,7 +7841,7 @@ def var(
|
7841 | 7841 | if (
|
7842 | 7842 | flox_available
|
7843 | 7843 | and OPTIONS["use_flox"]
|
7844 |
| - and contains_only_dask_or_numpy(self._obj) |
| 7844 | + and contains_only_chunked_or_numpy(self._obj) |
7845 | 7845 | ):
|
7846 | 7846 | return self._flox_reduce(
|
7847 | 7847 | func="var",
|
|
0 commit comments