function with variable number of arguments

l.a.apiolaza at massey.ac.nz l.a.apiolaza at massey.ac.nz
Wed Jun 23 23:41:19 EDT 1999


Hi Pythoneers!

I want to write a function that takes a bunch of  'n' matrices (defined
using array from NumPy) and processes them further. Question: how do I
write a function with a variable number 'n' of arguments and then get
the number of arguments? I think I can put all the matrices together in
a list and then pass the list as argument, but is there another more
efficient/elegant way of doing it?

Thanks,


Luis

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Luis A. Apiolaza
IVABS
Massey University
Palmerston North
New Zealand

l.a.apiolaza at massey.ac.nz
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




More information about the Python-list mailing list