From 23699a5cf51b652caf48891f146a4f856423a3d1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 23:18:57 +0530 Subject: [PATCH] chore: update pre-commit hooks (#638) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.6.2 → v0.6.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.2...v0.6.3) --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- examples/tanh.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8effc3d1..40b6712c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,7 +17,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.6.2" + rev: "v0.6.3" hooks: - id: ruff args: ["--fix", "--show-fixes"] diff --git a/examples/tanh.py b/examples/tanh.py index 3d984994..fb5a5757 100644 --- a/examples/tanh.py +++ b/examples/tanh.py @@ -26,13 +26,13 @@ def tanh(x): ### Plotting plt.figure(figsize=(12, 8)) x = np.linspace(-7, 7, 700) -plt.plot(x, tanh(x), label='tanh(x)') +plt.plot(x, tanh(x), label="tanh(x)") plt.plot(x, egrad(tanh)(x), label="1st derivative") plt.plot(x, egrad(egrad(tanh))(x), label="2nd derivative") plt.plot(x, egrad(egrad(egrad(tanh)))(x), label="3rd derivative") plt.plot(x, egrad(egrad(egrad(egrad(tanh))))(x), label="4th derivative") -plt.xlabel('x') -plt.ylabel('y') +plt.xlabel("x") +plt.ylabel("y") plt.ylim(-5, 5) plt.yticks(np.arange(-5, 6, 1)) plt.legend()