Closed theogf closed 4 years ago
Thanks for reporting! That doesn’t demonstrate what people mean by not being type stable, but I see what you mean. The value gets promoted to Float64 by the Bessel correction:
I’ve got a fix in mind, should be pretty minor changes.
Ah sorry I thought it was when you pass a Float32 you expect a Float32 (in this case) at the output!
A bit off-topic but is there a reason why it's not possible to iterate over MovingWindow
(without using value
)? It would be nice to be able to use last
, first
and other iteration tools! :D
Thanks a lot for the package it's really amazingly easy to use!
Type stability is when the return type can change depending on the inputs to a method, e.g.
f(x::Int) = x == 1 ? 1 : false
isn't type stable because f(1)
and f(2)
call the same method but return different types.
why it's not possible to iterate over MovingWindow
Only because I haven't needed it/nobody requested it! You want to give it a shot and make a PR?
Thanks a lot for the package it's really amazingly easy to use!
Thanks for the kind words!
This is now fixed in the latest release.
MWE :