From 9e9149556b00c8810298ca2e4c0ab3a0b9c25671 Mon Sep 17 00:00:00 2001 From: zacharyburnett Date: Wed, 17 Jul 2024 14:25:57 -0400 Subject: [PATCH] handle case where masked array has no true --- asdf/_core/_converters/ndarray.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asdf/_core/_converters/ndarray.py b/asdf/_core/_converters/ndarray.py index d5b312f3e..5a59b9c80 100644 --- a/asdf/_core/_converters/ndarray.py +++ b/asdf/_core/_converters/ndarray.py @@ -125,7 +125,7 @@ def to_yaml_tree(self, obj, tag, ctx): if strides is not None: result["strides"] = list(strides) - if isinstance(data, ma.MaskedArray) and np.any(data.mask): + if isinstance(data, ma.MaskedArray): if options.storage_type == "inline": ctx._blocks._set_array_storage(data.mask, "inline")