To resolve the issue in odc-stats regards to geomedian ref: https://github.com/opendatacube/odc-stats/issues/100. The issue was caused by the race-condition on numexpr.evaluate when allocating the memory out of the function in multi-threading.
changes:
let numexpr.evaluate allocate memory and return the pointer
hold the input memory pointer until the end of geomedian function to be safer
pack scale and geomad calculation into geomedian function for the sake of cpu and memory efficiency
some cleanup in scale functions
I don't have a better way to test geomedian here than in odc-stats atm.
To resolve the issue in
odc-stats
regards to geomedian ref: https://github.com/opendatacube/odc-stats/issues/100. The issue was caused by the race-condition onnumexpr.evaluate
when allocating the memory out of the function in multi-threading. changes:numexpr.evaluate
allocate memory and return the pointerI don't have a better way to test geomedian here than in
odc-stats
atm.