diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2018-11-01 18:11:33 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-01 18:11:33 -0500 |
commit | 9cc9f01da14d0eb7904dfe4351d393ff57795e15 (patch) | |
tree | 3f376a0e4d0405484c7f67e15fb82a76bafd4fc4 | |
parent | cb3736099ae0b5e329909a2789f9c5d87cf2cafd (diff) | |
parent | fe76cc7fb5c598375cc3ec3ccd96a64fc53e4e3e (diff) | |
download | numpy-9cc9f01da14d0eb7904dfe4351d393ff57795e15.tar.gz |
Merge pull request #12073 from rth/numpy-full-polynomial
MAINT Avoid some memory copies in numpy.polynomial.hermite
-rw-r--r-- | numpy/polynomial/hermite.py | 2 | ||||
-rw-r--r-- | numpy/polynomial/hermite_e.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/numpy/polynomial/hermite.py b/numpy/polynomial/hermite.py index 2aed4b34f..4905f366f 100644 --- a/numpy/polynomial/hermite.py +++ b/numpy/polynomial/hermite.py @@ -1704,7 +1704,7 @@ def _normed_hermite_n(x, n): """ if n == 0: - return np.ones(x.shape)/np.sqrt(np.sqrt(np.pi)) + return np.full(x.shape, 1/np.sqrt(np.sqrt(np.pi))) c0 = 0. c1 = 1./np.sqrt(np.sqrt(np.pi)) diff --git a/numpy/polynomial/hermite_e.py b/numpy/polynomial/hermite_e.py index d4520ad6c..6cb044a55 100644 --- a/numpy/polynomial/hermite_e.py +++ b/numpy/polynomial/hermite_e.py @@ -1698,7 +1698,7 @@ def _normed_hermite_e_n(x, n): """ if n == 0: - return np.ones(x.shape)/np.sqrt(np.sqrt(2*np.pi)) + return np.full(x.shape, 1/np.sqrt(np.sqrt(2*np.pi))) c0 = 0. c1 = 1./np.sqrt(np.sqrt(2*np.pi)) |