Skip to content

Commit

Permalink
ENH: Expose getShape, getNumTuples from AttributeMatrix
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Jackson <[email protected]>
  • Loading branch information
imikejackson committed Apr 17, 2024
1 parent a640bf2 commit c7a64a7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Plugins/SimplnxCore/wrapping/python/simplnxpy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,11 @@ PYBIND11_MODULE(simplnx, mod)

py::class_<AttributeMatrix, BaseGroup, std::shared_ptr<AttributeMatrix>> attributeMatrix(mod, "AttributeMatrix");
attributeMatrix.def("resize_tuples", &AttributeMatrix::resizeTuples, "Resize the tuples with the given shape");
attributeMatrix.def("tuple_shape", &AttributeMatrix::getShape, "Returns the Tuple dimensions of the AttributeMatrix");
attributeMatrix.def("__len__", &AttributeMatrix::getNumTuples, "Returns the total number of tuples");
attributeMatrix.def_property_readonly("size", &AttributeMatrix::getNumTuples, "Returns the total number of tuples");

Check failure on line 840 in src/Plugins/SimplnxCore/wrapping/python/simplnxpy.cpp

View workflow job for this annotation

GitHub Actions / clang_format_pr

code should be clang-formatted [-Wclang-format-violations]

baseGroup.def("", &BaseGroup::getSize);

py::class_<IArray, DataObject, std::shared_ptr<IArray>> iArray(mod, "IArray");
iArray.def_property_readonly("tuple_shape", &IArray::getTupleShape);
Expand Down

0 comments on commit c7a64a7

Please sign in to comment.