Skip to content

Fix swapped MJX ray empty-return types - #3506

Open
sylvesterkaczmarek wants to merge 1 commit into
google-deepmind:mainfrom
sylvesterkaczmarek:fix/mjx-ray-empty-return-types
Open

Fix swapped MJX ray empty-return types#3506
sylvesterkaczmarek wants to merge 1 commit into
google-deepmind:mainfrom
sylvesterkaczmarek:fix/mjx-ray-empty-return-types

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Summary

When the ray filter excludes every geom, mjx.ray returns an integer in the distance slot and a float in the geom-id slot, contrary to its documented (distance, geom id) contract and its normal return path.

This change fixes the sentinel order, aligns the docstring, and adds a regression test asserting that the early-return dtypes match the normal path.

Context

Closed, unmerged PR #3326 identified the same bug. Current main still contains it and no active replacement was found.

Validation

  • Based on current main
  • Final diff changes only ray.py and ray_test.py
  • Focused runtime validation was not run in this environment

@sylvesterkaczmarek

Copy link
Copy Markdown
Author

@btaba thanks for taking the time to review and approve this. Much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants