def testWhileLoopBodyConstsBatched(self):

    def fun(x, y):
        return lax.while_loop((lambda x: (x < 3)), (lambda x: (x + y)), x)
    ans = api.vmap(fun, in_axes=(None, 0))(0, jnp.array([2, 3]))
    expected = np.array([4, 3])
    self.assertAllClose(ans, expected, check_dtypes=False)
def testWhileLoopBodyConstsBatched(self):

    def fun(x, y):
        return lax.while_loop((lambda x: (x < 3)), (lambda x: (x + y)), x)
    ans = api.vmap(fun, in_axes=(None, 0))(0, jnp.array([2, 3]))
    expected = np.array([4, 3])
    self.assertAllClose(ans, expected, check_dtypes=False)