Class GymTupleAttribute
Makes a partial positional record a Python tuple (DR-13): the generator writes implicit conversions to and from
object?[] (Gym.NET's tuple, what a Tuple space samples), Python's == member by member,
and Python's repr, (1, 2). [GymTuple] public partial record BlackjackObservation(NDArray PlayerSum,
NDArray DealerCard, NDArray UsableAce); reads a Blackjack observation by name.
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
public sealed class GymTupleAttribute : Attribute
- Inheritance
-
GymTupleAttribute
- Inherited Members
- Extension Methods
Remarks
The conversions share the members' values (arrays are not copied). Equality is Python's, not the record's:
arrays compare by value, so the hash is the member count, the only thing equal records always share. The record
also implements ITuple, so code that holds it as an
object (a Tuple space's membership, the env checker, PyEquality) reads it as the
tuple it stands for.