Skip to content

Commit

Permalink
Merge pull request tensorflow#782 from kovak1:patch-2
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 294302383
  • Loading branch information
tensorflower-gardener committed Feb 10, 2020
2 parents ec4f468 + 1bee1b2 commit f09442e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tensorflow_probability/python/math/interpolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,11 +551,12 @@ def batch_interp_regular_nd_grid(x,
Interpolate a function of one variable.
```python
y_ref = tf.exp(tf.linspace(start=0., stop=10., 20))
y_ref = tf.exp(tf.linspace(start=0., stop=10., num=20))
tfp.math.batch_interp_regular_nd_grid(
# x.shape = [3, 1], x_ref_min/max.shape = [1]. Trailing `1` for `1-D`.
x=[[6.0], [0.5], [3.3]], x_ref_min=[0.], x_ref_max=[1.], y_ref=y_ref)
x=[[6.0], [0.5], [3.3]], x_ref_min=[0.], x_ref_max=[10.], y_ref=y_ref,
axis=0)
==> approx [exp(6.0), exp(0.5), exp(3.3)]
```
Expand Down

0 comments on commit f09442e

Please sign in to comment.