网站有了域名后怎么还上不了,威海人社app下载官网2022,才做的网站怎么搜不到,wordpress技术服务我有一些一维数据,并与样条拟合.然后我想在其中找到拐点(忽略鞍点).现在我通过在splev生成的很多值上使用scipy.signal.argrelmin(和argrelmax)来搜索其第一个派生的极值.import scipy.interpolateimport scipy.optimizeimport scipy.signalimport numpy as npimport matplotli…我有一些一维数据,并与样条拟合.然后我想在其中找到拐点(忽略鞍点).现在我通过在splev生成的很多值上使用scipy.signal.argrelmin(和argrelmax)来搜索其第一个派生的极值.import scipy.interpolateimport scipy.optimizeimport scipy.signalimport numpy as npimport matplotlib.pyplot as pltimport operatory [-1, 5, 6, 4, 2, 5, 8, 5, 1]x np.arange(0, len(y))tck scipy.interpolate.splrep(x, y, s0)print roots, scipy.interpolate.sproot(tck)# output:# [0.11381478]xnew np.arange(0, len(y), 0.01)ynew scipy.interpolate.splev(xnew, tck, der0)ynew_deriv scipy.interpolate.splev(xnew, tck, der1)min_idxs scipy.signal.argrelmin(ynew_deriv)max_idxs scipy.signal.argrelmax(ynew_deriv)mins zip(xnew[min_idxs].tolist(), ynew_deriv[min_idxs].tolist())maxs zip(xnew[max_idxs].tolist(), ynew_deriv[max_idxs].tolist())inflection_points sorted(mins maxs, keyoperator.itemgetter(0))print inflection_points, inflection_points# output:# [(3.13, -2.9822449358974357),# (5.03, 4.3817785256410255)# (7.13, -4.867132628205128)]plt.legend([data,Cubic Spline, 1st deriv])plt.plot(x, y, o,xnew, ynew, -,xnew, ynew_deriv, -)plt.show()但这感觉非常错误.我想有可能在没有产生这么多价值的情况下找到我要找的东西.像sproot这样的东西,但也许适用于二次推导