“Python/ref cmath nanj”的版本间差异
来自菜鸟教程
小 (Pywikibot 4.4.0.dev0) |
小 (机器人:添加分类Python基础教程) |
||
第49行: | 第49行: | ||
<br /> | <br /> | ||
+ | |||
+ | [[分类:Python基础教程]] |
2020年10月29日 (四) 08:49的最新版本
<languages />
Python cmath.nanj常数
例
打印nanj的值:
#Import cmath Library import cmath # Print the value of nan print (cmath.nanj) print (type(cmath.nanj))
定义和用法
The
cmath.nanj
常量返回一个复杂的nan(非数字)值。该值的实部为0,而nan为虚部。
nanj常数等于
complex(0.0,float("nan")
.
句法
cmath.nanj
技术细节
返回值: | A
|
Python版本: | 3.6 |