kwgoodman
kwgoodman
@RayPalmerTech if you don't need the output to be the same length as the input you can slice into the output, something like ```a[half_window:-half_window]```. Slicing is very fast as there...
My goal is to follow numpy. So I'd only consider changing if you got them to change. To follow current numpy behavior I do: ``` if (allnan) { VALUE_ERR("All-NaN slice...
Hi there. Can you paste a small segment of the big array? Perhaps 200 elements that contain a 121 element window that gives a std of zero.
I'm trying to get a small example that I can easily play with. So if you have something along the lines of ``` In [1]: a = np.random.rand(20) In [2]:...
Oh, wait, so the array snippet you gave doesn't reproduce the problem? Yeah, there is a path dependence. So the starting point can matter.
I can reproduce the zero std with float32. First create an array: ``` In [1]: rs = np.random.RandomState(10) In [2]: a = rs.rand(100000000) In [3]: a[a < 0.05] = 100...
I suspect that all this is related to https://github.com/kwgoodman/bottleneck/issues/99 and the corresponding PR. I found a smaller example: ``` In [4]: for i in range(1000000): ...: rs = np.random.RandomState(i) ...:...
The change was made to handle this situation: ``` In [10]: a = np.array([1, 2, 3]) + 1e9 In [11]: bn.move_std(a, 2) Out[11]: array([ nan, 0.5, 0.5]) ``` That used...
@adament Keeping the intermediate values in float64 sounds like a great idea. I'll keep it on my list of things to test.