Tuple
lerax.space.Tuple
Bases: AbstractSpace[tuple[Any, ...], None]
A cartesian product of spaces.
Attributes:
| Name | Type | Description |
|---|---|---|
spaces |
tuple[AbstractSpace, ...]
|
A tuple of the component spaces. |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
spaces
|
tuple[AbstractSpace, ...]
|
A tuple of the component spaces. |
required |
sample
Returns a random sample from the space.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
Key[Array, '']
|
A JAX PRNGKey[Array, ""]. |
required |
Returns:
| Type | Description |
|---|---|
tuple[Any, ...]
|
A tuple containing a random sample from each component space. |
contains
Returns whether the given value is contained in the space.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
Any
|
The value to check. |
required |
Returns:
| Type | Description |
|---|---|
Bool[Array, '']
|
Whether the value is contained in the space. |