Ouranosinc / lmoments3

Estimate linear moments for statistical distribution functions
https://lmoments3.readthedocs.io/en/stable/
GNU General Public License v3.0
7 stars 0 forks source link

Avoid inplace sort of input of lmom_ratios #18

Closed aulemahal closed 4 months ago

aulemahal commented 4 months ago

Fixes #15 and OpenHydrology/lmoments3#2.

The issue only happens when np.asarray(x, dtype=np.float64) encounters an object it does not need to cast as an array, i.e. an array of dtype float64. In all other cases there's an implicit copy.