From 671f7921d809bf0b6987e717e461414549bedd8d Mon Sep 17 00:00:00 2001 From: Saanidhya Date: Sun, 19 Jan 2020 23:56:12 +0530 Subject: [PATCH] With reference to issue #3663 --- dask/array/slicing.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dask/array/slicing.py b/dask/array/slicing.py index c20fdeca65b..53899051d2a 100644 --- a/dask/array/slicing.py +++ b/dask/array/slicing.py @@ -11,6 +11,7 @@ from .. import core from ..highlevelgraph import HighLevelGraph from ..base import tokenize, is_dask_collection +import dask.array as da colon = slice(None, None, None) @@ -1240,3 +1241,15 @@ def cached_cumsum(seq, initial_zero=False): if not initial_zero: result = result[1:] return result + + +def take_along_axis(arr,indices,axis): + if axis is None: + arr=arr.flat + arr_shape=(len(arr),) + axis=0 + arr=np.array(arr) + indices=np.array() + if np.shape(arr)!=np.shape(indices): + raise ValueError('Dimensions of arr and indices does not match ') + \ No newline at end of file