Skip to content

Commit 5e4d59f

Browse files
committed
Fixing a bug that occurs with dimensions of length 1
1 parent aeedb43 commit 5e4d59f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cdflib/xarray/cdf_to_xarray.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,10 +307,10 @@ def _determine_record_dimensions(
307307
created_unlimited_dims: Dict[str, int],
308308
) -> Tuple[str, bool, bool]:
309309
"""
310-
Determines the name of the
310+
Determines the name of the dimensions that the variables span
311311
"""
312312

313-
if var_props.Rec_Vary and var_props.Last_Rec > 0:
313+
if var_props.Rec_Vary and var_props.Last_Rec >= 0:
314314
# Check if this variable is itself the dimension
315315
if var_name in depend_variables and (len(var_props.Dim_Sizes) == 0 or var_props.Last_Rec >= 0):
316316
if not (len(var_props.Dim_Sizes) > 0 and var_props.Last_Rec > 0):

0 commit comments

Comments
 (0)