Use `np.can_cast` to check that bounds can be cast to the target dtype
Use `np.can_cast` to check that bounds can be cast to the target dtype

This correctly handles infinite bounds, which are allowed by `dm_env.specs.BoundedArray`.

PiperOrigin-RevId: 339710609
Change-Id: Idef3eced12407ba770b3de83b351ff2eeb272d00

deepmind/dm_env_rpc