Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl committed Apr 16, 2024
1 parent 4c0843f commit a91d5f8
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions swig/amici.i
Original file line number Diff line number Diff line change
Expand Up @@ -364,20 +364,13 @@ if TYPE_CHECKING:

%pythoncode %{


__all__ = [
x
for x in dir(sys.modules[__name__])
if not x.startswith('_')
and x not in {"np", "sys", "os", "numpy", "IntEnum", "enum", "pi", "TYPE_CHECKING", "Iterable", "Sequence"}
]

AmiciModel = Union['Model', 'ModelPtr']
AmiciSolver = Union['Solver', 'SolverPtr']
AmiciExpData = Union['ExpData', 'ExpDataPtr']
AmiciReturnData = Union['ReturnData', 'ReturnDataPtr']
AmiciExpDataVector = Union['ExpDataPtrVector', Sequence['AmiciExpData']]


def _get_ptr(
obj: AmiciModel | AmiciExpData | AmiciSolver | AmiciReturnData,
) -> Model | ExpData | Solver | ReturnData:
Expand All @@ -402,4 +395,12 @@ def _get_ptr(
return obj.get()
return obj


__all__ = [
x
for x in dir(sys.modules[__name__])
if not x.startswith('_')
and x not in {"np", "sys", "os", "numpy", "IntEnum", "enum", "pi", "TYPE_CHECKING", "Iterable", "Sequence"}
]

%}

0 comments on commit a91d5f8

Please sign in to comment.