def test_double_complex_args(self):
        cx = np.array([.5 + 1.j, .25 - .375j, 13. - 4.j], np.complex128)
        cy = np.array([.875 + 2.j, .875 - .625j, -1. + 2.j], np.complex128)

        assert_equal(blas._test_izamax(cx), 3)

        assert_allclose(blas._test_zdotc(cx, cy), -18.109375 + 22.296875j, 10)
        assert_allclose(blas._test_zdotu(cx, cy), -6.578125 + 31.390625j, 10)

        assert_allclose(blas._test_zdotc(cx[::2], cy[::2]), -18.5625 + 22.125j,
                        10)
        assert_allclose(blas._test_zdotu(cx[::2], cy[::2]), -6.5625 + 31.875j,
                        10)
Beispiel #2
0
    def test_double_complex_args(self):

        cx = np.array([.5 + 1.j, .25 - .375j, 13. - 4.j], np.complex128)
        cy = np.array([.875 + 2.j, .875 - .625j, -1. + 2.j], np.complex128)

        assert_equal(blas._test_izamax(cx), 3)

        assert_allclose(blas._test_zdotc(cx, cy), -18.109375+22.296875j, 10)
        assert_allclose(blas._test_zdotu(cx, cy), -6.578125+31.390625j, 10)

        assert_allclose(blas._test_zdotc(cx[::2], cy[::2]),
                        -18.5625+22.125j, 10)
        assert_allclose(blas._test_zdotu(cx[::2], cy[::2]),
                        -6.5625+31.875j, 10)