Support float32 precision for mjtNum in Python bindings.

PiperOrigin-RevId: 922959317
Change-Id: I384b3bdeabdc4d3f66c71cae41dabfaf51387be7
This commit is contained in:
Yuval Tassa
2026-05-28 13:56:09 -07:00
committed by Copybara-Service
parent b612d352d4
commit df6942eb39
6 changed files with 119 additions and 104 deletions
+3
View File
@@ -59,6 +59,9 @@ from mujoco._functions import *
from mujoco._specs import *
from mujoco._structs import *
import numpy as np
MJTNUM_DTYPE = np.float32 if MJTNUM_BYTES == 4 else np.float64 # pylint: disable=undefined-variable
try:
from mujoco._render import * # pytype: disable=import-error
except ImportError: