File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010from uncertaintyx .b .jax import b_basis
1111from uncertaintyx .b .jax import b_poly
1212from uncertaintyx .b .jax import b_poly_grid
13+ from uncertaintyx .b .jax import b_poly_point
1314from uncertaintyx .b .jax import b_poly_points
1415
1516
@@ -201,6 +202,16 @@ class BPolyPointsTest(unittest.TestCase):
201202 against values precalculated with Mathematica.
202203 """
203204
205+ def test_b_poly_point (self ):
206+ k = (4 , 3 , 2 )
207+ d = tuple ([k_ + 1 for k_ in k ])
208+ b = jnp .arange (jnp .prod (jnp .asarray (d ))).reshape (d ) + 1.0
209+ x = jnp .asarray ([0.2718 , 0.5772 , 0.3141 ])
210+ y = b_poly_point (b , x )
211+ precalculated = 19.8694
212+ self .assertEqual ((), y .shape )
213+ self .assertTrue (jnp .allclose (y , precalculated ))
214+
204215 def test_b_poly_points (self ):
205216 k = (4 , 3 , 2 )
206217 d = tuple ([k_ + 1 for k_ in k ])
You can’t perform that action at this time.
0 commit comments