Lookup(hash) an Array using another Array Given a dimension `seq_dim`, `indices` are lookedup in `input` and returned as a new Array if found
(input: &Array<T>, indices: &Array<I>, seq_dim: i32)
| 465 | /// Given a dimension `seq_dim`, `indices` are lookedup in `input` and returned as a new |
| 466 | /// Array if found |
| 467 | pub fn lookup<T, I>(input: &Array<T>, indices: &Array<I>, seq_dim: i32) -> Array<T> |
| 468 | where |
| 469 | T: HasAfEnum, |
| 470 | I: HasAfEnum + IndexableType, |
| 471 | { |
| 472 | unsafe { |
| 473 | let mut temp: af_array = std::ptr::null_mut(); |
| 474 | let err_val = af_lookup( |
| 475 | &mut temp as *mut af_array, |
| 476 | input.get() as af_array, |
| 477 | indices.get() as af_array, |
| 478 | seq_dim as c_uint, |
| 479 | ); |
| 480 | HANDLE_ERROR(AfError::from(err_val)); |
| 481 | temp.into() |
| 482 | } |
| 483 | } |
| 484 | |
| 485 | /// Assign(copy) content of an Array to another Array indexed by Sequences |
| 486 | /// |
nothing calls this directly
no test coverage detected