| 189 | } |
| 190 | |
| 191 | array diag(const array &in, const int num, const bool extract) { |
| 192 | af_array res; |
| 193 | if (extract) { |
| 194 | AF_THROW(af_diag_extract(&res, in.get(), num)); |
| 195 | } else { |
| 196 | AF_THROW(af_diag_create(&res, in.get(), num)); |
| 197 | } |
| 198 | |
| 199 | return array(res); |
| 200 | } |
| 201 | |
| 202 | array moddims(const array &in, const unsigned ndims, const dim_t *const dims) { |
| 203 | af_array out = 0; |
no test coverage detected