Skip to content

Commit

Permalink
pyGIMLi(emg3d) working
Browse files Browse the repository at this point in the history
  • Loading branch information
prisae committed Jun 21, 2024
1 parent 5dcfc08 commit 5ff2350
Show file tree
Hide file tree
Showing 7 changed files with 161 additions and 177 deletions.
2 changes: 1 addition & 1 deletion docs/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ API reference
surveys
time
utils
inversion
inversion/index


.. grid:: 1
Expand Down
8 changes: 8 additions & 0 deletions docs/api/inversion/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Inversion
#########

.. toctree::
:maxdepth: 2
:hidden:

pygimli
4 changes: 2 additions & 2 deletions docs/api/inversion.rst → docs/api/inversion/pygimli.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Inversion
=========
pyGIMLi(emg3d)
==============

.. automodapi:: emg3d.inversion.pygimli
:no-inheritance-diagram:
Expand Down
1 change: 1 addition & 0 deletions docs/api/utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ Utils
.. automodapi:: emg3d.utils
:no-inheritance-diagram:
:no-heading:
:skip: EMArray
5 changes: 5 additions & 0 deletions emg3d/_multiprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def process_map(fn, *iterables, max_workers, **kwargs):
execution.
"""
process_map.count += 1

# Parallel
if max_workers > 1 and tqdm is None:
Expand All @@ -64,6 +65,10 @@ def process_map(fn, *iterables, max_workers, **kwargs):
iterable=map(fn, *iterables), total=len(iterables[0]), **kwargs))


# Counter for processing map (used, e.g., for inversions).
process_map.count = 0


def solve(inp):
"""Thin wrapper of `solve` or `solve_source` for a `process_map`.
Expand Down
Loading

0 comments on commit 5ff2350

Please sign in to comment.