您的位置:首页 > 编程语言 > Python开发

numpy.ceil()用法

2017-06-11 12:20 746 查看
numpy.ceil(x[, out]) =
<ufunc 'ceil'>

( ceil [siːl] 向正无穷取整 朝正无穷大方向取整)


Return the ceiling of the input, element-wise.
( element-wise 元素方式 )

( ceiling ['siːlɪŋ] n. 天花板;上限 )

The ceil of the scalar x is the smallest integer i, such that i
>= x. It is often denoted as 

.
( scalar ['skeɪlə] adj. 标量的;数量的;梯状的,分等级的

n. [数] 标量;[数] 数量)

( denoted 表示,指示(denote的过去式和过去分词) 数学:指称,概指:)

Parameters:x : array_like

Input data.

Returns:y : ndarray or scalar

The ceiling of each element in x, with float dtype.

See also
floortruncrint

Examples

>>>
>>> a = np.array([-1.7, -1.5, -0.2, 0.2, 1.5, 1.7, 2.0])
>>> np.ceil(a)
array([-1., -1., -0.,  1.,  2.,  2.,  2.])
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: