'Test writing to a 2D array within a structured type'

@tag('important')
def test_record_write_2d_array(self):

    nbval = np.recarray(1, dtype=recordwith2darray)
    nbrecord = numpy_support.from_dtype(recordwith2darray)
    cfunc = self.get_cfunc(record_write_2d_array, (nbrecord,))
    cfunc(nbval[0])
    expected = np.recarray(1, dtype=recordwith2darray)
    expected[0].i = 3
    expected[0].j[:] = np.asarray([5.0, 6.0, 7.0, 8.0, 9.0, 10.0], np.float32).reshape(3, 2)
    np.testing.assert_equal(expected, nbval)
