Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork15
Open
Labels
Description
When usingnp.astype and the array hasinf ornan, I see aRuntimeWarning: invalid value encountered in cast. On internal numpy float dtypes these are not emitted.
Run withpython -Walways
import numpy as npimport numpy_quaddtypea = np.arange(30, dtype=np.float32); a[-1] = np.infq = numpy_quaddtype.QuadPrecisiond = np.float64warns = a.astype(q)# <stdin>:1: RuntimeWarning: invalid value encountered in castnowarns = a.astype(d)# This does not warnwarns.astype(d)I think this is coming from sleef?