[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [IMP-dev] SWIG behavior with overloaded functions



Javier Ángel Velázquez Muriel wrote:
> I have this problem when wrapping an overloaded function:
> 
>   File "test_project.py", line 85, in test_project_Z_opposite
>     result,dy,dx,angles,shift ,tolerance)
> NotImplementedError: Wrong number of arguments for overloaded function
> 'project_given_euler_angles'.
>   Possible C/C++ prototypes are:
>     IMP::em::project_given_euler_angles(IMP::em::DensityMap
> &,IMP::algebra::Matrix2D< float > &,int const,int
> const,IMP::em::EulerAnglesZYZ const &,IMP::algebra::Vector3D const
> &,double const)
>     IMP::em::project_given_euler_angles< float >(IMP::algebra::Matrix3D<
> float > &,IMP::algebra::Matrix2D< float > &,int const,int
> const,IMP::em::EulerAnglesZYZ const &,IMP::algebra::Vector3D const
> &,double const)
> 
> Although the program complains about a wrong number of arguments, it is
> correct. I guess that the problem comes from overloading the function.

Actually, SWIG is usually pretty good about this sort of thing. Are you
*sure* the types are correct? (I notice you changed some of the matrix
classes from <float> to <double> - perhaps you missed something in here.)

	Ben
-- 
                      http://salilab.org/~ben/
"It is a capital mistake to theorize before one has data."
	- Sir Arthur Conan Doyle