# Path: gym3/types_np.py
# def concat(xs: Sequence[Any], axis: int = 0) -> Any:
# def stack(xs: Sequence[Any], axis: int = 0) -> Any:
# def split(x: Any, sections: Sequence[int]) -> Sequence[Any]:
# def dtype(tt: TensorType) -> np.dtype:
# def zeros(vt: ValType, bshape: Tuple) -> Any:
# def _sample_tensor(
#     tt: TensorType, bshape: Tuple, rng: Optional[np.random.RandomState] = None
# ) -> np.ndarray:
# def sample(
#     vt: ValType, bshape: Tuple, rng: Optional[np.random.RandomState] = None
# ) -> Any:


import gym
import numpy as np
import pytest
import gym3
from baselines.common.vec_env import DummyVecEnv
from gym3.types_np import multimap, sample, zeros
        ob, rew, done, _info = e.step(
            np.stack([e.action_space.sample() for _ in range(e.num_envs)])
        )
        print(ob.shape, rew.shape, done.shape)


ENV_IDS = ["CartPole-v1", "Pendulum-v0"]


@pytest.mark.parametrize("env_id", ENV_IDS)
def test_from_gym_env(env_id):
    gym_env = gym.make(env_id)
    e = gym3.FromGymEnv(gym_env)
    gym3_rollout(e)
    obs = e.callmethod("seed", [0])
    assert len(obs) == 1


@pytest.mark.parametrize("env_id", ENV_IDS)
def test_from_baselines_env(env_id):
    env_fn = lambda: gym.make(env_id)
    e = gym3.FromBaselinesVecEnv(DummyVecEnv([env_fn]))
    gym3_rollout(e)


def test_from_procgen_env():
    e = gym3.testing.AssertSpacesWrapper(gym3.testing.FixedSequenceEnv(num=3))
    gym3_rollout(e)



# Path: gym3/types_np.py
# def concat(xs: Sequence[Any], axis: int = 0) -> Any:
# def stack(xs: Sequence[Any], axis: int = 0) -> Any:
# def split(x: Any, sections: Sequence[int]) -> Sequence[Any]:
# def dtype(tt: TensorType) -> np.dtype:
# def zeros(vt: ValType, bshape: Tuple) -> Any:
# def _sample_tensor(
#     tt: TensorType, bshape: Tuple, rng: Optional[np.random.RandomState] = None
# ) -> np.ndarray:
# def sample(
#     vt: ValType, bshape: Tuple, rng: Optional[np.random.RandomState] = None
# ) -> Any:


# Path: gym3/interop_test.py
import gym
import numpy as np
import pytest
import gym3
from baselines.common.vec_env import DummyVecEnv
from gym3.types_np import multimap, sample, zeros

        ob, rew, done, _info = e.step(
            np.stack([e.action_space.sample() for _ in range(e.num_envs)])
        )
        print(ob.shape, rew.shape, done.shape)


ENV_IDS = ["CartPole-v1", "Pendulum-v0"]


@pytest.mark.parametrize("env_id", ENV_IDS)
def test_from_gym_env(env_id):
    gym_env = gym.make(env_id)
    e = gym3.FromGymEnv(gym_env)
    gym3_rollout(e)
    obs = e.callmethod("seed", [0])
    assert len(obs) == 1


@pytest.mark.parametrize("env_id", ENV_IDS)
def test_from_baselines_env(env_id):
    env_fn = lambda: gym.make(env_id)
    e = gym3.FromBaselinesVecEnv(DummyVecEnv([env_fn]))
    gym3_rollout(e)


def test_from_procgen_env():
    e = gym3.testing.AssertSpacesWrapper(gym3.testing.FixedSequenceEnv(num=3))
    gym3_rollout(e)



@pytest.mark.parametrize("env_id", ENV_IDS)