@@ -32,7 +32,6 @@ def plot(d, selection, secondary_source):
32
32
33
33
"""
34
34
import numpy as _np
35
- from numpy .core .umath_tests import inner1d as _inner1d
36
35
from scipy .special import hankel2 as _hankel2
37
36
38
37
from . import secondary_source_line as _secondary_source_line
@@ -91,7 +90,7 @@ def line_2d(omega, x0, n0, xs, *, c=None):
91
90
k = _util .wavenumber (omega , c )
92
91
ds = x0 - xs
93
92
r = _np .linalg .norm (ds , axis = 1 )
94
- d = - 1j / 2 * k * _inner1d (ds , n0 ) / r * _hankel2 (1 , k * r )
93
+ d = - 1j / 2 * k * _np . inner (ds , n0 ) / r * _hankel2 (1 , k * r )
95
94
selection = _util .source_selection_line (n0 , x0 , xs )
96
95
return d , selection , _secondary_source_line (omega , c )
97
96
@@ -147,7 +146,7 @@ def _point(omega, x0, n0, xs, *, c=None):
147
146
k = _util .wavenumber (omega , c )
148
147
ds = x0 - xs
149
148
r = _np .linalg .norm (ds , axis = 1 )
150
- d = 1j * k * _inner1d (ds , n0 ) / r ** (3 / 2 ) * _np .exp (- 1j * k * r )
149
+ d = 1j * k * _np . inner (ds , n0 ) / r ** (3 / 2 ) * _np .exp (- 1j * k * r )
151
150
selection = _util .source_selection_point (n0 , x0 , xs )
152
151
return d , selection , _secondary_source_point (omega , c )
153
152
@@ -234,7 +233,7 @@ def point_25d(omega, x0, n0, xs, xref=[0, 0, 0], c=None, omalias=None):
234
233
preeq_25d (omega , omalias , c ) *
235
234
_np .sqrt (8 * _np .pi ) *
236
235
_np .sqrt ((r * s ) / (r + s )) *
237
- _inner1d (n0 , ds ) / s *
236
+ _np . inner (n0 , ds ) / s *
238
237
_np .exp (- 1j * k * s ) / (4 * _np .pi * s ))
239
238
selection = _util .source_selection_point (n0 , x0 , xs )
240
239
return d , selection , _secondary_source_point (omega , c )
@@ -316,7 +315,7 @@ def point_25d_legacy(omega, x0, n0, xs, xref=[0, 0, 0], c=None, omalias=None):
316
315
r = _np .linalg .norm (ds , axis = 1 )
317
316
d = (
318
317
preeq_25d (omega , omalias , c ) *
319
- _np .sqrt (_np .linalg .norm (xref - x0 )) * _inner1d (ds , n0 ) /
318
+ _np .sqrt (_np .linalg .norm (xref - x0 )) * _np . inner (ds , n0 ) /
320
319
r ** (3 / 2 ) * _np .exp (- 1j * k * r ))
321
320
selection = _util .source_selection_point (n0 , x0 , xs )
322
321
return d , selection , _secondary_source_point (omega , c )
@@ -499,7 +498,7 @@ def _focused(omega, x0, n0, xs, ns, *, c=None):
499
498
k = _util .wavenumber (omega , c )
500
499
ds = x0 - xs
501
500
r = _np .linalg .norm (ds , axis = 1 )
502
- d = 1j * k * _inner1d (ds , n0 ) / r ** (3 / 2 ) * _np .exp (1j * k * r )
501
+ d = 1j * k * _np . inner (ds , n0 ) / r ** (3 / 2 ) * _np .exp (1j * k * r )
503
502
selection = _util .source_selection_focused (ns , x0 , xs )
504
503
return d , selection , _secondary_source_point (omega , c )
505
504
@@ -569,7 +568,7 @@ def focused_25d(omega, x0, n0, xs, ns, *, xref=[0, 0, 0], c=None,
569
568
r = _np .linalg .norm (ds , axis = 1 )
570
569
d = (
571
570
preeq_25d (omega , omalias , c ) *
572
- _np .sqrt (_np .linalg .norm (xref - x0 )) * _inner1d (ds , n0 ) /
571
+ _np .sqrt (_np .linalg .norm (xref - x0 )) * _np . inner (ds , n0 ) /
573
572
r ** (3 / 2 ) * _np .exp (1j * k * r ))
574
573
selection = _util .source_selection_focused (ns , x0 , xs )
575
574
return d , selection , _secondary_source_point (omega , c )
@@ -705,3 +704,4 @@ def soundfigure_3d(omega, x0, n0, figure, npw=[0, 0, 1], *, c=None):
705
704
d += selection * figure [n , m ] * d_component
706
705
707
706
return d , _util .source_selection_all (len (d )), secondary_source
707
+
0 commit comments