[Neuroimaging] Nibabel. Loading HCP data.
Jesus-Omar Ocegueda-Gonzalez
jomaroceguedag at gmail.com
Thu Jul 9 06:19:36 CEST 2015
Thanks Matthew!,
regarding my platform, it's 64 bits, but as @seberg just mentioned here
https://github.com/numpy/numpy/issues/6056, in windows it defaults to
int32 even on a 64-bit platform.
On Wed, Jul 8, 2015 at 5:47 PM, Matthew Brett <matthew.brett at gmail.com>
wrote:
> On Wed, Jul 8, 2015 at 11:03 PM, Matthew Brett <matthew.brett at gmail.com>
> wrote:
> > On Wed, Jul 8, 2015 at 10:45 PM, Jesus-Omar Ocegueda-Gonzalez
> > <jomaroceguedag at gmail.com> wrote:
> >> I get the following:
> >> In [17]: dwi_nib.shape
> >> Out[17]: (140, 140, 96, 552)
> >> In [18]: dwi_nib.get_data_dtype()
> >> Out[18]: dtype('<f4')
> >> In [19]: np.prod(dwi_nib.shape) * 4
> >> Out[19]: -140394496
> >> In [20]: np.int64(np.prod(dwi_nib.shape)) * 4
> >> Out[20]: 4154572800
> >
> > Most unfortunately, it looks as though numpy casts to int32 by default
> > on 32-bit platforms, which is what is causing this problem.
> >
> > Your fix is fine, I'll submit another in a little while.
>
> https://github.com/numpy/numpy/issues/6056
>
> https://github.com/nipy/nibabel/pull/325
>
> Having said that, I don't think your 32-bit platform can handle an
> array of that size anyway...
>
> Cheers,
>
> Matthew
> _______________________________________________
> Neuroimaging mailing list
> Neuroimaging at python.org
> https://mail.python.org/mailman/listinfo/neuroimaging
>
--
"Cada quien es dueño de lo que calla y esclavo de lo que dice"
-Proverbio chino.
"We all are owners of what we keep silent and slaves of what we say"
-Chinese proverb.
http://www.cimat.mx/~omar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20150708/48b692ad/attachment.html>
More information about the Neuroimaging
mailing list