deepctr_torch.layers.utils module¶
- Author:
- Weichen Shen,weichenswc@163.com
-
deepctr_torch.layers.utils.
slice_arrays
(arrays, start=None, stop=None)[source]¶ Slice an array or list of arrays.
This takes an array-like, or a list of array-likes, and outputs:
- arrays[start:stop] if arrays is an array-like
- [x[start:stop] for x in arrays] if arrays is a list
Can also work on list/array of indices: slice_arrays(x, indices)
- Arguments:
arrays: Single array or list of arrays. start: can be an integer index (start index)
or a list/array of indices- stop: integer (stop index); should be None if
- start was a list.
- Returns:
- A slice of the array(s).
- Raises:
- ValueError: If the value of start is a list and stop is not None.