<div dir="ltr"><div><div><div>An unexpected casting result was just reported on stackoverflow:<br><a href="http://stackoverflow.com/questions/18833639/attributeerror-in-python-numpy-when-constructing-function-for-certain-values">http://stackoverflow.com/questions/18833639/attributeerror-in-python-numpy-when-constructing-function-for-certain-values</a><br>
<br></div>The following show the essence of the issue:<br><br>In [1]: np.__version__<br>Out[1]: '1.9.0.dev-6ce65d8'<br><br>In [2]: type(np.array(1.) * (2**64-1))<br>Out[2]: numpy.float64<br><br>In [3]: type(np.array(1.) * (2**64))<br>
Out[3]: float<br><br></div>Note that the result of `np.array(1.0) * 2**64` is a Python float, not a numpy float64.  Is this intentional?<br><br></div><div>(As pointed out in the stackoverflow question, the issue <a href="https://github.com/numpy/numpy/issues/3409">https://github.com/numpy/numpy/issues/3409</a> is at least tangentially related.)<br>
</div><div><br></div>Warren<br> <br></div>