Open IntelleKarl opened 4 months ago
On Windows, I happen to get this warning from numpy:
RuntimeWarning: invalid value encountered in cast out = np.round(out).astype(int)
Not to receive any warnings on windows.
import nevergrad test_scalar = nevergrad.p.Scalar(lower=1e12, upper=1e13).set_integer_casting() test_scalar.sample()
I believe this is because np.dtype(int) is platform dependant. On Windows, this is interpreted as dtype('int32') whilst on Linux it is dtype('int64'). I believe a fix for this would simply be to use np.int64 directly.
np.dtype(int)
dtype('int32')
dtype('int64')
Steps to reproduce
Observed Results
On Windows, I happen to get this warning from numpy:
Expected Results
Not to receive any warnings on windows.
Relevant Code
I believe this is because
np.dtype(int)
is platform dependant. On Windows, this is interpreted asdtype('int32')
whilst on Linux it isdtype('int64')
. I believe a fix for this would simply be to use np.int64 directly.