编程学习 /SciPy /入门准备 /常量模块
🧪 SciPy 入门准备

常量模块

scipy.constants 里的物理常数。

📅 2026-11-23 👁 0 次阅读 🔗 根据 W3School SciPy 教程整理优化:https://www.w3school.com.cn/scipy/scipy_constants.asp

本节要解决的问题

scipy.constants 里的物理常数。

核心要点

  • pi、e 等数学常数
  • c 光速、g 重力加速度
  • physical_constants 是字典
from scipy import constants\nprint(constants.pi)\nprint(constants.g)
常量模块适合教学与物理计算,别自己手写近似值。

本文根据 W3School SciPy 教程 的知识点重新整理、补充示例编写,非原文转载。