[Mlir-commits] [llvm] [mlir] [mlir python] Port Python core code to nanobind. (PR #118583)

Peter Hawkins llvmlistbot at llvm.org
Thu Dec 12 16:20:26 PST 2024


================
@@ -708,8 +843,8 @@ class PyDenseElementsAttribute
         std::string message;
         llvm::raw_string_ostream os(message);
         os << "Expected a static ShapedType for the shaped_type parameter: "
-           << py::repr(py::cast(*explicitType));
-        throw py::value_error(message);
+           << nb::cast<std::string_view>(nb::repr(nb::cast(*explicitType)));
----------------
hawkinsp wrote:

Done.

https://github.com/llvm/llvm-project/pull/118583


More information about the Mlir-commits mailing list