Skip to content

Commit

Permalink
Merge pull request #9 from boettiger-lab/nice-little-things
Browse files Browse the repository at this point in the history
np.inf discontinued
  • Loading branch information
nicolalove committed Jul 5, 2024
2 parents 124f7e2 + b78766f commit d8be324
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/rl4caribou/envs/caribou.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def state_units(self, pop):
def population_units(self):
pop = (self.state + 1) * self.bound / 2
return np.clip(
pop, np.repeat(0, pop.__len__()), np.repeat(np.Inf, pop.__len__())
pop, np.repeat(0, len(pop)), np.repeat(None, len(pop))
)


Expand Down
2 changes: 1 addition & 1 deletion src/rl4caribou/envs/caribou_ode.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def state_units(self, pop):
def population_units(self):
pop = (self.state + 1) * self.bound / 2
return np.clip(
pop, np.repeat(0, pop.__len__()), np.repeat(np.Inf, pop.__len__())
pop, np.repeat(0, len(pop)), np.repeat(None, len(pop))
)


Expand Down

0 comments on commit d8be324

Please sign in to comment.