forked from M-Labs/nac3
1
0
Fork 0

fixup! core/ndstrides: implement ndarray indexing

fix index comment
This commit is contained in:
lyken 2024-08-23 11:50:45 +08:00
parent 5a893e1c15
commit 787fe23202
No known key found for this signature in database
GPG Key ID: 3BD5FC6AC8325DD8
1 changed files with 2 additions and 6 deletions

View File

@ -68,13 +68,9 @@ namespace indexing
/**
* @brief Perform ndarray "basic indexing" (https://numpy.org/doc/stable/user/basics.indexing.html#basic-indexing)
*
* This is function very similar to performing `dst_ndarray = src_ndarray[indices]` in Python (where the variables
* can all be found in the parameter of this function).
* This function is very similar to performing `dst_ndarray = src_ndarray[indices]` in Python.
*
* In other words, this function takes in an ndarray (`src_ndarray`), index it with `indices`, and return the
* indexed array (by writing the result to `dst_ndarray`).
*
* This function also does proper assertions on `indices`.
* This function also does proper assertions on `indices` to check for out of bounds access.
*
* # Notes on `dst_ndarray`
* The caller is responsible for allocating space for the resulting ndarray.