mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-01 14:10:30 +00:00
Fix roundtrip test for ArrayConversion (#1397)
This commit is contained in:
@@ -55,7 +55,8 @@ def xp_data_equivalence(data_1, data_2) -> bool:
|
||||
xp_data_equivalence(o_1, o_2) for o_1, o_2 in zip(data_1, data_2)
|
||||
)
|
||||
elif is_array_api_obj(data_1):
|
||||
return array_api_extra.isclose(data_1, data_2, atol=0.00001).all()
|
||||
xp = array_namespace(data_1)
|
||||
return xp.all(array_api_extra.isclose(data_1, data_2, atol=0.00001))
|
||||
else:
|
||||
return data_1 == data_2
|
||||
else:
|
||||
|
Reference in New Issue
Block a user