Skip to content

Commit

Permalink
TFTS: axis=<list> -> axis=<tuple> in numpy.squeeze
Browse files Browse the repository at this point in the history
Apparently lists and tuples behave differently in some numpy versions.

PiperOrigin-RevId: 206616759
  • Loading branch information
allenlavoie authored and tensorflower-gardener committed Jul 30, 2018
1 parent b3df17e commit 7bab62b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tensorflow/contrib/timeseries/examples/multivariate.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ def multivariate_train_and_sample(
session=session, steps=1))
next_sample = numpy.random.multivariate_normal(
# Squeeze out the batch and series length dimensions (both 1).
mean=numpy.squeeze(current_prediction["mean"], axis=[0, 1]),
cov=numpy.squeeze(current_prediction["covariance"], axis=[0, 1]))
mean=numpy.squeeze(current_prediction["mean"], axis=(0, 1)),
cov=numpy.squeeze(current_prediction["covariance"], axis=(0, 1)))
# Update model state so that future predictions are conditional on the
# value we just sampled.
filtering_features = {
Expand Down

0 comments on commit 7bab62b

Please sign in to comment.