@@ -280,6 +280,8 @@ Let's do an example.
280280import numpy as np
281281import numpy.linalg as LA
282282import matplotlib.pyplot as plt
283+284+rng = np.random.default_rng()
283285```
284286285287Having imported these modules, let's do the example.
@@ -424,7 +426,7 @@ First, let's study a case in which $m = 5 > n = 2$.
424426425427```{code-cell} ipython3
426428import numpy as np
427-X = np.random.rand(5,2)
429+X = rng.random((5, 2))
428430U, S, V = np.linalg.svd(X,full_matrices=True) # full SVD
429431Uhat, Shat, Vhat = np.linalg.svd(X,full_matrices=False) # economy SVD
430432print('U, S, V =')
@@ -486,7 +488,7 @@ To illustrate this case, we'll set $m = 2 < 5 = n $ and compute both full and r
486488487489```{code-cell} ipython3
488490import numpy as np
489-X = np.random.rand(2,5)
491+X = rng.random((2, 5))
490492U, S, V = np.linalg.svd(X,full_matrices=True) # full SVD
491493Uhat, Shat, Vhat = np.linalg.svd(X,full_matrices=False) # economy SVD
492494print('U, S, V = ')