Skip to content

Commit

Permalink
fixing inf issues
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskoenig committed Jan 31, 2025
1 parent 77ba1d7 commit 35f9bae
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
9 changes: 5 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ classifiers =
Intended Audience :: Science/Research
License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
Operating System :: OS Independent
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12

Programming Language :: Python :: Implementation :: CPython
Topic :: Scientific/Engineering
Topic :: Scientific/Engineering :: Bio-Informatics
Expand All @@ -49,8 +50,8 @@ zip_safe = True
python_requires = >=3.11
install_requires =
sbmlutils>=0.8.7
numpy>=1.26.4
libroadrunner>=2.7.0
numpy>=2.2
libroadrunner>=2.8.0
scipy>=1.12.0
pint>=0.23

Expand Down
5 changes: 4 additions & 1 deletion src/sbmlsim/fit/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,11 @@ def f_fitexp(

return fit_experiments


def filter_empty(fit_mapping_key: str, fit_mapping: FitMapping) -> bool:
"""Return all experiments/mappings."""
return True


def filter_outlier(fit_mapping_key: str, fit_mapping: FitMapping) -> bool:
"""Return non outlier experiments."""
return not fit_mapping.metadata.outlier
4 changes: 2 additions & 2 deletions src/sbmlsim/fit/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ def __init__(
self,
pid: str,
start_value: float = None,
lower_bound: float = -np.Inf,
upper_bound: float = np.Inf,
lower_bound: float = -np.inf,
upper_bound: float = np.inf,
unit: str = None,
):
"""Initialize FitParameter.
Expand Down
4 changes: 2 additions & 2 deletions src/sbmlsim/fit/optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ class RuntimeErrorOptimizeResult:
status: str = "-1"
success: bool = False
duration: float = -1.0
cost: float = np.Inf
optimality: float = np.Inf
cost: float = np.inf
optimality: float = np.inf


class OptimizationProblem(ObjectJSONEncoder):
Expand Down

0 comments on commit 35f9bae

Please sign in to comment.