<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Sep 16, 2013 at 1:54 PM, Warren Weckesser <span dir="ltr"><<a href="mailto:warren.weckesser@gmail.com" target="_blank">warren.weckesser@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><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" target="_blank">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" target="_blank">https://github.com/numpy/numpy/issues/3409</a> is at least tangentially related.)<span class=""><font color="#888888"><br>

</font></span></div><span class=""><font color="#888888"><div><br></div>Warren<br> <br></font></span></div>
</blockquote></div><br></div><div class="gmail_extra"><br>The original poster of the stackoverflow question has reported the issue on github: <a href="https://github.com/numpy/numpy/issues/3756">https://github.com/numpy/numpy/issues/3756</a><br>
<br></div><div class="gmail_extra">Warren<br><br></div></div>