Skip to content

Commit

Permalink
Fix bug when trying to open a file with length 0 dimension (#464)
Browse files Browse the repository at this point in the history
* allow uppercase date units in cf conventions

* fix empty dimensions
  • Loading branch information
meggart authored Oct 28, 2024
1 parent 36a49ff commit 15f9b56
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/DatasetAPI/Datasets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ cleanaxiselement(x) = x

"Test if data in x can be approximated by a step range"
function testrange(x)
isempty(x) && return x
r = range(first(x), last(x), length = length(x))
all(i -> isapprox(i...), zip(x, r)) ? r : x
end
Expand Down

0 comments on commit 15f9b56

Please sign in to comment.