gpt4 book ai didi

python - 为什么 Numpy 在按度排序多项式系数时不一致?

转载 作者:太空狗 更新时间:2023-10-30 00:54:25 26 4
gpt4 key购买 nike

numpy.polynomial.polynomial.Polynomial以递增的顺序存储多项式系数,而 numpy.poly1d多项式系数按次数递减的顺序存储。

这种差异有什么原因吗?这两种方法各有优势吗?

最佳答案

根据SciPy reference on NumPy :

Prior to NumPy 1.4, numpy.poly1d was the class of choice and it is still available in order to maintain backward compatibility. However, the newer Polynomial package is more complete than numpy.poly1d and its convenience classes are better behaved in the numpy environment. Therefore Polynomial is recommended for new coding.

关于python - 为什么 Numpy 在按度排序多项式系数时不一致?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38017516/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com