Logo Search packages:      
Sourcecode: cclib version File versions  Download package

def cclib::parser::data::ccData::listify (   self )
Converts all attributes that are arrays or lists of arrays to lists.

Definition at line 134 of file data.py.

00134                      :
        """Converts all attributes that are arrays or lists of arrays to lists."""
        
        for k, v in self._attrtypes.iteritems():
            if hasattr(self, k):
                if v == numpy.ndarray:
                    setattr(self, k, getattr(self, k).tolist())
                elif v == list and k in self._listsofarrays:
                    setattr(self, k, [x.tolist() for x in getattr(self, k)])
    

Generated by  Doxygen 1.6.0   Back to index