mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-18 04:49:12 +00:00
Added singledispatch utility to vector.utils & changed order of space argument. (#2536)
* Fixed ordering of space. Added singledispatch utility. * Added singledispatch utility to vector.utils & changed order of space argument * Fixed Error from _BaseGymSpaces * Minor adjustment for Discrete Spaces * Fixed Tests/ to reflect changes * Fixed precommit error - custom namespaces * Concrete Implementations start with _
This commit is contained in:
@@ -108,7 +108,7 @@ def test_write_to_shared_memory(space):
|
||||
raise TypeError(f"Got unknown type `{type(lhs)}`.")
|
||||
|
||||
def write(i, shared_memory, sample):
|
||||
write_to_shared_memory(i, sample, shared_memory, space)
|
||||
write_to_shared_memory(space, i, sample, shared_memory)
|
||||
|
||||
shared_memory_n8 = create_shared_memory(space, n=8)
|
||||
samples = [space.sample() for _ in range(8)]
|
||||
@@ -155,10 +155,10 @@ def test_read_from_shared_memory(space):
|
||||
raise TypeError(f"Got unknown type `{type(space)}`")
|
||||
|
||||
def write(i, shared_memory, sample):
|
||||
write_to_shared_memory(i, sample, shared_memory, space)
|
||||
write_to_shared_memory(space, i, sample, shared_memory)
|
||||
|
||||
shared_memory_n8 = create_shared_memory(space, n=8)
|
||||
memory_view_n8 = read_from_shared_memory(shared_memory_n8, space, n=8)
|
||||
memory_view_n8 = read_from_shared_memory(space, shared_memory_n8, n=8)
|
||||
samples = [space.sample() for _ in range(8)]
|
||||
|
||||
processes = [
|
||||
|
Reference in New Issue
Block a user