Skip to content

Commit

Permalink
Finished reStructuring of code
Browse files Browse the repository at this point in the history
  • Loading branch information
mcuntz committed Feb 25, 2024
1 parent 3c20cf9 commit 5c50e20
Show file tree
Hide file tree
Showing 9 changed files with 1,242 additions and 1,288 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Changelog
All notable changes after its initial development up to January 2020
(v0.2) are documented in this file.

v4.0 (??? 2024)
v4.0 (Feb 2024)
* Moved all Markdown files to reStructuredText.
* Moved documentation to sphinxbook.
* Moved documentation to Github pages.
Expand Down
2 changes: 1 addition & 1 deletion docs/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: c9609f653c1bb154fed1e5e56d75a62e
config: b75f88a65e744a9dc122a434fa2219c9
tags: 645f666f9bcd5a90fca523b33c5a78b7
8 changes: 4 additions & 4 deletions docs/html/_sources/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ parameters :math:`a` and :math:`b` to the Ishigami-Homma function.
def ishigami(x, a, b):
return np.sin(x[0]) + a * np.sin(x[1])**2 + b * x[2]**4 * np.sin(x[0])
def call_func_ab(func, a, b, x):
def call_ishigami(func, a, b, x):
return func(x, a, b)
# Partialise function with fixed parameters
a = 0.5
b = 2.0
func = partial(call_func_ab, ishigami, a, b)
func = partial(call_ishigami, ishigami, a, b)
npars = 3
# lower boundaries
Expand All @@ -117,9 +117,9 @@ parameters :math:`a` and :math:`b` to the Ishigami-Homma function.
out = eee(func, lb, ub, ntfirst=10)
Figuratively speaking, :py:func:`~functools.partial` passes `a` and
`b` to the function `call_func_ab` already during definition so that
`b` to the function `call_ishigami` already during definition so that
``eee`` can then simply call it as `func(x)`, where `x` is passed to
`call_func_ab` then as well.
`call_ishigami` then as well.


Function wrappers
Expand Down
Loading

0 comments on commit 5c50e20

Please sign in to comment.