diff --git a/pyVlsv/vlsvreader.py b/pyVlsv/vlsvreader.py index ed79a8d8..f310990e 100644 --- a/pyVlsv/vlsvreader.py +++ b/pyVlsv/vlsvreader.py @@ -1235,7 +1235,9 @@ def read_interpolated_variable(self, name, coords, operator="pass",periodic=[Tru # Check one value for the length test_variable = self.read_variable(name,cellids=[1],operator=operator) - if isinstance(test_variable, Iterable): + if isinstance(test_variable,np.ma.core.MaskedConstant): + value_length=1 + elif isinstance(test_variable, Iterable): value_length=len(test_variable) else: value_length=1