copy() and deepcopy() methods for PartialShape. (#14136)
* Added copy and deepcopy methods for PartialShape. * Clang format.
This commit is contained in:
committed by
GitHub
parent
256b27c381
commit
74758c0ca5
@@ -190,5 +190,16 @@ void regclass_graph_PartialShape(py::module m) {
|
||||
return "<PartialShape: " + py::cast(self).attr("__str__")().cast<std::string>() + ">";
|
||||
});
|
||||
|
||||
shape.def("__copy__", [](const ov::PartialShape& self) -> ov::PartialShape {
|
||||
return ov::PartialShape(self);
|
||||
});
|
||||
|
||||
shape.def(
|
||||
"__deepcopy__",
|
||||
[](const ov::PartialShape& self, py::dict) -> ov::PartialShape {
|
||||
return ov::PartialShape(self);
|
||||
},
|
||||
"memo");
|
||||
|
||||
shape.def("to_string", &ov::PartialShape::to_string);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user