Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.5: elsize / strided interface change? #36910

Closed
dlfivefifty opened this issue Aug 4, 2020 · 2 comments
Closed

1.5: elsize / strided interface change? #36910

dlfivefifty opened this issue Aug 4, 2020 · 2 comments

Comments

@dlfivefifty
Copy link
Contributor

Did the strided array interface change? I'm getting errors in Julia v1.5 from something that conformed to the interface due to elsize not being defined:

Got exception outside of a @test
  MethodError: no method matching elsize(::Type{BlockArrays.PseudoBlockArray{Float64,2,Array{Float64,2},Tuple{BlockArrays.BlockedUnitRange{Array{Int64,1}},BlockArrays.BlockedUnitRange{Array{Int64,1}}}}})
  Closest candidates are:
    elsize(!Matched::Type{var"#s91"} where var"#s91"<:(Array{T,N} where N)) where T at array.jl:220
    elsize(!Matched::Base.CodeUnits{T,S} where S<:AbstractString) where T at strings/basic.jl:724
    elsize(!Matched::Random.UnsafeView{T}) where T at /Users/sheehanolver/Projects/julia-1.5/usr/share/julia/stdlib/v1.5/Random/src/RNGs.jl:440
    ...
  Stacktrace:
   [1] elsize(::BlockArrays.PseudoBlockArray{Float64,2,Array{Float64,2},Tuple{BlockArrays.BlockedUnitRange{Array{Int64,1}},BlockArrays.BlockedUnitRange{Array{Int64,1}}}}) at ./abstractarray.jl:153
   [2] _memory_offset(::BlockArrays.PseudoBlockArray{Float64,2,Array{Float64,2},Tuple{BlockArrays.BlockedUnitRange{Array{Int64,1}},BlockArrays.BlockedUnitRange{Array{Int64,1}}}}, ::Int64, ::Vararg{Int64,N} where N) at ./abstractarray.jl:1016
   [3] unsafe_convert(::Type{Ptr{Float64}}, ::SubArray{Float64,2,BlockArrays.PseudoBlockArray{Float64,2,Array{Float64,2},Tuple{BlockArrays.BlockedUnitRange{Array{Int64,1}},BlockArrays.BlockedUnitRange{Array{Int64,1}}}},Tuple{BlockArrays.BlockSlice{BlockArrays.BlockIndexRange{1,Tuple{UnitRange{Int64}}},UnitRange{Int64}},BlockArrays.BlockSlice{BlockArrays.Block{1,Int64},UnitRange{Int64}}},false}) at ./subarray.jl:405
...

The docs have not changed: https://docs.julialang.org/en/v1/manual/interfaces/#man-interface-strided-arrays-1

@KristofferC
Copy link
Member

Dup of #36553?

@dlfivefifty
Copy link
Contributor Author

Not quite: PseudoBlockArray is not a subtype of DenseArray. But @mbauman's comment already mentions the strided array interface so I think we can close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants