在 Python 中将一个 Legendre 系列添加到另一个 Legendre 系列
2024-08-18
21
步骤
import numpy as np from numpy.polynomial import laguerre as L
c1 = np.array([2,3,4]) c2 = np.array([4,3,2])
print("Array1...\n",c1) print("\nArray2...\n",c2)
print("\nArray1 datatype...\n",c1.dtype) print("\nArray2 datatype...\n",c2.dtype)
print("\nDimensions of Array1...\n",c1.ndim) print("\nDimensions of Array2...\n",c2.ndim)
print("\nShape of Array1...\n",c1.shape) print("\nShape of Array2...\n",c2.shape)
print("\nResult (sum)....\n",L.legadd(c1, c2))
例
输出
Array1... [2 3 4] Array2... [4 3 2] Array1 datatype... int64 Array2 datatype... int64 Dimensions of Array1... 1 Dimensions of Array2... 1 Shape of Array1... (3,) Shape of Array2... (3,) Result (sum).... [6. 6. 6.]更新于:1个月前
赞一波!2
相关文章
- Python环境安装,解释器配置
- 使用 Python 开发桌面应用程序的最佳方法是什么?
- Scala和Python有什么区别?
- 在Windows 10计算机上安装Python的最佳方法是什么?
- 使用 Python 拆分文本文件的最快方法是什么?
- Python定时任务调度框架APScheduler详解
- 我应该使用 PyCharm 在 Python 中编程吗?
- json python中的转储函数
- 你如何在 Python 中循环字典?
- 有哪些好的机器学习 Python 包?
- 对于初学者来说,有哪些好的 Python 示例?
- 地图函数在 Python 中有什么用?
- 如何在 Anaconda 中安装 Python 包?
- “//”在python中是什么意思?
- 对未来的技能,Go和Python哪个更好?
- 使用Python时绝对不应该做什么?
- 真正优秀的Python开发人员拥有哪些技能?
- 为什么C代码比Python代码运行得更快?
- 你希望早点知道哪些 Python 功能?
- 我们用Python证书能不能找到工作?
文章评论
全部评论