af.info() in the wrong window
gul916 opened this issue · comments
Hello,
That is just a minor bug, but it can be disturbing.
When you are using spyder graphical interface in anaconda, af.info()
is not reported in spyder window but rather in the shell that started it. However, af.get_backend()
and af.get_device()
are reporting in spyder window.
Example:
import arrayfire as af
af.info()
af.get_backend()
Out[3]: 'unified'
af.get_device()
Out[4]: 0
Thanks for all your work.
@gul916 af.info()
prints to stdandard output. It doesn't return a string so it is not visible. You can use af.info_str()
which is an equivalent function to print in a notebook or spyder window.
Thank you for your quick reply. af.info_str()
works fine. All is on one line, but it is not due to arrayfire. Maybe do you know how to solve it ?
Edit : I just need to use the print function
af.info_str()
'ArrayFire v3.5.0 (CUDA 64bit)\n[0] : GeForce_GTX_780 (Compute 3.5)\n-1- : GeForce_GTX_1060_6GB (Compute 6.1)\n-2- : GeForce_GT_730 (Compute 3.5)\n'
print(af.info_str())
ArrayFire v3.5.0 (CUDA 64bit)
[0] : GeForce_GTX_780 (Compute 3.5)
-1- : GeForce_GTX_1060_6GB (Compute 6.1)
-2- : GeForce_GT_730 (Compute 3.5)
@gul916 Use print(af.info_str())
Do not rely on the repl to print it properly.
Thanks, you were faster than me !