本文簡要介紹 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。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。