
    hp                    h    S r SSKJr  SSKJr  SSKrSSKJr  SSK	J
r
  SSKJr  S/r " S S\5      rg)	z4Vector wrapper for converting between NumPy and Jax.    )annotationsN)DependencyNotInstalled)	VectorEnv)ArrayConversion
JaxToNumpyc                  0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )r      a;  Wraps a jax vector environment so that it can be interacted with through numpy arrays.

Notes:
    A vectorized version of :class:`gymnasium.wrappers.JaxToNumpy`

Actions must be provided as numpy arrays and observations, rewards, terminations and truncations will be returned as numpy arrays.

Example:
    >>> import gymnasium as gym                                         # doctest: +SKIP
    >>> envs = gym.make_vec("JaxEnv-vx", 3)                             # doctest: +SKIP
    >>> envs = JaxToNumpy(envs)                                         # doctest: +SKIP
c                X   > [         c  [        S5      e[        TU ]  U[         [        S9  g)zzWraps an environment such that the input and outputs are numpy arrays.

Args:
    env: the vector jax environment to wrap
Nz8Jax is not installed, run `pip install "gymnasium[jax]"`)env_xp	target_xp)jnpr   super__init__np)selfenv	__class__s     `/home/james-whalen/.local/lib/python3.13/site-packages/gymnasium/wrappers/vector/jax_to_numpy.pyr   JaxToNumpy.__init__   s0     ;(J  	SB7     )r   r   )__name__
__module____qualname____firstlineno____doc__r   __static_attributes____classcell__)r   s   @r   r   r      s    
8 
8r   )r   
__future__r   	jax.numpynumpyr   r   gymnasium.errorr   gymnasium.vectorr   *gymnasium.wrappers.vector.array_conversionr   __all__r   r   r   r   <module>r&      s/    : "   2 & F .8 8r   