We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 27051e5 + 65aa671 commit 3648ef5Copy full SHA for 3648ef5
dpnp/dpnp_utils/dpnp_algo_utils.pyx
@@ -76,9 +76,9 @@ cdef ERROR_PREFIX = "DPNP error:"
76
77
78
def convert_item(item):
79
- if getattr(item, "__sycl_usm_array_interface__", False):
+ if hasattr(item, "__sycl_usm_array_interface__"):
80
item_converted = dpnp.asnumpy(item)
81
- elif getattr(item, "__array_interface__", False): # detect if it is a container (TODO any better way?)
+ elif hasattr(item, "__array_interface__"): # detect if it is a container (TODO any better way?)
82
mod_name = getattr(item, "__module__", 'none')
83
if (mod_name != 'numpy'):
84
0 commit comments