code of a function

2008-05-29 Thread Dark Wind
Hi, Is there any command in Python which gives the code for a function like just typing the name of a function (say svd) in R returns its code. Thank you -- http://mail.python.org/mailman/listinfo/python-list

Free Memory

2008-05-08 Thread Dark Wind
Hi, How can I free all the memory in python by deleting all variables. I am looking for the equivalent of 'clear' from Matlab. I know del x deletes a variable x, but it doesn't free all the available memory. Thank you -- http://mail.python.org/mailman/listinfo/python-list

Dimensions of Arrays, Matrices

2008-03-26 Thread Dark Wind
Hi, Suppose we have a 3X3 matrix in Mathematica. We can get its dimensions by: Dimensions[A] = {3,3} TensorRank[A] = 2 Are there exact functions for these two in Python? Thank you -- http://mail.python.org/mailman/listinfo/python-list

what does ^ do in python

2008-03-25 Thread Dark Wind
Hi, In most of the languages ^ is used for 'to the power of'. In python we have ** for that. But what does ^ do? I could not get it just by using it ... some examples are: 1^1 returns 0 2^2 returns 0 1^4 returns 5 4^1 returns 5 3^5 returns 6 5^3 returns 6 .. just curious Thank you --