From c7a64a72ff0e24dc2b065807caa2a825c3505b06 Mon Sep 17 00:00:00 2001 From: Michael Jackson Date: Wed, 17 Apr 2024 15:35:20 -0400 Subject: [PATCH] ENH: Expose getShape, getNumTuples from AttributeMatrix Signed-off-by: Michael Jackson --- src/Plugins/SimplnxCore/wrapping/python/simplnxpy.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Plugins/SimplnxCore/wrapping/python/simplnxpy.cpp b/src/Plugins/SimplnxCore/wrapping/python/simplnxpy.cpp index 6875e71b67..48174238a7 100644 --- a/src/Plugins/SimplnxCore/wrapping/python/simplnxpy.cpp +++ b/src/Plugins/SimplnxCore/wrapping/python/simplnxpy.cpp @@ -835,6 +835,11 @@ PYBIND11_MODULE(simplnx, mod) py::class_> 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"); + + baseGroup.def("", &BaseGroup::getSize); py::class_> iArray(mod, "IArray"); iArray.def_property_readonly("tuple_shape", &IArray::getTupleShape);