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

Method testFloor

tools/swig/test/testMatrix.py:164–170  ·  view source on GitHub ↗

Test floor function

(self)

Source from the content-addressed store, hash-verified

162
163 # Test (type* INPLACE_ARRAY2, int DIM1, int DIM2) typemap
164 def testFloor(self):
165 "Test floor function"
166 print(self.typeStr, "... ", end=' ', file=sys.stderr)
167 floor = Matrix.__dict__[self.typeStr + "Floor"]
168 matrix = np.array([[6, 7], [8, 9]], self.typeCode)
169 floor(matrix, 7)
170 np.testing.assert_array_equal(matrix, np.array([[7, 7], [8, 9]]))
171
172 # Test (type* INPLACE_ARRAY2, int DIM1, int DIM2) typemap
173 def testFloorWrongDim(self):

Callers

nothing calls this directly

Calls 3

printFunction · 0.85
floorFunction · 0.85
assert_array_equalMethod · 0.80

Tested by

no test coverage detected