clean method bug if a var is nan · Issue #163 · python-windrose/windrose · GitHub
Skip to content

clean method bug if a var is nan #163

Description

@15b3

The clean function is not properly removing the values.

if a var (wind speed) is nan or equal to 0, this data is removed from var array but also from dir array

But...

Example:

>>> direction = np.array([15.0])
>>> var = np.array([np.nan])
>>> windrose.clean(direction, var)
(array([15.]), array([nan]))

Data is not removed in case that a var is nan.

It should return

(array([], dtype=float64), array([], dtype=float64))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions