Skip to content

Commit f68a652

Browse files
TST: handle a deprecation warning from numpy 1.25 (#294)
1 parent 9a7716d commit f68a652

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

test/MHD/AmbipolarCshock/python/testidefix.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def f(x,D):
7272
Dth=np.zeros(x.shape)
7373
for i in range(x.size):
7474
r.set_initial_value(DSim[iref],x[iref])
75-
Dth[i]=r.integrate(x[i])
75+
Dth[i]=r.integrate(x[i]).item()
7676
#print("Dth[%d]=%g"%(i,Dth[i]))
7777

7878
bTh=np.sqrt(b0**2+2*A**2*(Dth-1)*(1/Dth-1/M**2))

test/MHD/AmbipolarCshock3D/python/testidefix.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def f(x,D):
7575
Dth=np.zeros(x.shape)
7676
for i in range(x.size):
7777
r.set_initial_value(DSim[iref],x[iref])
78-
Dth[i]=r.integrate(x[i])
78+
Dth[i]=r.integrate(x[i]).item()
7979
#print("Dth[%d]=%g"%(i,Dth[i]))
8080

8181
bTh=np.sqrt(b0**2+2*A**2*(Dth-1)*(1/Dth-1/M**2))

0 commit comments

Comments
 (0)