Skip to content

Commit cde5cbf

Browse files
committed
fix deprecated NumPy issues that were causing CI errors
1 parent 8c71d6e commit cde5cbf

File tree

3 files changed

+26
-34
lines changed

3 files changed

+26
-34
lines changed

examples/cds110-L8a_maglev-limits.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@
253253
"omega = np.linspace(0, 1e6, 100000)\n",
254254
"for name, sys in zip(['C1', 'C2', 'C3'], [magS1, magS2, magS3]):\n",
255255
" freqresp = ct.frequency_response(sys, omega)\n",
256-
" bodeint = np.trapz(np.log(freqresp.magnitude), omega)\n",
256+
" bodeint = np.trapezoid(np.log(freqresp.magnitude), omega)\n",
257257
" print(\"Bode integral for\", name, \"=\", bodeint)\n",
258258
"\n",
259259
"print(\"pi * sum[ Re(pk) ]\", pi * np.sum(magP.poles()[magP.poles().real > 0]))"

examples/cds112-L6_stochastic-linsys.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
"source": [
9393
"# Calculate the sample properties and make sure they match\n",
9494
"print(\"mean(V) [0.0] = \", np.mean(V))\n",
95-
"print(\"cov(V) * dt [%0.3g] = \" % Q, np.round(np.cov(V), decimals=3) * dt)"
95+
"print(\"cov(V) * dt [%0.3g] = \" % Q.item(), np.round(np.cov(V), decimals=3) * dt)"
9696
]
9797
},
9898
{

0 commit comments

Comments
 (0)