@@ -724,25 +724,53 @@ void CoefficientClasses(py::module &m) {
724724 Returns
725725 -------
726726 numpy.ndarray
727- complex-valued matrix as a NumPy array of complex values
727+ complex-valued matrix as a flattened NumPy array of complex values
728728
729729 See also
730730 --------
731731 setCoefs : read-write access to Coefs
732732 )" )
733- .def (" setCoefs" , &CoefStruct::setCoefs,
733+ .def (" setCoefs" , // Member function overload
734+ static_cast <void (CoefStruct::*)(Eigen::VectorXcd&)>(&CoefStruct::setCoefs),
735+ py::arg (" mat" ),
736+ R"(
737+ Set the coefficient matrix with the coefficient vector in the same form as returned
738+ by getCoefs
739+
740+ Parameters
741+ ----------
742+ mat : numpy.ndarray
743+ Flattened array of coefficients
744+
745+ Returns
746+ -------
747+ None
748+
749+ Notes
750+ -----
751+ The rank data array must match the rank of the CoefStruct. Use getCoefs to create
752+ such an array with the correct rank.
753+
754+ See also
755+ --------
756+ getCoefs : read-only access to Coefs
757+ )" )
758+ .def (" setCoefs" , // Member function overload
759+ static_cast <Eigen::Ref<Eigen::VectorXcd>(CoefStruct::*)()>(&CoefStruct::setCoefs),
734760 R"(
735761 Read-write access to the underlying data store
736762
737763 Returns
738764 -------
739765 numpy.ndarray
740- complex-valued matrix represented as a NumPy array of complex values
766+ reference to a complex-valued matrix represented as a NumPy array of complex
767+ values
741768
742769 Notes
743770 -----
744- Changes made to the data array will be automatically mapped
745- back to the C++ CoefStruct instance.
771+ Changes made to the data array will be automatically mapped back to the C++
772+ CoefStruct instance. You may use the setCoefs(array) call to set the data array
773+ directly.
746774
747775 See also
748776 --------
0 commit comments