Class ReshapeObservationVector<TObs, TAct>
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
TObsThe env's batched observation type.
TActThe batched action type, passed through.
- Inheritance
-
VectorWrapper<NDArray, TAct, TObs, TAct>VectorObservationWrapper<NDArray, TObs, TAct>VectorizeTransformObservation<NDArray, 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
envVectorEnv<TObs, TAct>The vector env, whose single space is a
Box.shapelong[]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.