diff --git a/docs/examples/poincare.ipynb b/docs/examples/poincare.ipynb index 818e420..751d663 100644 --- a/docs/examples/poincare.ipynb +++ b/docs/examples/poincare.ipynb @@ -5,8 +5,7 @@ "id": "e55d344d-fbf8-495b-a88d-db0c89d41d0e", "metadata": {}, "source": [ - "# How to create a poincare plot\n", - "\n" + "# How to create a poincare plot" ] }, { @@ -142,14 +141,6 @@ " plt.gca().set_aspect(1)" ] }, - { - "cell_type": "code", - "execution_count": null, - "id": "c5cf62fa-2a66-4e2f-ba33-6bf624fb6535", - "metadata": {}, - "outputs": [], - "source": [] - }, { "cell_type": "markdown", "id": "abb1860f-ffae-45bf-a1c5-52c32d50a91f", @@ -197,7 +188,7 @@ " else:\n", " print(f\"Found: {new}\")\n", " found.append(new)\n", - " except FixPointConvergenceError, OutOfDomainError:\n", + " except (FixPointConvergenceError, OutOfDomainError):\n", " # Not close to a fix point\n", " pass\n", " except IndexError:\n", @@ -212,7 +203,9 @@ "metadata": {}, "outputs": [], "source": [ - "found" + "plt.figure()\n", + "plt.scatter(pnc0[..., 0], pnc0[..., 1], s=0.1, color=\"black\")\n", + "plt.scatter(*np.array(found).T, s=1, color=\"red\")" ] } ], diff --git a/docs/examples/setup_plt.py b/docs/examples/setup_plt.py index b8c0521..ee52595 100644 --- a/docs/examples/setup_plt.py +++ b/docs/examples/setup_plt.py @@ -6,6 +6,6 @@ get_ipython().run_line_magic("matplotlib", "inline") # noqa: F821 figsize = 10.0 else: - get_ipython().run_line_magic("matplotlib", "notebook") # noqa: F821 + get_ipython().run_line_magic("matplotlib", "inline") # noqa: F821 figsize = 6.0 plt.rcParams["figure.figsize"] = [figsize, figsize] diff --git a/requirements.txt b/requirements.txt index 61eb168..e03c6cf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -25,3 +25,5 @@ sphinx-argparse-cli ; python_version > "3.6" nbsphinx >= 0.8.6 ipykernel ipywidgets + +tqdm diff --git a/setup.cfg b/setup.cfg index cbf783a..9683b84 100644 --- a/setup.cfg +++ b/setup.cfg @@ -58,6 +58,7 @@ docs = sphinx >= 1.4 sphinx-argparse-cli nbsphinx >= 0.8.6 + tqdm full = matplotlib>=3.4 @@ -67,6 +68,7 @@ full = sphinx-argparse-cli nbsphinx >= 0.8.6 numba + tqdm [build_sphinx] project = $metadata.name diff --git a/xemc3/core/flt_emc_like.py b/xemc3/core/flt_emc_like.py index b1f7e16..7ed5956 100644 --- a/xemc3/core/flt_emc_like.py +++ b/xemc3/core/flt_emc_like.py @@ -293,4 +293,4 @@ def trace4(self, pnts, num, ood=False): pnts = np.array(pnts) if len(pnts.shape) == 1: return trace4(pnts, self.meshes, num, ood=ood) - return np.array([trace4(p, self.meshes, num) for p in pnts]) + return np.array([trace4(p, self.meshes, num, ood=ood) for p in pnts])