<br><br><div class="gmail_quote">On Fri, May 1, 2009 at 1:02 PM, Neal Becker <span dir="ltr"><<a href="mailto:ndbecker2@gmail.com">ndbecker2@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
In [16]: (np.linspace (0, len (x)-1, len(x)).astype (np.uint64)*2).dtype<br>
Out[16]: dtype('uint64')<br>
<br>
In [17]: (np.linspace (0, len (x)-1, len(x)).astype (np.uint64)*n).dtype<br>
Out[17]: dtype('float64')<br>
<br>
In [18]: type(n)<br>
Out[18]: <type 'int'><br>
<br>
Now that's just strange.  What's going on?<br>
<br>
</blockquote><div><br>The  n is signed, uint64 is unsigned. So a signed type that can hold uint64 is needed. There ain't no such integer, so float64 is used. I think the logic here is a bit goofy myself since float64 doesn't have the needed 64 bit precision and the conversion from int kind to float kind is confusing. I think it would be better to raise a NotAvailable error or some such. Lest you think this is an isolated oddity, sometimes numeric arrays can be converted to object arrays.<br>
<br>Chuck<br></div></div><br>