Skip to content

Commit

Permalink
apply
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl committed Oct 8, 2024
1 parent 071bfc4 commit c947ad6
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
11 changes: 7 additions & 4 deletions doc/conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import os
import sys

import mock
from unittest import mock

# Configuration file for the Sphinx documentation builder.
#
Expand Down Expand Up @@ -61,8 +60,12 @@


autodoc_mock_imports = [
"amici", "amici.amici", "amici.petab", "amici.petab.simulations",
"amici.petab.parameter_mapping", "amici.petab.conditions"
"amici",
"amici.amici",
"amici.petab",
"amici.petab.simulations",
"amici.petab.parameter_mapping",
"amici.petab.conditions",
]
for mod_name in autodoc_mock_imports:
sys.modules[mod_name] = mock.MagicMock()
Expand Down
1 change: 0 additions & 1 deletion examples/derivative.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
],
"source": [
"import numpy as np\n",
"import pandas as pd\n",
"from scipy.optimize import rosen, rosen_der\n",
"\n",
"from fiddy import MethodId, get_derivative\n",
Expand Down
1 change: 1 addition & 0 deletions fiddy/derivative.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class Derivative:
success:
Whether the derivative was successfully computed.
"""

hide_columns = [
"pending_computers",
"computers",
Expand Down
2 changes: 1 addition & 1 deletion fiddy/extensions/amici/amici.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import amici.petab.simulations
import numpy as np
import petab.v1 as petab
from amici.petab.conditions import create_edatas
from amici.petab.parameter_mapping import create_parameter_mapping
from amici.petab.simulations import LLH, SLLH
from amici.petab.conditions import create_edatas
from petab.v1.C import LIN, LOG, LOG10

from ...constants import Type
Expand Down
6 changes: 3 additions & 3 deletions tests/test_derivative.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ def test_get_derivative_relative():
) # cardinal direction, simplifies to this, but usually need dot product

g_a = (f_a - f_0) / size
g_r = (f_r - f_0) / (
point * direction * size
).sum() # cardinal direction, simplifies to this, but usually need dot product
g_r = (
(f_r - f_0) / (point * direction * size).sum()
) # cardinal direction, simplifies to this, but usually need dot product

# Fiddy finite difference derivatives
kwargs = {
Expand Down

0 comments on commit c947ad6

Please sign in to comment.