Skip to content

Commit 5c994de

Browse files
hawkinspcopybara-github
authored andcommitted
[JAX] Replace jnp.clip(..., a_min=..., a_max=...) with jnp.clip(..., min=..., max=...).
a_min and a_max are deprecated parameter names to jax.numpy.clip. PiperOrigin-RevId: 891779811 Change-Id: I008ae603a3661424f221f66f6bd3f32587e66d2c
1 parent 303d89d commit 5c994de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

brax/fluid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def force(
7070
diag_inertia = jax.vmap(jp.diag)(inertia)
7171
diag_inertia_v = jp.repeat(diag_inertia, 3, axis=-2).reshape((-1, 3, 3))
7272
diag_inertia_v *= jp.ones((3, 3)) - 2 * jp.eye(3)
73-
box = 6.0 * jp.clip(jp.sum(diag_inertia_v, axis=-1), a_min=1e-12)
73+
box = 6.0 * jp.clip(jp.sum(diag_inertia_v, axis=-1), min=1e-12)
7474
box = jp.sqrt(box / mass[:, None])
7575

7676
frc = _box_viscosity(box, xd_i, sys.viscosity)

0 commit comments

Comments
 (0)