Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ d6b447cab8c40aa47dc675a0f4349ae254e8b3ce
d8966d848af75751823e825eb76c5bbff58f5c07
4902d468c9606836b26b393379df4f49208ea847
1fd0ce6759be32be38bbfab32e83d157a82dfe25
406488494019fb199474fea7f1694e9f0d0347bc
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ repos:
args: [--no-pycodestyle, --max-line-length=88]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 02609a0003fd4903bd7f43852e5dfc82242a96db # frozen: v0.4.9
rev: 1dc9eb131c2ea4816c708e4d85820d2cc8542683 # frozen: v0.5.0
hooks:
- id: ruff
args: ["--fix", "--show-fixes", "--exit-non-zero-on-fix"]
Expand Down
8 changes: 4 additions & 4 deletions advanced/scipy_sparse/examples/lobpcg_sakurai.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ def sakurai(n):
)
data.append(time.clock() - tt)
print("Results by LOBPCG for n=" + str(n))
print("")
print()
print(eigs)
print("")
print()
print("Exact eigenvalues")
print("")
print()
print(w_ex[:m])
print("")
print()
print("Elapsed time", data[0])
plt.loglog(np.arange(1, n + 1), w_ex, "b.")
plt.xlabel(r"Number $i$")
Expand Down
2 changes: 1 addition & 1 deletion intro/scipy/examples/solutions/plot_image_blur.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
# First a 1-D Gaussian
t = np.linspace(-10, 10, 30)
bump = np.exp(-0.1 * t**2)
bump /= np.trapz(bump) # normalize the integral to 1
bump /= np.trapezoid(bump) # normalize the integral to 1

# make a 2-D kernel out of it
kernel = bump[:, np.newaxis] * bump[np.newaxis, :]
Expand Down