def METHOD_NAME():
    for numpy_resize in [True, False]:
        da = DynamicArray1D(10, use_numpy_resize=numpy_resize, refcheck=False)
        da[:] = np.arange(10)
        da.shrink(5)
        assert len(da) == 5
        assert all(da[:] == np.arange(5))
        # After using shrink, the underlying array should have changed
        assert len(da._data) == 5