Skip to content

Commit

Permalink
Changed AttributeMatrix tuple_shape to a readonly attribute
Browse files Browse the repository at this point in the history
* Removed AttributeMatrix __len__ since it conflicts with BaseGroup
* Removed binding for base group with no function name

Signed-off-by: Jared Duffey <[email protected]>
  • Loading branch information
JDuffeyBQ authored and imikejackson committed Apr 19, 2024
1 parent 7e1502c commit daf8c13
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/Plugins/SimplnxCore/wrapping/python/simplnxpy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -836,12 +836,9 @@ 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("tuple_shape", &AttributeMatrix::getShape, "Returns the Tuple dimensions of the AttributeMatrix");
attributeMatrix.def_property_readonly("size", &AttributeMatrix::getNumTuples, "Returns the total number of tuples");

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

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

0 comments on commit daf8c13

Please sign in to comment.