ITeye博客

scipy的special模块

cakin24 · 2017-08-04 23:30 · python · 编程语言 · Markdown

一 介绍

scipy的special模块包含了大量函数库,包括基本数学函数、特殊函数以及numpy中的所有函数。

二 代码

  1. from scipy import special as S
  2. print(S.cbrt(8))#立方根
  3. print(S.exp10(3))#10**3
  4. print(S.sindg(90))#正弦函数,参数为角度
  5. print(S.round(3.1))#四舍五入函数
  6. print(S.round(3.5))
  7. print(S.round(3.499))
  8. print(S.comb(5,3))#从5个中任选3个的组合数
  9. print(S.perm(5,3))#排列数
  10. print(S.gamma(4))#gamma函数
  11. print(S.beta(10,200))#beta函数
  12. print(S.sinc(0))#sinc函数

三 运行结果

2.0

1000.0

1.0

3.0

4.0

3.0

10.0

60.0

6.0

2.83960777778e-18

1.0

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。