[pymvpa] ColumnData

Matthias Ekman Matthias.Ekman at nf.mpg.de
Mon Jul 20 15:42:28 UTC 2009


Hi,

i have a little problem concerning 'mvpa.misc.io.base.ColumnData'

I don't see why the following code is not working:

attr = ColumnData(source=os.path.join(pymvpa_dataroot, 
'attributes.txt'), header=False, headersep=None, skiplines=0)

I think its this part in misc/io/base.py which causes the problem:

         # generate missing properties for each item in the header
         classdict = self.__class__.__dict__
         for k in self.keys():
             print k
             if not classdict.has_key(k):
                 getter = "lambda self: self._getAttrib('%s')" % (k)

	<snip>

But I don't see why?

However, after adding some header labels to the txt-file and setting 
header=True everything works fine.


Of course it would be no problem to use 'SampleAttributes' instead of 
'ColumnData' here, but in my real usecase i am trying to load N column 
txt-files with additional features in it.

Do you have any idea?

Bests regards,
  Matthias



More information about the Pkg-ExpPsy-PyMVPA mailing list