Skip to content

Document behavior when data includes np.nan? #1251

@doronbehar

Description

@doronbehar

Description

Document what happens when data includes a np.nan.

Motivation and Context

So I wanted to use this example from the docs:

box = [100, 100, 100]
points = [[-1, 0, 0], [0, 0, 0], [2, 0, 0]]
query_args = dict(mode='nearest', num_neighbors=1, exclude_ii=True)
list(freud.locality.AABBQuery(box, points).query(points, query_args))

Putting a np.nan in one of the points, produced a result as expected result:

>>> points = [[-1, 0, 0], [0, np.nan, 0], [2, 0, 0]]
[(0, 2, 3.0), (2, 0, 3.0)]

I had to run that little test though to find that out, and it would have been nice if it was mentioned even with an example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    taskA task to be completed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions