(self)
| 238 | assert_almost_equal(np.sqrt(cov.mean()), 0.25) |
| 239 | |
| 240 | def test_objects(self): |
| 241 | from decimal import Decimal |
| 242 | p = np.poly1d([Decimal('4.0'), Decimal('3.0'), Decimal('2.0')]) |
| 243 | p2 = p * Decimal('1.333333333333333') |
| 244 | assert_(p2[1] == Decimal("3.9999999999999990")) |
| 245 | p2 = p.deriv() |
| 246 | assert_(p2[1] == Decimal('8.0')) |
| 247 | p2 = p.integ() |
| 248 | assert_(p2[3] == Decimal("1.333333333333333333333333333")) |
| 249 | assert_(p2[2] == Decimal('1.5')) |
| 250 | assert_(np.issubdtype(p2.coeffs.dtype, np.object_)) |
| 251 | p = np.poly([Decimal(1), Decimal(2)]) |
| 252 | assert_equal(np.poly([Decimal(1), Decimal(2)]), |
| 253 | [1, Decimal(-3), Decimal(2)]) |
| 254 | |
| 255 | def test_complex(self): |
| 256 | p = np.poly1d([3j, 2j, 1j]) |
nothing calls this directly
no test coverage detected