|
|
@ -186,26 +186,29 @@ def left_iteration(ref_var_expected_dims, |
|
|
|
# Skip the possible empty/missing arrays for the join method |
|
|
|
# Skip the possible empty/missing arrays for the join method |
|
|
|
skip_missing = False |
|
|
|
skip_missing = False |
|
|
|
for arg in new_args: |
|
|
|
for arg in new_args: |
|
|
|
if isinstance(arg, DataArray): |
|
|
|
try: |
|
|
|
arr = to_np(arg) |
|
|
|
_ = arg.ndim |
|
|
|
elif isinstance(arg, np.ndarray): |
|
|
|
except AttributeError: |
|
|
|
arr = arg |
|
|
|
continue # Not an array object |
|
|
|
else: |
|
|
|
else: |
|
|
|
continue |
|
|
|
arr = to_np(arg) |
|
|
|
|
|
|
|
|
|
|
|
if isinstance(arr, np.ma.MaskedArray): |
|
|
|
try: |
|
|
|
if arr.mask.all(): |
|
|
|
all_masked = arr.mask.all() |
|
|
|
|
|
|
|
except AttributeError: |
|
|
|
|
|
|
|
pass # Not a masked array |
|
|
|
|
|
|
|
else: |
|
|
|
|
|
|
|
if all_masked: |
|
|
|
for output in viewvalues(outd): |
|
|
|
for output in viewvalues(outd): |
|
|
|
output[left_and_slice_idxs] = ( |
|
|
|
output[left_and_slice_idxs] = ( |
|
|
|
Constants.DEFAULT_FILL) |
|
|
|
Constants.DEFAULT_FILL) |
|
|
|
skip_missing = True |
|
|
|
skip_missing = True |
|
|
|
mask_output = True |
|
|
|
mask_output = True |
|
|
|
|
|
|
|
break |
|
|
|
|
|
|
|
|
|
|
|
if skip_missing: |
|
|
|
if skip_missing: |
|
|
|
continue |
|
|
|
continue |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Insert the output views if one hasn't been provided |
|
|
|
# Insert the output views if one hasn't been provided |
|
|
|
if "outview" not in new_kargs: |
|
|
|
if "outview" not in new_kargs: |
|
|
|
for outkey,output in viewitems(outd): |
|
|
|
for outkey,output in viewitems(outd): |
|
|
|