Menu

#2847 binAverage incorrectly handles edges

nextrelease
open-fixed
nobody
None
5
7 hours ago
5 days ago
No

I have a code which uses the weights resulting from calls to binAverage, and I can see that the edges end up getting points outside of the bins. The code uses the "whichBin" function but does not verify that the result is within the closest bin. This appears to be the case for both the 1-D and 2-D averages.

Discussion

  • Jeremy Faden

    Jeremy Faden - 9 hours ago

    The 2D issue is that truncate was used to find the bin number, so -0.99 would have resulted in an extra count in bin 0. This is fixed.

     
  • Jeremy Faden

    Jeremy Faden - 7 hours ago

    1D is fixed now, getting the cadence and then requiring the data be within 1/2 of the cadence of the extent of the data.

     

    Last edit: Jeremy Faden 7 hours ago
  • Jeremy Faden

    Jeremy Faden - 7 hours ago
    • status: open --> open-fixed
     
Auth0 Logo