diff --git a/src/DatasetAPI/Datasets.jl b/src/DatasetAPI/Datasets.jl index 95cbe90a..fe6e5521 100644 --- a/src/DatasetAPI/Datasets.jl +++ b/src/DatasetAPI/Datasets.jl @@ -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