(self)
| 646 | assert_array_equal(result.data, new_data) |
| 647 | |
| 648 | def test_real_and_imag(self): |
| 649 | v = self.cls("x", np.arange(3) - 1j * np.arange(3), {"foo": "bar"}) |
| 650 | expected_re = self.cls("x", np.arange(3), {"foo": "bar"}) |
| 651 | assert_identical(v.real, expected_re) |
| 652 | |
| 653 | expected_im = self.cls("x", -np.arange(3), {"foo": "bar"}) |
| 654 | assert_identical(v.imag, expected_im) |
| 655 | |
| 656 | expected_abs = self.cls("x", np.sqrt(2 * np.arange(3) ** 2)).to_base_variable() |
| 657 | assert_allclose(abs(v), expected_abs) |
| 658 | |
| 659 | def test_aggregate_complex(self): |
| 660 | # should skip NaNs |
nothing calls this directly
no test coverage detected