Thanks for the hint!
The follwing works:
%typecheck(SWIG_TYPECHECK_DOUBLE_ARRAY)
float[ANY], double[ANY],
float const[ANY], double const [ANY]
{
// check for sequenze and length
$1 = ( PySequence_Check($input) || (PyObject_Length($input)
!=$1_dim0) ) ? 1 : 0;
}
Zitat von Bob Hood <
bhood2@...>:
> On 2/23/2012 6:01 AM, Gerald Schweighofer wrote:
>> it seems that overloading with a double and a double array is not
>> supported ?
>> e.g.:
>>
>> void test(double erg[2]);
>> void test(double e);
> [...]
>> --------------------------------------------------
>> Here is my test.i file:
>
>
> I don't see any typecheck's defined in that interface file for your
> overloaded
> functions. See the documentation for an explanation.
>
>
>
> Render me gone, |||
> Bob ^(===)^
> ---------------------------------oOO--(_)--OOo---------------------------------
> I'm not so good with advice...can I interest you in a sarcastic comment?
>
>
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
>
http://www.accelacomm.com/jaw/sfnl/114/51521223/> _______________________________________________
> Swig-user mailing list
>
Swig-user@...
>
https://lists.sourceforge.net/lists/listinfo/swig-user------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/_______________________________________________
Swig-user mailing list
Swig-user@...
https://lists.sourceforge.net/lists/listinfo/swig-user