예제 #1
0
    def testViewDataOnAtleast1d(self):
        a = atleast_1d(1)
        b = a[:]
        b[0] = 10

        np.testing.assert_array_equal(b.execute(), np.array([10]))
        np.testing.assert_array_equal(a.execute(), np.array([10]))
예제 #2
0
def test_view_data_on_atleast1d(setup):
    a = atleast_1d(1)
    b = a[:]
    b[0] = 10

    np.testing.assert_array_equal(b.execute(), np.array([10]))
    np.testing.assert_array_equal(a.execute(), np.array([10]))