m3g / CellListMap.jl

Flexible implementation of cell lists to map the calculations of particle-pair dependent functions, such as forces, energies, neighbor lists, etc.
https://m3g.github.io/CellListMap.jl/
MIT License
87 stars 4 forks source link

`limits(x, y)` requires arrays of the same type for no reason #88

Closed efaulhaber closed 1 year ago

efaulhaber commented 1 year ago

Something like this doesn't work, for no other reason than too specific dispatching:

julia> using CellListMap, StaticArrays

julia> x = [[0.0, 0.0]]; y = [SVector(0.0, 0.0)];

julia> limits(x, y)
ERROR: MethodError: no method matching limits(::Vector{Vector{Float64}}, ::Vector{SVector{2, Float64}})

Closest candidates are:
  limits(::AbstractVector{<:AbstractVector})
   @ CellListMap ~/.julia/dev/CellListMap/src/CellOperations.jl:296
  limits(::T, ::T) where T<:(AbstractVector{<:AbstractVector})
   @ CellListMap ~/.julia/dev/CellListMap/src/CellOperations.jl:315
lmiq commented 1 year ago

available in version 0.8.17