From: rwgk_at_[hidden]
Date: 2000-10-20 19:44:41


I am trying to expose this member function to Python:

  void UnitCell::set_len(const double Len[3]) {
    for (int i = 0; i < 3; i++) this->Len[i] = Len[i];
  }

This is my idea for the hook in the module init function:

    UnitCell_class.def(&UCTbx::UnitCell::set_len, "set_len");

The compiler spits out a very verbose error message starting
with:

cxx: Error: ../py_cpp/caller.h, line 275: #304 no instance of
          overloaded function "py::from_python" matches the argument
list
            argument types are: (PyObject *, py::Type<const double *>)

Of course, I really want to get the three floating point values
from a Python tuple (or list). Is this possible? How?

I also noticed that there are several places where a maximum of five
arguments is hardwired. What would be involved in increasing the
number of arguments (I need at least six), or removing the
limitation altogether?

Thanks in advance!
        Ralf