def test_field1d_d_x2(): fld = fls.Field1D(3, 1, 3, 1, 5) assert np.allclose(fld.d_x2().toarray(), [[-2, 1, 0], [1, -2, 1], [0, 1, -2]])