from tensorflow.python.framework import tensor_util

      self.assertEqual(base_params, copy_params)

  def testIsScalar(self):
    with self.test_session():
      mu = 1.
      sigma = 2.

      normal = dists.Normal(mu, sigma,
                            validate_args=True)
      self.assertTrue(tensor_util.constant_value(normal.is_scalar_event))
      self.assertTrue(tensor_util.constant_value(normal.is_scalar_batch))

      normal = dists.Normal([mu], [sigma],
                            validate_args=True)
      self.assertTrue(tensor_util.constant_value(normal.is_scalar_event))
      self.assertFalse(tensor_util.constant_value(normal.is_scalar_batch))

      mvn = dists.MultivariateNormalDiag([mu], [sigma],
                                         validate_args=True)
      self.assertFalse(tensor_util.constant_value(mvn.is_scalar_event))
      self.assertTrue(tensor_util.constant_value(mvn.is_scalar_batch))

      mvn = dists.MultivariateNormalDiag([[mu]], [[sigma]],
                                         validate_args=True)
      self.assertFalse(tensor_util.constant_value(mvn.is_scalar_event))
      self.assertFalse(tensor_util.constant_value(mvn.is_scalar_batch))

      # We now test every codepath within the underlying is_scalar_helper
