@@ -441,6 +441,25 @@ def __getitem__(self, indices):
441
441
for axis, size in zip(data_axes, new_data.shape):
442
442
domain_axes[axis].set_size(size)
443
443
444
+ # Record which axes were cyclic before the subspace
445
+ org_cyclic = [data_axes.index(axis) for axis in new.cyclic()]
446
+
447
+ # Set the subspaced data
448
+ new.set_data(new_data, axes=data_axes, copy=False)
449
+
450
+ # Update axis cylcicity. Note that this can only entail
451
+ # setting an originally cyclic axis to be non-cyclic. Doing
452
+ # this now enables us to disable the (possibly very slow)
453
+ # automatic check for cyclicity on the 'set_construct' calls
454
+ # below.
455
+ if org_cyclic:
456
+ new_cyclic = new_data.cyclic()
457
+ [
458
+ new.cyclic(i, iscyclic=False)
459
+ for i in org_cyclic
460
+ if i not in new_cyclic
461
+ ]
462
+
444
463
# ------------------------------------------------------------
445
464
# Subspace constructs with data
446
465
# ------------------------------------------------------------
@@ -507,6 +526,7 @@ def __getitem__(self, indices):
507
526
key=key,
508
527
axes=construct_axes,
509
528
copy=False,
529
+ autocyclic={"no-op": True},
510
530
)
511
531
512
532
new.set_data(new_data, axes=data_axes, copy=False)
@@ -13701,7 +13721,7 @@ def regrids(
13701
13721
13702
13722
Ignored if *dst* is a `RegridOperator`.
13703
13723
13704
- .. versionadded:: 3.17.0
13724
+ .. versionadded:: NEXTRELEASE
13705
13725
13706
13726
dst_z: optional
13707
13727
If `None`, the default, then the regridding is 2-d in
@@ -13715,7 +13735,7 @@ def regrids(
13715
13735
13716
13736
Ignored if *dst* is a `RegridOperator`.
13717
13737
13718
- .. versionadded:: 3.17.0
13738
+ .. versionadded:: NEXTRELEASE
13719
13739
13720
13740
z: optional
13721
13741
The *z* parameter is a convenience that may be used to
@@ -13729,11 +13749,11 @@ def regrids(
13729
13749
*Example:*
13730
13750
``z='Z'`` is equivalent to ``src_z='Z', dst_z='Z'``.
13731
13751
13732
- .. versionadded:: 3.17.0
13752
+ .. versionadded:: NEXTRELEASE
13733
13753
13734
13754
{{ln_z: `bool` or `None`, optional}}
13735
13755
13736
- .. versionadded:: 3.17.0
13756
+ .. versionadded:: NEXTRELEASE
13737
13757
13738
13758
{{verbose: `int` or `str` or `None`, optional}}
13739
13759
@@ -14000,7 +14020,7 @@ def regridc(
14000
14020
14001
14021
Ignored if *dst* is a `RegridOperator`.
14002
14022
14003
- .. versionadded:: 3.17.0
14023
+ .. versionadded:: NEXTRELEASE
14004
14024
14005
14025
dst_z: optional
14006
14026
If not `None` then *dst_z* specifies the identity of a
@@ -14010,7 +14030,7 @@ def regridc(
14010
14030
14011
14031
Ignored if *dst* is a `RegridOperator`.
14012
14032
14013
- .. versionadded:: 3.17.0
14033
+ .. versionadded:: NEXTRELEASE
14014
14034
14015
14035
z: optional
14016
14036
The *z* parameter is a convenience that may be used to
@@ -14022,11 +14042,11 @@ def regridc(
14022
14042
*Example:*
14023
14043
``z='Z'`` is equivalent to ``src_z='Z', dst_z='Z'``.
14024
14044
14025
- .. versionadded:: 3.17.0
14045
+ .. versionadded:: NEXTRELEASE
14026
14046
14027
14047
{{ln_z: `bool` or `None`, optional}}
14028
14048
14029
- .. versionadded:: 3.17.0
14049
+ .. versionadded:: NEXTRELEASE
14030
14050
14031
14051
{{inplace: `bool`, optional}}
14032
14052
0 commit comments