We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
indices
Compat.axes
1 parent 249d071 commit e814a11Copy full SHA for e814a11
src/definitions.jl
@@ -36,11 +36,11 @@ realfloat(x::AbstractArray{T}) where {T<:Real} = copy1(typeof(fftfloat(zero(T)))
36
37
# copy to a 1-based array, using circular permutation
38
function copy1(::Type{T}, x) where T
39
- y = Array{T}(map(length, indices(x)))
+ y = Array{T}(map(length, Compat.axes(x)))
40
Base.circcopy!(y, x)
41
end
42
43
-to1(x::AbstractArray) = _to1(indices(x), x)
+to1(x::AbstractArray) = _to1(Compat.axes(x), x)
44
_to1(::Tuple{Base.OneTo,Vararg{Base.OneTo}}, x) = x
45
_to1(::Tuple, x) = copy1(eltype(x), x)
46
0 commit comments