GeezerVison is showing github.com — Functions to check if arrayfire has imageio and lapack support · arrayfire/arrayfire-python@a9be255
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: arrayfire/image.py +9Lines changed: 9 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -208,6 +208,7 @@ def transform(image, trans_mat, odim0 = 0, odim1 = 0, method=INTERP.NEAREST, is_ |
208 | 208 | method.value, is_inverse)) |
209 | 209 | return output |
210 | 210 |
|
| 211 | + |
211 | 212 | def rotate(image, theta, is_crop = True, method = INTERP.NEAREST): |
212 | 213 | """ |
213 | 214 | Rotate an image. |
@@ -1154,3 +1155,11 @@ def rgb2ycbcr(image, standard=YCC_STD.BT_601): |
1154 | 1155 | out = Array() |
1155 | 1156 | safe_call(backend.get().af_rgb2ycbcr(ct.pointer(out.arr), image.arr, standard.value)) |
1156 | 1157 | return out |
| 1158 | + |
| 1159 | +def is_image_io_available(): |
| 1160 | + """ |
| 1161 | + Function to check if the arrayfire library was built with Image IO support. |
| 1162 | + """ |
| 1163 | + res = ct.c_bool(False) |
| 1164 | + safe_call(backend.get().af_is_image_io_available(ct.pointer(res))) |
| 1165 | + return res.value |
Collapse file
Copy file name to clipboardExpand all lines: arrayfire/lapack.py +8Lines changed: 8 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -408,3 +408,11 @@ def svd_inplace(A): |
408 | 408 | safe_call(backend.get().af_svd_inplace(ct.pointer(U.arr), ct.pointer(S.arr), ct.pointer(Vt.arr), |
409 | 409 | A.arr)) |
410 | 410 | return U, S, Vt |
| 411 | + |
| 412 | +def is_lapack_available(): |
| 413 | + """ |
| 414 | + Function to check if the arrayfire library was built with lapack support. |
| 415 | + """ |
| 416 | + res = ct.c_bool(False) |
| 417 | + safe_call(backend.get().af_is_lapack_available(ct.pointer(res))) |
| 418 | + return res.value |