Skip to content

Commit

Permalink
typos
Browse files Browse the repository at this point in the history
  • Loading branch information
TomGeorge1234 committed Mar 16, 2023
1 parent c25df0d commit b45c3d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ratinabox/Environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def sample_positions(self, n=10, method="uniform_jitter"):
positions = np.vstack((positions, positions_remaining))

if (self.is_rectangular) or (self.has_holes is True):
# in this case, the positions you have sampled within the extent of the environment may not actually fall within it's legal area (i.e. they could be outside the polygon boundary or inside a hole). Brute for this by randomly resampling these oints until all fall within the env.
# in this case, the positions you have sampled within the extent of the environment may not actually fall within it's legal area (i.e. they could be outside the polygon boundary or inside a hole). Brute force this by randomly resampling these points until all fall within the env.
for (i, pos) in enumerate(positions):
if self.check_if_position_is_in_environment(pos) == False:
pos = self.sample_positions(n=1, method="random").reshape(
Expand Down

0 comments on commit b45c3d3

Please sign in to comment.