def dot_mv(self, mv): shape = (self.nvec(), mv.nvec()) m = DoubleArray(shape[0] * shape[1]) self.dot(mv, m) return np.zeros(shape) + m.array().reshape(shape, order='C')
def norm(self, norm_type): shape = self.nvec() m = DoubleArray(shape) self.norm_all(norm_type, m) return np.zeros(shape) + m.array()
def dot_v(self, v): m = DoubleArray(self.nvec()) self.dot(v, m) return np.zeros(self.nvec()) + m.array()