Skip to content

Commit 3a91f2a

Browse files
author
kmcgrie
authored
[Fix] [Array API] Raise AttributeError for non-homogen tables in __sycl_usm_array_interface__ to comply with Python interop expectations (#2640)
* returns false as intended instead of throwing an error. * Fixed formatting issue.
1 parent 056fdea commit 3a91f2a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

onedal/datatypes/sycl_usm/data_conversion.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ py::dict construct_sua_iface(const dal::table& input) {
156156
// for constructing DPCTL usm_ndarray or DPNP ndarray with zero-copy on python level.
157157
const auto kind = input.get_kind();
158158
if (kind != dal::homogen_table::kind())
159-
report_problem_to_sua_iface(": only homogen tables are supported");
159+
throw py::attribute_error(
160+
"__sycl_usm_array_interface__ not available: only homogen tables are supported");
160161

161162
const auto& homogen_input = reinterpret_cast<const dal::homogen_table&>(input);
162163

0 commit comments

Comments
 (0)