Skip to content

Commit c9d5a8f

Browse files
Joshua V. Dillontensorflower-gardener
authored andcommitted
Fix shape_test which complains on non-integer slice.
Change: 147399432
1 parent 6287fa8 commit c9d5a8f

File tree

1 file changed

+1
-1
lines changed
  • tensorflow/contrib/distributions/python/kernel_tests

1 file changed

+1
-1
lines changed

tensorflow/contrib/distributions/python/kernel_tests/shape_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def _random_sample(self, sample_shape, dtype=np.float32):
5050
return self._rng.random_sample(sample_shape).astype(dtype)
5151

5252
def _get_expected(self, x, batch_ndims, event_ndims, expand_batch_dim):
53-
n = x.ndim - batch_ndims - event_ndims
53+
n = int(x.ndim - batch_ndims - event_ndims)
5454
sample_shape = x.shape[0:n]
5555
y = np.reshape(x, np.concatenate([[-1], x.shape[n:]], 0))
5656
y = np.transpose(y, np.roll(np.arange(y.ndim), -1))

0 commit comments

Comments
 (0)