code
stringlengths
3
6.57k
assert_eq(x[idx0, :], x[1, :])
assert_eq(x[:, idx0], x[:, 1])
pytest.mark.parametrize('chunks', [1, 2, 3, 4, 5])
test_index_with_int_dask_array_nanchunks(chunks)
da.arange(-2, 3, chunks=chunks)
assert_eq(a[a.nonzero()
np.array([-2, -1, 1, 2])
da.zeros(5, chunks=chunks)
assert_eq(a[a.nonzero()
np.array([])
pytest.mark.parametrize('chunks', [2, 4])
test_index_with_int_dask_array_negindex(chunks)
da.arange(4, chunks=chunks)
da.from_array([-1, -4], chunks=1)
assert_eq(a[idx], np.array([3, 0])
pytest.mark.parametrize('chunks', [2, 4])
test_index_with_int_dask_array_indexerror(chunks)
da.arange(4, chunks=chunks)
da.from_array([4], chunks=1)
pytest.raises(IndexError)
compute()
da.from_array([-5], chunks=1)
pytest.raises(IndexError)
compute()
test_index_with_int_dask_array_dtypes(dtype)
da.from_array([10, 20, 30, 40], chunks=-1)
da.from_array(np.array([1, 2])
astype(dtype)
assert_eq(a[idx], np.array([20, 30])
test_index_with_int_dask_array_nocompute()
crash()
NotImplementedError()
da.arange(5, chunks=-1)
da.Array({('x', 0)
pytest.raises(NotImplementedError)
result.compute()
test_index_with_bool_dask_array()
np.arange(36)
reshape((6, 6)
da.from_array(x, chunks=(3, 3)
np.asarray([True, True, False, True, False, False], dtype=bool)
da.from_array(ind, chunks=2)
slice(1, 9, 2)
slice(2, 8, 1)
dask.compute(index)
assert_eq(x[x_index], d[index])
test_index_with_bool_dask_array_2()
np.random.random((10, 10, 10)
np.random.random(10)
da.from_array(x, chunks=(3, 4, 5)
da.from_array(ind, chunks=4)
slice(1, 9, 1)
slice(None)
range(x.ndim)
index2.insert(i, dind)
index3.insert(i, ind)
assert_eq(x[tuple(index3)
tuple(index2)
test_cull()
da.ones(1000, chunks=(10,)
slice(0, 30)
slice(0, None, 100)
len(y.dask)
len(x.dask)
pytest.mark.parametrize('shape', [(2,)
pytest.mark.parametrize('index', [(Ellipsis,)
test_slicing_with_Nones(shape, index)
np.random.random(shape)
da.from_array(x, chunks=shape)
assert_eq(x[index], d[index])
slice(2)
slice(-2, None)
pytest.mark.parametrize('a', indexers)
pytest.mark.parametrize('b', indexers)
pytest.mark.parametrize('c', indexers)
pytest.mark.parametrize('d', indexers)
test_slicing_none_int_ellipses(a, b, c, d)
if (a, b, c, d)
count(Ellipsis)
np.arange(np.prod(shape)
reshape(shape)
da.core.asarray(x)
assert_eq(xx, yy)
test_slicing_integer_no_warnings()
da.random.random((100, 2)
np.array([0, 0, 1, 1])
pytest.warns(None)
compute()
len(rec)
test_slicing_none_int_ellipes()
np.arange(np.prod(shape)
reshape(shape)
da.core.asarray(x)
itertools.product(indexers, indexers, indexers, indexers)
ind.count(Ellipsis)
assert_eq(x[ind], y[ind])
test_None_overlap_int()
slice(None, 2, None)
np.arange(np.prod(shape)
reshape(shape)