def cos_c(self, N=None):  # percent=0.9,
		"""Return the squared cosines for each column."""

		if not hasattr(self, 'G') or self.G.shape[1] < self.rank:
			self.fs_c(N=self.rank)  # generate
		self.dc = norm(self.G, axis=1)**2
		# cheaper than diag(self.G.dot(self.G.T))?

		return apply_along_axis(lambda _: _/self.dc, 0, self.G[:, :N]**2)
def cos_c ( self , N = None ) : if not hasattr ( self , 'G' ) or self . G . shape [ 1 ] < self . rank : self . fs_c ( N = self . rank ) self . dc = norm ( self . G , axis = 1 ) ** 2 return apply_along_axis ( lambda _ : _ / self . dc , 0 , self . G [ : , : N ] ** 2 )
Return the squared cosines for each column.