Skip to content

Commit 15f9b56

Browse files
authored
Fix bug when trying to open a file with length 0 dimension (#464)
* allow uppercase date units in cf conventions * fix empty dimensions
1 parent 36a49ff commit 15f9b56

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/DatasetAPI/Datasets.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ cleanaxiselement(x) = x
311311

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

0 commit comments

Comments
 (0)