<br><br><div class="gmail_quote">On Wed, Aug 18, 2010 at 9:40 PM, Mark Bakker <span dir="ltr"><<a href="mailto:markbak@gmail.com">markbak@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I understand why numpy does it, but even Python itself gives 10**-2 = 0.01.<br>So I am wondering whether this is the intended behavior of numpy. I don't really think so, but I may be wrong.<div class="im"><br></div></blockquote>
<div>Was intended, but should probably be changed: <a href="http://projects.scipy.org/numpy/ticket/301">http://projects.scipy.org/numpy/ticket/301</a><br>Would be good to make this decision and get it into 1.5.0.<br><br>Cheers,<br>
Ralf<br><br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im"><br>> Roberto wrote:<br>
> I think the problem is that array([-2]) is an array of integers, so the 
result is also an array of integers. It works fine with array([-2.0]).<br><br></div><div class="gmail_quote"><div class="im">On Wed, Aug 18, 2010 at 2:42 PM, Mark Bakker <span dir="ltr"><<a href="mailto:markbak@gmail.com" target="_blank">markbak@gmail.com</a>></span> wrote:<br>

</div><div><div></div><div class="h5"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hello list,<br><br>When I do 10**-2, Python nicely returns 0.02<br>
<br>But with numpy (version 1.3.0), I get zero:<br>
<br>In [492]: 10**array([-2])<br>Out[492]: array([0])<br><br>Is this the intended behavior?<br><br>Thanks, Mark<br>
<br><br><br>
</blockquote></div></div></div><br>
<br>_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/numpy-discussion" target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
<br></blockquote></div><br>