c7d1a85aada74d750b2cdd5a5f2e54ae8ff00329,lib/prody/dynamics/nma.py,NMA,setEigens,#NMA#Any#Any#,236

Before Change


        
        Variances are set as the inverse eigenvalues.
        
        if not isinstance(vectors, np.ndarray):
            raise TypeError("vectors must be a numpy.ndarray, not {0:s}"
                            .format(type(vectors)))
        elif vectors.ndim != 2:
            raise ValueError("vectors must be a 2-dimensional array")
        else:
            dof = vectors.shape[0]
            if self._is3d:
                n_atoms = dof / 3
            else: 
                n_atoms = dof
            if self._n_atoms > 0 and n_atoms != self._n_atoms:
                    raise ValueError("vectors do not have the right shape, "
                                 "which is (M,{0:d})".format(n_atoms*3))
            n_modes = vectors.shape[1]
        if values is not None:
            if not isinstance(vectors, np.ndarray):
                raise TypeError("values must be a numpy.ndarray, not {0:s}"
                                .format(type(vectors)))

After Change


        try:
            ndim, shape = vectors.ndim, vectors.shape
        except AttributeError:
            raise TypeError("vectors must be a numpy array")
            
        if ndim != 2:
            raise ValueError("vectors must be a 2-dimensional array")
        else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

Instances


Project Name: prody/ProDy
Commit Name: c7d1a85aada74d750b2cdd5a5f2e54ae8ff00329
Time: 2012-11-25
Author: lordnapi@gmail.com
File Name: lib/prody/dynamics/nma.py
Class Name: NMA
Method Name: setEigens


Project Name: arraiy/torchgeometry
Commit Name: 0234315776751221ef9da5d2073e32f9f54c01bb
Time: 2020-11-01
Author: edgar.riba@gmail.com
File Name: kornia/color/yuv.py
Class Name:
Method Name: yuv_to_rgb


Project Name: arraiy/torchgeometry
Commit Name: 0234315776751221ef9da5d2073e32f9f54c01bb
Time: 2020-11-01
Author: edgar.riba@gmail.com
File Name: kornia/color/yuv.py
Class Name:
Method Name: rgb_to_yuv