narrow
¶
Returns the length entries of src along axis starting at
start.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
src
|
Union[array, list]
|
An array or a list. |
required |
axis
|
int
|
The axis along which to slice (must be |
required |
start
|
int
|
Index of the first entry. |
required |
length
|
int
|
Number of entries. |
required |
Returns:
| Type | Description |
|---|---|
Union[array, list, Any]
|
The slice of |
Example:
Source code in mlx_graphs/utils/indexing.py
from mlx_graphs.utils import narrow · mlx_graphs/utils/indexing.py