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

FullGridCellList can't handle NaN values and throws unspecific errors #65

Open
efaulhaber opened this issue Aug 6, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@efaulhaber
Copy link
Member

efaulhaber commented Aug 6, 2024

See #64.

julia> nhs = GridNeighborhoodSearch{2}(search_radius = 1.0, n_points = 2, cell_list = FullGridCellList(min_corner = (-10.0, -10.0), max_corner = (10.0, 10.0), search_radius = 1.0));

julia> initialize!(nhs, x, x);
ERROR: BoundsError: attempt to access 22×22 LinearIndices{2, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}} at index [13, -9223372036854775808]
Stacktrace:
 [1] throw_boundserror(A::LinearIndices{2, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}, I::Tuple{Int64, Int64})
   @ Base ./abstractarray.jl:737
 [2] checkbounds
   @ ./abstractarray.jl:702 [inlined]
 [3] _getindex
   @ ./abstractarray.jl:1323 [inlined]
 [4] getindex
   @ ./abstractarray.jl:1291 [inlined]
 [5] cell_index
   @ /mnt/ssd/home/efaulhab/git/PointNeighbors.jl/src/cell_lists/full_grid.jl:162 [inlined]
 [6] push_cell!
   @ /mnt/ssd/home/efaulhab/git/PointNeighbors.jl/src/cell_lists/full_grid.jl:124 [inlined]
 [7] initialize_grid!(neighborhood_search::GridNeighborhoodSearch{…}, y::Matrix{…})
   @ PointNeighbors /mnt/ssd/home/efaulhab/git/PointNeighbors.jl/src/nhs_grid.jl:176
 [8] initialize!(neighborhood_search::GridNeighborhoodSearch{…}, x::Matrix{…}, y::Matrix{…})
   @ PointNeighbors /mnt/ssd/home/efaulhab/git/PointNeighbors.jl/src/nhs_grid.jl:162
 [9] top-level scope
   @ REPL[14]:1
Some type information was truncated. Use `show(err)` to see complete types.

We want to either make this cell list work with NaN values or at least throw an error message that properly explains the problem

@efaulhaber efaulhaber changed the title FullGridCellList can FullGridCellList can't handle NaN values and throws unspecific errors Aug 6, 2024
@efaulhaber efaulhaber added the enhancement New feature or request label Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant