Class VectorizeModes
- Namespace
- Gym.Envs.Registration
- Assembly
- Gym.dll
Python's view of VectorizeMode's members (DR-84): their .name, .value, str and
repr, and Gymnasium's VectorizeMode(value) call. A C# enum cannot carry members of its own, so they
live here, beside it.
public static class VectorizeModes
- Inheritance
-
VectorizeModes
- Inherited Members
Remarks
Reference: gymnasium/envs/registration.py.
Properties
All
Every member, in Gymnasium's order: ASYNC, SYNC, VECTOR_ENTRY_POINT, the order make_vec's error lists them in.
public static IReadOnlyList<VectorizeMode> All { get; }
Property Value
Remarks
A shared, read-only list.
Methods
Name(VectorizeMode)
Python's .name: ASYNC, SYNC or VECTOR_ENTRY_POINT.
public static string Name(VectorizeMode mode)
Parameters
modeVectorizeModeThe member.
Returns
- string
The name.
Exceptions
- ArgumentOutOfRangeException
Thrown for a value the enum does not declare.
Of(string?)
Python's VectorizeMode(value): the member with that value ("sync"), never its name ("SYNC").
public static VectorizeMode Of(string? value)
Parameters
valuestringThe value.
Returns
- VectorizeMode
The member.
Exceptions
- ValueError
Thrown for any other value:
'x' is not a valid VectorizeMode.
Repr(VectorizeMode)
Python's repr(mode): <VectorizeMode.SYNC: 'sync'>.
public static string Repr(VectorizeMode mode)
Parameters
modeVectorizeModeThe member.
Returns
- string
The text.
Exceptions
- ArgumentOutOfRangeException
Thrown for a value the enum does not declare.
Str(VectorizeMode)
Python's str(mode): VectorizeMode.SYNC.
public static string Str(VectorizeMode mode)
Parameters
modeVectorizeModeThe member.
Returns
- string
The text.
Exceptions
- ArgumentOutOfRangeException
Thrown for a value the enum does not declare.
Value(VectorizeMode)
Python's .value: "async", "sync" or "vector_entry_point", what a MakeVec spec records.
public static string Value(VectorizeMode mode)
Parameters
modeVectorizeModeThe member.
Returns
- string
The value.
Exceptions
- ArgumentOutOfRangeException
Thrown for a value the enum does not declare.