8000 Merge pull request #12073 from rth/numpy-full-polynomial · numpy/numpy@9cc9f01 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9cc9f01

Browse files
authored
Merge pull request #12073 from rth/numpy-full-polynomial
MAINT Avoid some memory copies in numpy.polynomial.hermite
2 parents cb37360 + fe76cc7 commit 9cc9f01

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

numpy/polynomial/hermite.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1704,7 +1704,7 @@ def _normed_hermite_n(x, n):
17041704
17051705
"""
17061706
if n == 0:
1707-
return np.ones(x.shape)/np.sqrt(np.sqrt(np.pi))
1707+
return np.full(x.shape, 1/np.sqrt(np.sqrt(np.pi)))
17081708

17091709
c0 = 0.
17101710
c1 = 1./np.sqrt(np.sqrt(np.pi))

numpy/polynomial/hermite_e.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1698,7 +1698,7 @@ def _normed_hermite_e_n(x, n):
16981698
16991699
"""
17001700
if n == 0:
1701-
return np.ones(x.shape)/np.sqrt(np.sqrt(2*np.pi))
1701+
return np.full(x.shape, 1/np.sqrt(np.sqrt(2*np.pi)))
17021702

17031703
c0 = 0.
17041704
c1 = 1./np.sqrt(np.sqrt(2*np.pi))

0 commit comments

Comments
 (0)
0