Skip to content

Why default tolerance at 0 in indexing on axis coordinate value? #205

@Chiil

Description

@Chiil

I was playing around AxisArrays for the first time and did this:

using AxisArrays

x = 0:10:100 |> collect
a = AxisArray(rand(length(x)); x=x)

println(a[x=29..33])
println(a[x=30..30])
println(a[atvalue(29; atol=5)])
println(a[atvalue(29)]) # Does not work.

Would it not be more intuitive to set the default tolerance to a very large value? For my own personal use, I would use AxisArrays to find values nearest to a given coordinate in gridded data. Or did I overlook an option to set the default tolerance?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions