File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -2866,11 +2866,12 @@ def _increment_name(self, varname):
28662866 @staticmethod
28672867 def _lazy_stream_data (data , fill_value , fill_warn , cf_var ):
28682868 if hasattr (data , "shape" ) and data .shape == (1 ,) + cf_var .shape :
2869- # Reduce dimensionality where bounds data is for a scalar point -
2870- # bounds data is 2D but contains just 1 row, which causes
2871- # broadcast ambiguity between the data and its 1D cf_var.
28722869 # (Don't do this check for string data).
2873- data = np .atleast_1d (data [0 ])
2870+ # Reduce dimensionality where the data array has an extra dimension
2871+ # versus the cf_var - to avoid a broadcasting ambiguity.
2872+ # Happens when bounds data is for a scalar point - array is 2D but
2873+ # contains just 1 row, so the cf_var is 1D.
2874+ data = data .squeeze ()
28742875
28752876 if is_lazy_data (data ):
28762877
You can’t perform that action at this time.
0 commit comments