Skip to content

Commit

Permalink
Fix type errors in Cauchy distribution test with JAX backend.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 285113109
  • Loading branch information
jburnim authored and tensorflower-gardener committed Dec 12, 2019
1 parent 2922d86 commit 3f240c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tensorflow_probability/python/distributions/cauchy_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def testParamStaticShapes(self):

def testCauchyLogPDF(self):
batch_size = 6
loc = tf.constant([3.0] * batch_size)
loc = tf.constant([3.0] * batch_size, dtype=tf.float32)
scale = tf.constant([np.sqrt(10.0, dtype=np.float32)] * batch_size)
x = np.array([-2.5, 2.5, 4.0, 0.0, -1.0, 2.0], dtype=np.float32)
cauchy = tfd.Cauchy(loc=loc, scale=scale, validate_args=True)
Expand Down Expand Up @@ -104,7 +104,7 @@ def testCauchyLogPDF(self):

def testCauchyLogPDFMultidimensional(self):
batch_size = 6
loc = tf.constant([[3.0, -3.0]] * batch_size)
loc = tf.constant([[3.0, -3.0]] * batch_size, dtype=tf.float32)
scale = tf.constant([
[np.sqrt(10.0, dtype=np.float32),
np.sqrt(15.0, dtype=np.float32)]] * batch_size)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ NO_TESTS = ("joint_distribution", "vector_exponential_linear_operator", "vector_
TEST_FILENAMES = [filename + "_test" for filename in FILENAMES if filename not in NO_TESTS]

TAP_WHITELIST = ["{}_test".format(filename) for filename in (
"cauchy",
"deprecated_linalg",
"exponential",
"gamma_gamma",
Expand Down

0 comments on commit 3f240c5

Please sign in to comment.