增加环绕侦察场景适配
This commit is contained in:
@@ -76,8 +76,6 @@ See also
|
||||
|
||||
"""
|
||||
import numpy as np
|
||||
import numpy.linalg as la
|
||||
from numpy.lib.array_utils import normalize_axis_index
|
||||
|
||||
from . import polyutils as pu
|
||||
from ._polybase import ABCPolyBase
|
||||
@@ -650,7 +648,7 @@ def lagder(c, m=1, scl=1, axis=0):
|
||||
iaxis = pu._as_int(axis, "the axis")
|
||||
if cnt < 0:
|
||||
raise ValueError("The order of derivation must be non-negative")
|
||||
iaxis = normalize_axis_index(iaxis, c.ndim)
|
||||
iaxis = np.lib.array_utils.normalize_axis_index(iaxis, c.ndim)
|
||||
|
||||
if cnt == 0:
|
||||
return c
|
||||
@@ -770,7 +768,7 @@ def lagint(c, m=1, k=[], lbnd=0, scl=1, axis=0):
|
||||
raise ValueError("lbnd must be a scalar.")
|
||||
if np.ndim(scl) != 0:
|
||||
raise ValueError("scl must be a scalar.")
|
||||
iaxis = normalize_axis_index(iaxis, c.ndim)
|
||||
iaxis = np.lib.array_utils.normalize_axis_index(iaxis, c.ndim)
|
||||
|
||||
if cnt == 0:
|
||||
return c
|
||||
@@ -1185,7 +1183,7 @@ def lagvander2d(x, y, deg):
|
||||
correspond to the elements of a 2-D coefficient array `c` of shape
|
||||
(xdeg + 1, ydeg + 1) in the order
|
||||
|
||||
.. math:: c_{00}, c_{01}, c_{02} ... , c_{10}, c_{11}, c_{12} ...
|
||||
.. math:: c_{00}, c_{01}, c_{02}, ... , c_{10}, c_{11}, c_{12}, ...
|
||||
|
||||
and ``np.dot(V, c.flat)`` and ``lagval2d(x, y, c)`` will be the same
|
||||
up to roundoff. This equivalence is useful both for least squares
|
||||
@@ -1525,7 +1523,7 @@ def lagroots(c):
|
||||
|
||||
# rotated companion matrix reduces error
|
||||
m = lagcompanion(c)[::-1, ::-1]
|
||||
r = la.eigvals(m)
|
||||
r = np.linalg.eigvals(m)
|
||||
r.sort()
|
||||
return r
|
||||
|
||||
@@ -1577,7 +1575,7 @@ def laggauss(deg):
|
||||
# matrix is symmetric in this case in order to obtain better zeros.
|
||||
c = np.array([0] * deg + [1])
|
||||
m = lagcompanion(c)
|
||||
x = la.eigvalsh(m)
|
||||
x = np.linalg.eigvalsh(m)
|
||||
|
||||
# improve roots by one application of Newton
|
||||
dy = lagval(x, c)
|
||||
|
||||
Reference in New Issue
Block a user