OffsetArrays.jl icon indicating copy to clipboard operation
OffsetArrays.jl copied to clipboard

Missing `diff` for OffsetVector

Open gasagna opened this issue 5 years ago • 0 comments

I noted Base.diff does not work for OffsetArrays. MWE

julia> x = OffsetVector([0, 1, 2, 3], 0:3)
julia> diff(x)
ERROR: ArgumentError: offset axes unsupported
Stacktrace:
 [1] #diff#395(::Int64, ::Function, ::OffsetArray{Int64,1,Array{Int64,1}}) at ./multidimensional.jl:741
 [2] #diff at ./none:0 [inlined]
 [3] diff(::OffsetArray{Int64,1,Array{Int64,1}}) at ./multidimensional.jl:708
 [4] top-level scope at none:0

It would be nice to have this.

gasagna avatar Jul 28 '19 11:07 gasagna