Skip to content

Commit

Permalink
pandas context
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaswmorris committed Jul 19, 2023
1 parent 18e3b3f commit 82db973
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions bloptools/bayesian/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,11 +589,12 @@ def targets(self):

@property
def feasible_for_all_tasks(self):
with pd.option_context("mode.use_inf_as_null", True):
feasible = ~self.targets.isna().any(axis=1)
for task in self.tasks:
if task.min is not None:
feasible &= self.targets.loc[:, task.name].values > task.transform(task.min)
# TODO: make this more robust
# with pd.option_context("mode.use_inf_as_null", True):
feasible = ~self.targets.isna().any(axis=1)
for task in self.tasks:
if task.min is not None:
feasible &= self.targets.loc[:, task.name].values > task.transform(task.min)
return feasible

# @property
Expand Down

0 comments on commit 82db973

Please sign in to comment.