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

Method test_subclass

numpy/lib/tests/test_function_base.py:1243–1251  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1241 assert_array_almost_equal(z, zo, 11)
1242
1243 def test_subclass(self):
1244 x = np.ma.array([1 + 3j, 1, np.sqrt(2)/2 * (1 + 1j)])
1245 x[1] = np.ma.masked
1246 expected = np.ma.array([np.arctan(3.0 / 1.0), 0, np.arctan(1.0)])
1247 expected[1] = np.ma.masked
1248 actual = angle(x)
1249 assert_equal(type(actual), type(expected))
1250 assert_equal(actual.mask, expected.mask)
1251 assert_equal(actual, expected)
1252
1253
1254class TestTrimZeros:

Callers

nothing calls this directly

Calls 2

angleFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected