Left-multiply a y-vector or function matrix by the weights. If the weights are special (sparse, etc.), override this. Definition at line 491 of file fitting_toolkit.py. 00491 : 00492 "left multiply vector or matrix by weights... override if weights are sparse matrix, etc." 00493 if self.scalar_weights: 00494 if len(right_array.shape)==1: 00495 return right_array*self.weights 00496 else: 00497 r=copy.copy(right_array) 00498 for k in range(self.param_count): 00499 r[k]*=self.weights 00500 return r 00501 else: 00502 return dot(self.weights, right_array) 00503 ##
|