We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5ddeb97 commit 87fdd11Copy full SHA for 87fdd11
arrayfire/library.py
@@ -531,14 +531,20 @@ def set_backend(name, unsafe=False):
531
If False, does not switch backend if current backend is not unified backend.
532
"""
533
if (backend.is_unified() == False and unsafe == False):
534
- raise RuntimeError("Can not change backend after loading %s" % name)
+ raise RuntimeError("Can not change backend to %s after loading %s" % (name, backend.name()))
535
536
if (backend.is_unified()):
537
safe_call(backend.get().af_set_backend(backend.get_id(name)))
538
else:
539
backend.set_unsafe(name)
540
return
541
542
+def get_backend():
543
+ """
544
+ Return the name of the backend
545
546
+ return backend.name()
547
+
548
def get_backend_id(A):
549
550
Get backend name of an array
0 commit comments