summaryrefslogtreecommitdiff
path: root/numpy/random
diff options
context:
space:
mode:
authorWarren Weckesser <warren.weckesser@gmail.com>2020-05-04 19:04:20 -0400
committerWarren Weckesser <warren.weckesser@gmail.com>2020-05-04 19:07:27 -0400
commite95fcba32f123dc3ea6e23f533fedf5aee64815e (patch)
treec2e7750ebb1950373fb14a41ed36eeacf41bbd21 /numpy/random
parent30bf46c0538266ade0ac0e1a18486a226196b738 (diff)
downloadnumpy-e95fcba32f123dc3ea6e23f533fedf5aee64815e.tar.gz
DEP: Deprecate `numpy.dual`.
Add a deprecation warning in the `numpy.dual` module, and remove the use of `numpy.dual` from the few places where it is used in the numpy code.
Diffstat (limited to 'numpy/random')
-rw-r--r--numpy/random/_generator.pyx6
-rw-r--r--numpy/random/mtrand.pyx2
2 files changed, 4 insertions, 4 deletions
diff --git a/numpy/random/_generator.pyx b/numpy/random/_generator.pyx
index 27cb2859e..274dba8c4 100644
--- a/numpy/random/_generator.pyx
+++ b/numpy/random/_generator.pyx
@@ -3502,14 +3502,14 @@ cdef class Generator:
# GH10839, ensure double to make tol meaningful
cov = cov.astype(np.double)
if method == 'svd':
- from numpy.dual import svd
+ from numpy.linalg import svd
(u, s, vh) = svd(cov)
elif method == 'eigh':
- from numpy.dual import eigh
+ from numpy.linalg import eigh
# could call linalg.svd(hermitian=True), but that calculates a vh we don't need
(s, u) = eigh(cov)
else:
- from numpy.dual import cholesky
+ from numpy.linalg import cholesky
l = cholesky(cov)
# make sure check_valid is ignored whe method == 'cholesky'
diff --git a/numpy/random/mtrand.pyx b/numpy/random/mtrand.pyx
index 0c0c611af..6f2ba871c 100644
--- a/numpy/random/mtrand.pyx
+++ b/numpy/random/mtrand.pyx
@@ -4049,7 +4049,7 @@ cdef class RandomState:
[True, True] # random
"""
- from numpy.dual import svd
+ from numpy.linalg import svd
# Check preconditions on arguments
mean = np.array(mean)