MCPcopy Create free account
hub / github.com/numpy/numpy / ceil

Function ceil

numpy/array_api/_elementwise_functions.py:230–241  ·  view source on GitHub ↗

Array API compatible wrapper for :py:func:`np.ceil `. See its docstring for more information.

(x: Array, /)

Source from the content-addressed store, hash-verified

228
229
230def ceil(x: Array, /) -> Array:
231 """
232 Array API compatible wrapper for :py:func:`np.ceil <numpy.ceil>`.
233
234 See its docstring for more information.
235 """
236 if x.dtype not in _real_numeric_dtypes:
237 raise TypeError("Only real numeric dtypes are allowed in ceil")
238 if x.dtype in _integer_dtypes:
239 # Note: The return dtype of ceil is the same as the input
240 return x
241 return Array._new(np.ceil(x._array))
242
243
244def conj(x: Array, /) -> Array:

Callers 7

testCeilMethod · 0.85
testCeilMethod · 0.85
testCeilMethod · 0.85
Dragon4Function · 0.85
mainFunction · 0.85

Calls 1

_newMethod · 0.80

Tested by 4

testCeilMethod · 0.68
testCeilMethod · 0.68
testCeilMethod · 0.68
mainFunction · 0.68