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_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 dot_v(self, v):
     m = DoubleArray(self.nvec())
     self.dot(v, m)
     return np.zeros(self.nvec()) + m.array()
Example #4
0
 def norm(self, norm_type):
     shape = self.nvec()
     m = DoubleArray(shape)
     self.norm_all(norm_type, m)
     return np.zeros(shape) + m.array()
Example #5
0
 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')
Example #6
0
 def dot_v(self, v):
     m = DoubleArray(self.nvec())
     self.dot(v, m)
     return np.zeros(self.nvec()) + m.array()