<div dir="ltr">Thanks Matthew!,<div>regarding my platform, it's 64 bits, but as @seberg just mentioned here <a href="https://github.com/numpy/numpy/issues/6056">https://github.com/numpy/numpy/issues/6056</a>, in windows it defaults to int32 even on a 64-bit platform.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 8, 2015 at 5:47 PM, Matthew Brett <span dir="ltr"><<a href="mailto:matthew.brett@gmail.com" target="_blank">matthew.brett@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wed, Jul 8, 2015 at 11:03 PM, Matthew Brett <<a href="mailto:matthew.brett@gmail.com">matthew.brett@gmail.com</a>> wrote:<br>
> On Wed, Jul 8, 2015 at 10:45 PM, Jesus-Omar Ocegueda-Gonzalez<br>
> <<a href="mailto:jomaroceguedag@gmail.com">jomaroceguedag@gmail.com</a>> wrote:<br>
>> I get the following:<br>
>> In [17]: dwi_nib.shape<br>
>> Out[17]: (140, 140, 96, 552)<br>
>> In [18]: dwi_nib.get_data_dtype()<br>
>> Out[18]: dtype('<f4')<br>
>> In [19]: np.prod(dwi_nib.shape) * 4<br>
>> Out[19]: -140394496<br>
>> In [20]: np.int64(np.prod(dwi_nib.shape)) * 4<br>
>> Out[20]: 4154572800<br>
><br>
> Most unfortunately, it looks as though numpy casts to int32 by default<br>
> on 32-bit platforms, which is what is causing this problem.<br>
><br>
> Your fix is fine, I'll submit another in a little while.<br>
<br>
</span><a href="https://github.com/numpy/numpy/issues/6056" rel="noreferrer" target="_blank">https://github.com/numpy/numpy/issues/6056</a><br>
<br>
<a href="https://github.com/nipy/nibabel/pull/325" rel="noreferrer" target="_blank">https://github.com/nipy/nibabel/pull/325</a><br>
<br>
Having said that, I don't think your 32-bit platform can handle an<br>
array of that size anyway...<br>
<div class="HOEnZb"><div class="h5"><br>
Cheers,<br>
<br>
Matthew<br>
_______________________________________________<br>
Neuroimaging mailing list<br>
<a href="mailto:Neuroimaging@python.org">Neuroimaging@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/neuroimaging" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/neuroimaging</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">"Cada quien es dueño de lo que calla y esclavo de lo que dice"<br>-Proverbio chino.<br>"We all are owners of what we keep silent and slaves of what we say"<br>-Chinese proverb.<br><br><a href="http://www.cimat.mx/~omar" target="_blank">http://www.cimat.mx/~omar</a><br></div>
</div>