本文简要介绍 python 语言中 numpy.typename
的用法。
用法:
numpy.typename(char)
返回给定数据类型代码的说明。
- char: str
数据类型代码。
- out: str
输入数据类型代码的说明。
参数:
返回:
例子:
>>> typechars = ['S1', '?', 'B', 'D', 'G', 'F', 'I', 'H', 'L', 'O', 'Q', ... 'S', 'U', 'V', 'b', 'd', 'g', 'f', 'i', 'h', 'l', 'q'] >>> for typechar in typechars: ... print(typechar, ' : ', np.typename(typechar)) ... S1 : character ? : bool B : unsigned char D : complex double precision G : complex long double precision F : complex single precision I : unsigned integer H : unsigned short L : unsigned long integer O : object Q : unsigned long long integer S : string U : unicode V : void b : signed char d : double precision g : long precision f : single precision i : integer h : short l : long integer q : long long integer
相关用法
- Python numpy trim_zeros用法及代码示例
- Python numpy testing.rundocs用法及代码示例
- Python numpy testing.assert_warns用法及代码示例
- Python numpy trace用法及代码示例
- Python numpy testing.assert_array_almost_equal_nulp用法及代码示例
- Python numpy tri用法及代码示例
- Python numpy testing.assert_array_less用法及代码示例
- Python numpy testing.assert_raises用法及代码示例
- Python numpy true_divide用法及代码示例
- Python numpy transpose用法及代码示例
- Python numpy testing.assert_almost_equal用法及代码示例
- Python numpy tile用法及代码示例
- Python numpy testing.assert_approx_equal用法及代码示例
- Python numpy tanh用法及代码示例
- Python numpy testing.assert_allclose用法及代码示例
- Python numpy testing.decorators.slow用法及代码示例
- Python numpy trapz用法及代码示例
- Python numpy testing.suppress_warnings用法及代码示例
- Python numpy take用法及代码示例
- Python numpy testing.assert_string_equal用法及代码示例
- Python numpy testing.run_module_suite用法及代码示例
- Python numpy testing.assert_array_max_ulp用法及代码示例
- Python numpy take_along_axis用法及代码示例
- Python numpy testing.assert_equal用法及代码示例
- Python numpy triu_indices用法及代码示例
注:本文由纯净天空筛选整理自numpy.org大神的英文原创作品 numpy.typename。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。