---
title: "scipy的special模块"
author: "cakin24"
date: "2017-08-04T23:30:30Z"
tags: []
categories: ["编程语言"]
slug: "scipy-special"
draft: false
lastmod: "2017-08-04T23:30:30Z"
id: 2388386
url: "https://cakin24.iteye.com/blog/2388386"
---

**一 介绍**

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

**二 代码**

01. `from scipy import special as S`
02. `print(S.cbrt(8))#立方根`
03. `print(S.exp10(3))#10**3`
04. `print(S.sindg(90))#正弦函数，参数为角度`
05. `print(S.round(3.1))#四舍五入函数`
06. `print(S.round(3.5))`
07. `print(S.round(3.499))`
08. `print(S.comb(5,3))#从5个中任选3个的组合数`
09. `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