Skip to content

Commit

Permalink
Fixing a bug that occurs with dimensions of length 1
Browse files Browse the repository at this point in the history
  • Loading branch information
bryan-harter committed Mar 5, 2024
1 parent aeedb43 commit 5e4d59f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cdflib/xarray/cdf_to_xarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,10 @@ def _determine_record_dimensions(
created_unlimited_dims: Dict[str, int],
) -> Tuple[str, bool, bool]:
"""
Determines the name of the
Determines the name of the dimensions that the variables span
"""

if var_props.Rec_Vary and var_props.Last_Rec > 0:
if var_props.Rec_Vary and var_props.Last_Rec >= 0:
# Check if this variable is itself the dimension
if var_name in depend_variables and (len(var_props.Dim_Sizes) == 0 or var_props.Last_Rec >= 0):
if not (len(var_props.Dim_Sizes) > 0 and var_props.Last_Rec > 0):
Expand Down

0 comments on commit 5e4d59f

Please sign in to comment.