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

def cclib::parser::data::ccData::arrayify (   self )
Converts appropriate attributes to arrays or lists of arrays.

Definition at line 144 of file data.py.

00144                       :
        """Converts appropriate attributes to arrays or lists of arrays."""
        
        for k, v in self._attrtypes.iteritems():
            if hasattr(self, k):
                precision = 'd'
                if k in self._intarrays:
                    precision = 'i'
                if v == numpy.ndarray:
                    setattr(self, k, numpy.array(getattr(self, k), precision))
                elif v == list and k in self._listsofarrays:
                    setattr(self, k, [numpy.array(x, precision)
                                      for x in getattr(self, k)])


Generated by  Doxygen 1.6.0   Back to index