Skip to content

Commit

Permalink
fix empty dimensions
Browse files Browse the repository at this point in the history
  • Loading branch information
meggart committed Oct 28, 2024
1 parent c2c0663 commit fbe05f8
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 fbe05f8

Please sign in to comment.