Table of Contents

Class ReshapeObservationVector<TObs, TAct>

Namespace
Gym.Wrappers.Vector
Assembly
Gym.dll

Reshapes each sub-env's observation (Gymnasium's vector ReshapeObservation).

[PyName("ReshapeObservation")]
public class ReshapeObservationVector<TObs, TAct> : VectorizeTransformObservation<NDArray, TObs, TAct>, IVectorEnv, IDisposable

Type Parameters

TObs

The env's batched observation type.

TAct

The batched action type, passed through.

Inheritance
VectorWrapper<NDArray, TAct, TObs, TAct>
ReshapeObservationVector<TObs, TAct>
Implements
Inherited Members
Extension Methods

Remarks

Constructors

ReshapeObservationVector(VectorEnv<TObs, TAct>, long[])

Wraps env.

public ReshapeObservationVector(VectorEnv<TObs, TAct> env, long[] shape)

Parameters

env VectorEnv<TObs, TAct>

The vector env, whose single space is a Box.

shape long[]

The new single shape.

Exceptions

TypeError

Thrown for a space that is not a Box.

ValueError

Thrown for a shape of another size, with Gymnasium's message.