def __init__(self, w, mu, *args, **kwargs):
    (_, sd) = get_tau_sd(tau=kwargs.pop('tau', None), sd=kwargs.pop('sd', None))
    distshape = np.broadcast(mu, sd).shape
    self.mu = mu = tt.as_tensor_variable(mu)
    self.sd = sd = tt.as_tensor_variable(sd)
    if (not distshape):
        distshape = np.broadcast(mu.tag.test_value, sd.tag.test_value).shape
    super(NormalMixture, self).__init__(w, Normal.dist(mu, sd=sd, shape=distshape), *args, **kwargs)
def __init__(self, w, mu, *args, **kwargs):
    (_, sd) = get_tau_sd(tau=kwargs.pop('tau', None), sd=kwargs.pop('sd', None))
    distshape = np.broadcast(mu, sd).shape
    self.mu = mu = tt.as_tensor_variable(mu)
    self.sd = sd = tt.as_tensor_variable(sd)
    if (not distshape):
        distshape = np.broadcast(mu.tag.test_value, sd.tag.test_value).shape
    super(NormalMixture, self).__init__(w, Normal.dist(mu, sd=sd, shape=distshape), *args, **kwargs)