def on_changed(self, which):
        if 'vn' in which:
            vn = self.vn.r.reshape((-1,3))
            
            # Conversion from normals to spherical harmonics found in...
            # http://en.wikipedia.org/wiki/Spherical_coordinate_system#Cartesian_coordinates
            self.theta = np.arccos(vn[:,2])
            self.phi = np.arctan2(vn[:,1], vn[:,0])
            
            self.sh_coeffs = real_sh_coeff(vn)            
            self.num_verts = self.sh_coeffs.shape[0]

        if which in 'light_color' or self.mtx.shape[1] != self.num_verts:
            nc = self.num_channels
            IS = np.arange(self.num_verts*nc)
            JS = np.repeat(np.arange(self.num_verts), nc)
            data = (row(self.light_color)*np.ones((self.num_verts, nc))).ravel()
            self.mtx = sp.csc_matrix((data, (IS,JS)), shape=(self.num_verts*nc, self.num_verts))
dataset/ETHPy150Open mattloper/opendr/lighting.py/SphericalHarmonics.on_changed/swapped operands of `in`