Skip to content

Commit

Permalink
Merge pull request #80 from epignatelli/fix-keycorridor
Browse files Browse the repository at this point in the history
fix: `position_in_room` now creates array properly`
  • Loading branch information
epignatelli authored Jul 4, 2024
2 parents 4cf50cc + 6975d11 commit 9792102
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion navix/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
# under the License.


__version__ = "0.6.13"
__version__ = "0.6.14"
__version_info__ = tuple(int(i) for i in __version__.split(".") if i.isdigit())
2 changes: 1 addition & 1 deletion navix/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ def position_in_room(self, row: Array, col: Array, *, key: Array) -> Array:
k1, k2 = jax.random.split(key)
local_row = jax.random.randint(k1, (), minval=1, maxval=self.room_size[0])
local_col = jax.random.randint(k2, (), minval=1, maxval=self.room_size[1])
return jnp.asarray(local_row, local_col) + self.room_starts[row, col]
return jnp.asarray([local_row, local_col]) + self.room_starts[row, col]

@partial(jax.jit, static_argnums=3)
def position_on_border(
Expand Down

0 comments on commit 9792102

Please sign in to comment.