本文簡要介紹 python 語言中 scipy.special.round
的用法。
用法:
scipy.special.round(x, out=None) = <ufunc 'round'>#
四舍五入到最接近的整數。
返回最接近的整數x.如果x正好以 0.5 結尾,則選擇最接近的偶數。
- x: array_like
實值輸入。
- out: ndarray,可選
函數結果的可選輸出數組。
- 標量或 ndarray
與 x 的元素最接近的整數。結果是浮點類型,而不是整數類型。
參數 ::
返回 ::
例子:
>>> import scipy.special as sc
它四舍五入。
>>> sc.round([0.5, 1.5]) array([0., 2.])
相關用法
- Python SciPy special.roots_legendre用法及代碼示例
- Python SciPy special.radian用法及代碼示例
- Python SciPy special.rgamma用法及代碼示例
- Python SciPy special.exp1用法及代碼示例
- Python SciPy special.expn用法及代碼示例
- Python SciPy special.ncfdtri用法及代碼示例
- Python SciPy special.gamma用法及代碼示例
- Python SciPy special.y1用法及代碼示例
- Python SciPy special.y0用法及代碼示例
- Python SciPy special.ellip_harm_2用法及代碼示例
- Python SciPy special.i1e用法及代碼示例
- Python SciPy special.smirnovi用法及代碼示例
- Python SciPy special.ker用法及代碼示例
- Python SciPy special.ynp_zeros用法及代碼示例
- Python SciPy special.k0e用法及代碼示例
- Python SciPy special.j1用法及代碼示例
- Python SciPy special.logsumexp用法及代碼示例
- Python SciPy special.expit用法及代碼示例
- Python SciPy special.polygamma用法及代碼示例
- Python SciPy special.nbdtrik用法及代碼示例
- Python SciPy special.nbdtrin用法及代碼示例
- Python SciPy special.seterr用法及代碼示例
- Python SciPy special.ncfdtr用法及代碼示例
- Python SciPy special.pdtr用法及代碼示例
- Python SciPy special.expm1用法及代碼示例
注:本文由純淨天空篩選整理自scipy.org大神的英文原創作品 scipy.special.round。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。