Skip to content

Commit 4064884

Browse files
committed
Apply ruff fixes
1 parent eedb00f commit 4064884

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

advanced/scipy_sparse/examples/lobpcg_sakurai.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ def sakurai(n):
4949
)
5050
data.append(time.clock() - tt)
5151
print("Results by LOBPCG for n=" + str(n))
52-
print("")
52+
print()
5353
print(eigs)
54-
print("")
54+
print()
5555
print("Exact eigenvalues")
56-
print("")
56+
print()
5757
print(w_ex[:m])
58-
print("")
58+
print()
5959
print("Elapsed time", data[0])
6060
plt.loglog(np.arange(1, n + 1), w_ex, "b.")
6161
plt.xlabel(r"Number $i$")

intro/scipy/examples/solutions/plot_image_blur.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
# First a 1-D Gaussian
3232
t = np.linspace(-10, 10, 30)
3333
bump = np.exp(-0.1 * t**2)
34-
bump /= np.trapz(bump) # normalize the integral to 1
34+
bump /= np.trapezoid(bump) # normalize the integral to 1
3535

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

0 commit comments

Comments
 (0)