Skip to content

[BUG] get wrong result in move_mean #377

@rogerdehe

Description

@rogerdehe

I find a strange thing,

bd.move_mean([1.9272201201869577, 0.0, 0.0, 0.0], 3)

this print:

[           nan,            nan, 6.36527364e-01, 6.42406707e-01, 7.40148683e-17]

the last result should be 0 instead of 7.40148683e-17 actually.

With the slow version https://github.com/pydata/bottleneck/blob/master/bottleneck/slow/move.py#L26 here:
it results

[       nan        nan 0.63652736 0.64240671 0.        ]

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions