Change the shape of the Array # Parameters - `input` is the input Array - `dims` is the new dimensions to which the input Array is reshaped to # Return Values Reshaped Array
(input: &Array<T>, dims: Dim4)
| 676 | /// # Return Values |
| 677 | /// Reshaped Array |
| 678 | pub fn moddims<T>(input: &Array<T>, dims: Dim4) -> Array<T> |
| 679 | where |
| 680 | T: HasAfEnum, |
| 681 | { |
| 682 | unsafe { |
| 683 | let mut temp: af_array = std::ptr::null_mut(); |
| 684 | let err_val = af_moddims( |
| 685 | &mut temp as *mut af_array, |
| 686 | input.get(), |
| 687 | dims.ndims() as c_uint, |
| 688 | dims.get().as_ptr() as *const dim_t, |
| 689 | ); |
| 690 | HANDLE_ERROR(AfError::from(err_val)); |
| 691 | temp.into() |
| 692 | } |
| 693 | } |
| 694 | |
| 695 | /// Flatten the multidimensional Array to an 1D Array |
| 696 | pub fn flat<T>(input: &Array<T>) -> Array<T> |
nothing calls this directly
no test coverage detected