Ejemplo n.º 1
0
 def __init__(self, mu, Sigma, Z=0.):
     mu, Sigma, Z = match_shapes([('mu', mu, 1), ('Sigma', Sigma, 0), ('Z', Z, 0)])
     self._mu = mu
     self._Sigma = Sigma
     self._Z = Z
     self.dim = mu.shape[-1]
     self.ndim = mu.ndim - 1
     self.shape = full_shape([Sigma.shape, mu.shape[:-1], Z.shape])
     self.shape_str = '%s mu=%s Z=%s %s' % (Sigma.__class__, mu.shape, Z.shape, Sigma.shape_str)
 def __init__(self, mu, Sigma, Z=0.0):
     mu, Sigma, Z = match_shapes([("mu", mu, 1), ("Sigma", Sigma, 0), ("Z", Z, 0)])
     self._mu = mu
     self._Sigma = Sigma
     self._Z = Z
     self.dim = mu.shape[-1]
     self.ndim = mu.ndim - 1
     self.shape = full_shape([Sigma.shape, mu.shape[:-1], Z.shape])
     self.shape_str = "%s mu=%s Z=%s %s" % (Sigma.__class__, mu.shape, Z.shape, Sigma.shape_str)
 def __init__(self, mu, Sigma, Z=0.):
     mu, Sigma, Z = match_shapes([('mu', mu, 1), ('Sigma', Sigma, 0), ('Z', Z, 0)])
     self._mu = mu
     self._Sigma = Sigma
     self._Z = Z
     self.dim = mu.shape[-1]
     self.ndim = mu.ndim - 1
     self.shape = full_shape([Sigma.shape, mu.shape[:-1], Z.shape])
     self.shape_str = '%s mu=%s Z=%s %s' % (Sigma.__class__, mu.shape, Z.shape, Sigma.shape_str)
Ejemplo n.º 4
0
 def __init__(self, d, Q, s_perp, dim):
     BaseMatrix.__init__(self)
     d, Q, s_perp = match_shapes([('d', d, 0), ('Q', Q, 0), ('s_perp', s_perp, 0)])
     self._d = d
     self._Q = Q
     self.dim = dim
     self.ndim = d.ndim
     self._s_perp = s_perp
     self.shape = full_shape([d.shape, Q.shape, s_perp.shape])
     self.shape_str = 'd=%s Q=%s s_perp=%s' % (d.shape, Q.shape, s_perp.shape)
 def __init__(self, Lambda, J_diff, Z_diff, X):
     Lambda, J_diff, X = match_shapes([("Lambda", Lambda, 0), ("J_diff", J_diff, 1), ("X", X, 1)])
     self._Lambda = Lambda
     self._J_diff = J_diff.copy()
     self._Z_diff = Z_diff.copy()
     self._X = X.copy()
     self.dim = self._J_diff.shape[-1]
     self.ndim = self._J_diff.ndim - 1
     self.shape = full_shape([Lambda.shape, J_diff.shape[:-1], X.shape[:-1]])
     self.shape_str = "%s J_diff=%s X=%s %s" % (Lambda.__class__, J_diff.shape, X.shape, Lambda.shape_str)
 def __init__(self, J, Lambda, Z):
     J, Lambda, Z = match_shapes([("J", J, 1), ("Lambda", Lambda, 0), ("Z", Z, 0)])
     self._J = J
     self._Lambda = Lambda
     self._Z = Z
     self.shape = full_shape([J.shape[:-1], Lambda.shape, Z.shape])
     self.ndim = J.ndim - 1
     self.dim = J.shape[-1]
     self.shape_str = "%s J=%s Z=%s %s" % (Lambda.__class__, J.shape, Z.shape, Lambda.shape_str)
     self.mutable = False
Ejemplo n.º 7
0
 def __init__(self, Lambda, J_diff, Z_diff, X):
     Lambda, J_diff, X = match_shapes([('Lambda', Lambda, 0), ('J_diff', J_diff, 1), ('X', X, 1)])
     self._Lambda = Lambda
     self._J_diff = J_diff.copy()
     self._Z_diff = Z_diff.copy()
     self._X = X.copy()
     self.dim = self._J_diff.shape[-1]
     self.ndim = self._J_diff.ndim - 1
     self.shape = full_shape([Lambda.shape, J_diff.shape[:-1], X.shape[:-1]])
     self.shape_str = '%s J_diff=%s X=%s %s' % (Lambda.__class__, J_diff.shape, X.shape, Lambda.shape_str)
 def __init__(self, Lambda, J_diff, Z_diff, X):
     Lambda, J_diff, X = match_shapes([('Lambda', Lambda, 0), ('J_diff', J_diff, 1), ('X', X, 1)])
     self._Lambda = Lambda
     self._J_diff = J_diff.copy()
     self._Z_diff = Z_diff.copy()
     self._X = X.copy()
     self.dim = self._J_diff.shape[-1]
     self.ndim = self._J_diff.ndim - 1
     self.shape = full_shape([Lambda.shape, J_diff.shape[:-1], X.shape[:-1]])
     self.shape_str = '%s J_diff=%s X=%s %s' % (Lambda.__class__, J_diff.shape, X.shape, Lambda.shape_str)
 def __init__(self, J, Lambda, Z):
     J, Lambda, Z = match_shapes([('J', J, 1), ('Lambda', Lambda, 0), ('Z', Z, 0)])
     self._J = J
     self._Lambda = Lambda
     self._Z = Z
     self.shape = full_shape([J.shape[:-1], Lambda.shape, Z.shape])
     self.ndim = J.ndim - 1
     self.dim = J.shape[-1]
     self.shape_str = '%s J=%s Z=%s %s' % (Lambda.__class__, J.shape, Z.shape, Lambda.shape_str)
     self.mutable = False
Ejemplo n.º 10
0
 def __init__(self, d, Q, s_perp):
     BaseMatrix.__init__(self)
     d, Q, s_perp = match_shapes([('d', d, 1), ('Q', Q, 2), ('s_perp', s_perp, 0)])
     self._d = d
     self._Q = Q
     self.dim = Q.shape[-2]
     self.rank = Q.shape[-1]
     self.ndim = Q.ndim - 2
     self.shape = full_shape([d.shape[:-1], Q.shape[:-2], s_perp.shape])
     self._s_perp = s_perp
     self.shape_str = 'd=%s Q=%s s_perp=%s' % (d.shape, Q.shape, s_perp.shape)
Ejemplo n.º 11
0
 def __init__(self, d, Q, s_perp, dim):
     BaseMatrix.__init__(self)
     d, Q, s_perp = match_shapes([('d', d, 0), ('Q', Q, 0),
                                  ('s_perp', s_perp, 0)])
     self._d = d
     self._Q = Q
     self.dim = dim
     self.ndim = d.ndim
     self._s_perp = s_perp
     self.shape = full_shape([d.shape, Q.shape, s_perp.shape])
     self.shape_str = 'd=%s Q=%s s_perp=%s' % (d.shape, Q.shape,
                                               s_perp.shape)
Ejemplo n.º 12
0
 def __init__(self, d, Q, s_perp):
     BaseMatrix.__init__(self)
     d, Q, s_perp = match_shapes([('d', d, 1), ('Q', Q, 2),
                                  ('s_perp', s_perp, 0)])
     self._d = d
     self._Q = Q
     self.dim = Q.shape[-2]
     self.rank = Q.shape[-1]
     self.ndim = Q.ndim - 2
     self.shape = full_shape([d.shape[:-1], Q.shape[:-2], s_perp.shape])
     self._s_perp = s_perp
     self.shape_str = 'd=%s Q=%s s_perp=%s' % (d.shape, Q.shape,
                                               s_perp.shape)