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

Method testCeil

tools/swig/test/testTensor.py:220–228  ·  view source on GitHub ↗

Test ceil function

(self)

Source from the content-addressed store, hash-verified

218
219 # Test (int DIM1, int DIM2, int DIM3, type* INPLACE_ARRAY3) typemap
220 def testCeil(self):
221 "Test ceil function"
222 print(self.typeStr, "... ", end=' ', file=sys.stderr)
223 ceil = Tensor.__dict__[self.typeStr + "Ceil"]
224 tensor = np.array([[[9, 8], [7, 6]],
225 [[5, 4], [3, 2]]], self.typeCode)
226 ceil(tensor, 5)
227 np.testing.assert_array_equal(tensor, np.array([[[5, 5], [5, 5]],
228 [[5, 4], [3, 2]]]))
229
230 # Test (int DIM1, int DIM2, int DIM3, type* INPLACE_ARRAY3) typemap
231 def testCeilWrongType(self):

Callers

nothing calls this directly

Calls 3

printFunction · 0.85
ceilFunction · 0.85
assert_array_equalMethod · 0.80

Tested by

no test coverage detected