I guess there is no way in Python of emulating Matlab"s
>> detection of the number of output arguments.
> I just got a response from c.l.p. Somebody remembered
> seeing this at ASPN:
> Finding out the number of values the caller is expecting « Python recipes « ActiveState Code
> expecting() is the workhorse, equivalent to Matlab's
> nargout:
> import inspect,dis
Hi Darren,
Wow, I didn't know this was possible in python. Does it work under
python2.2?
Perhaps you would like to write up nargin and nargout function with
some doc strings and send them my way? I could add them to the matlab
interface. But we need to make sure they are 2.2 compliant.
As an aside, do we need nargout to make "find" work like matlab's?
Isn't it enough just to check the shape of the input array and
processing it one way for 1D arrays and another way for 2D arrays?
Cheers,
JDH