(self)
| 208 | assert_almost_equal(np.sqrt(cov.mean()), 0.25) |
| 209 | |
| 210 | def test_objects(self): |
| 211 | from decimal import Decimal |
| 212 | p = np.poly1d([Decimal('4.0'), Decimal('3.0'), Decimal('2.0')]) |
| 213 | p2 = p * Decimal('1.333333333333333') |
| 214 | assert_(p2[1] == Decimal("3.9999999999999990")) |
| 215 | p2 = p.deriv() |
| 216 | assert_(p2[1] == Decimal('8.0')) |
| 217 | p2 = p.integ() |
| 218 | assert_(p2[3] == Decimal("1.333333333333333333333333333")) |
| 219 | assert_(p2[2] == Decimal('1.5')) |
| 220 | assert_(np.issubdtype(p2.coeffs.dtype, np.object_)) |
| 221 | p = np.poly([Decimal(1), Decimal(2)]) |
| 222 | assert_equal(np.poly([Decimal(1), Decimal(2)]), |
| 223 | [1, Decimal(-3), Decimal(2)]) |
| 224 | |
| 225 | def test_complex(self): |
| 226 | p = np.poly1d([3j, 2j, 1j]) |
nothing calls this directly
no test coverage detected