[pymvpa] Surface voxel selection saving error

Nick Oosterhof n.n.oosterhof at googlemail.com
Mon Oct 12 22:37:15 UTC 2015


Hi Swaroop,
I am not really sure what is going on here. Is there any chance you could
provide me with a dataset and code to try to reproduce the issue?
At some point the way these voxel selection results were stored were
changed, though I tried to make it backwards compatible. Would it be
possible for you to re-compute the voxel selection results?
best,
Nick

On 12 October 2015 at 22:05, Swaroop Guntupalli <swaroopgj at gmail.com> wrote:

> I forgot to mention that the loaded voxel selction works fine.
> It's just when I try to save it with h5py, even just after loading, it
> crashes.
>
> On Mon, Oct 12, 2015 at 1:02 PM, Swaroop Guntupalli <swaroopgj at gmail.com>
> wrote:
>
>> Hi Nick,
>>
>> I had a voxel selection pre-computed from a while ago (Oct. 2013).
>> When I try to save it now using h5py, it gives the following error
>> (pasted below).
>>
>> Is there a way to resolve this without re-computing the voxel selection?
>> I can point you to the voxel selection on hydra if that helps.
>>
>> Thanks,
>> Swaroop
>>
>>
>> /PyMVPA/mvpa2/base/hdf5.py in obj2hdf(hdf, obj, name, memo, noid,
>> **kwargs)
>>     758     # try disassembling the object
>>     759     try:
>> --> 760         pieces = obj.__reduce__()
>>     761         if __debug__:
>>     762             debug('HDF5', "Reduced '%s' (ref: %i) in [%s]"
>>
>> /PyMVPA/mvpa2/misc/surfing/volume_mask_dict.pyc in __reduce__(self)
>>     568         return (self.__class__,
>>     569                 (self._volgeom, self._source),
>> --> 570                 self.__getstate__())
>>     571
>>     572     @deprecated("should be used for testing compatibility only - "
>>
>> /PyMVPA/mvpa2/misc/surfing/volume_mask_dict.pyc in __getstate__(self)
>>     599         # here a new tuple is created
>>     600         s3 = _dict_with_arrays2array_tuple(s[3])
>> --> 601         s4 = _dict_with_arrays2array_tuple(s[4])
>>     602         ss = s[:3] + (s3, s4)
>>     603
>>
>> /PyMVPA/mvpa2/misc/surfing/volume_mask_dict.pyc in
>> _dict_with_arrays2array_tuple(d)
>>     938         # probably src2aux, so run recursively
>>     939         return dict((k, _dict_with_arrays2array_tuple(v))
>> --> 940                         for k, v in d.iteritems())
>>     941
>>     942     keys = np.asarray(d.keys())
>>
>> /PyMVPA/mvpa2/misc/surfing/volume_mask_dict.pyc in <genexpr>((k, v))
>>     938         # probably src2aux, so run recursively
>>     939         return dict((k, _dict_with_arrays2array_tuple(v))
>> --> 940                         for k, v in d.iteritems())
>>     941
>>     942     keys = np.asarray(d.keys())
>>
>> /PyMVPA/mvpa2/misc/surfing/volume_mask_dict.pyc in
>> _dict_with_arrays2array_tuple(d)
>>     965             # ensure all values in the dict have the same datatype
>>     966             raise ValueError('Type mismatch for keys %s and %s:
>> %s != %s' %
>> --> 967                                 (keys[0], key, data.dtype,
>> v.dtype))
>>     968
>>     969         idxs = np.arange(length) + pos
>>
>> ValueError: Type mismatch for keys 0 and 41: float64 != float32
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20151013/1897b14f/attachment.html>


More information about the Pkg-ExpPsy-PyMVPA mailing list