Skip to content

Commit 34db28a

Browse files
committed
Fix vmap arg range
1 parent c7e93eb commit 34db28a

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

crazyflow/sim/sim.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ def build_mjx_model(self, spec: mujoco.MjSpec) -> tuple[Any, Any, Model, Data]:
237237
mj_data = mujoco.MjData(mj_model)
238238
mjx_model = mjx.put_model(mj_model, device=self.device)
239239
mjx_data = mjx.put_data(mj_model, mj_data, device=self.device)
240-
mjx_data = jax.vmap(lambda _: mjx_data)(range(self.n_worlds))
240+
mjx_data = jax.vmap(lambda _: mjx_data)(jnp.arange(self.n_worlds))
241241
return mj_model, mj_data, mjx_model, mjx_data
242242

243243
def build_step_fn(self):

pixi.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

submodules/drone-controllers

submodules/drone-models

0 commit comments

Comments
 (0)