You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and without replacement (replace=False) is leaking RAM usage by creating in memory an array the size of the sample size requested, which is not cleared after the function call. So, for instance, asking for 100 random points with a value between 0 and 1 billion, without replacement, will create an array of size 1 billion in memory which stays for a while. See numpy/numpy#14169 and GlacioHack/xdem#501 (reply in thread).
And we are currently doing this everywhere 😱
We need to replace everywhere in GeoUtils and xDEM by:
rnd=np.random.default_rng(seed=random_state)
The text was updated successfully, but these errors were encountered:
Turns out using the legacy NumPy random generator
or its equivalent for consistency in the random output:
and without replacement (
replace=False
) is leaking RAM usage by creating in memory an array the size of the sample size requested, which is not cleared after the function call. So, for instance, asking for 100 random points with a value between 0 and 1 billion, without replacement, will create an array of size 1 billion in memory which stays for a while. See numpy/numpy#14169 and GlacioHack/xdem#501 (reply in thread).And we are currently doing this everywhere 😱
We need to replace everywhere in GeoUtils and xDEM by:
The text was updated successfully, but these errors were encountered: