def METHOD_NAME():
    """ Tests reshapes on subsets of arrays. """
    sdfg = dace.SDFG('reshp')
    sdfg.add_array('A', [2, 3, 4], dace.float64)
    sdfg.add_array('B', [12], dace.float64)
    sdfg.add_view('Av', [12], dace.float64)
    state = sdfg.add_state()
    state.add_mapped_tasklet('compute',
                             dict(i='0:12'),
                             dict(a=dace.Memlet('Av[i]'), b=dace.Memlet('B[i]')),
                             'out = a + b',
                             dict(out=dace.Memlet('B[i]')),
                             external_edges=True)
    v = next(n for n in state.source_nodes() if n.data == 'Av')
    state.add_nedge(state.add_read('A'), v, dace.Memlet('A[1, 0:3, 0:4]'))
    A = np.random.rand(2, 3, 4)
    B = np.random.rand(12)
    expected = np.reshape(A[1, :, :], [12]) + B
    sdfg(A=A, B=B)
    assert np.allclose(expected, B)