def _mixture_stddev_np(pi_vector, mu_vector, sigma_vector):
pi_vector = np.expand_dims(pi_vector, axis=<NUM_LIT:1>)<EOL>mean_wa = np.matmul(pi_vector, np.expand_dims(mu_vector, axis=<NUM_LIT:2>))<EOL>var_wa = np.matmul(pi_vector, np.expand_dims(sigma_vector**<NUM_LIT:2>, axis=<NUM_LIT:2>))<EOL>mid_term = np.matmul(pi_vector, np.expand_dims(mu_vector**<NUM_LIT:2>, axis=<NUM_LIT:2>))<EOL>mixture_variance = (<EOL>np.squeeze(var_wa) + np.squeeze(mid_term) - np.squeeze(mean_wa**<NUM_LIT:2>))<EOL>return np.sqrt(mixture_variance)<EOL>
Computes the standard deviation of a univariate mixture distribution.

    Acts upon `np.array`s (not `tf.Tensor`s).

    Args:
      pi_vector: A `np.array` of mixture weights. Shape `[batch, components]`.
      mu_vector: A `np.array` of means. Shape `[batch, components]`
      sigma_vector: A `np.array` of stddevs. Shape `[batch, components]`.

    Returns:
      A `np.array` containing the batch of standard deviations.