Re: Objects in Python

2012-08-23 Thread Jan Kuiken
rong with having six variables called 'q'. Sometimes you don't want only six variables called 'q' but a hundred of them :-) def fac(q): if q < 1 : return 1 else: return q * fac(q-1) print(fac(100)) Jan Kuiken -- http://mail.python.org/mailman/listinfo/python-list

Re: Objects in Python

2012-08-23 Thread Jan Kuiken
ent. btw. I like the idea of simultaneously instantiation :-) Jan Kuiken -- http://mail.python.org/mailman/listinfo/python-list

Re: ctypes - python2.7.3 vs python3.2.3

2012-08-29 Thread Jan Kuiken
ain, i'm not very familiar with ctypes) Jan Kuiken -- http://mail.python.org/mailman/listinfo/python-list

Re: functions which take functions

2012-04-12 Thread Jan Kuiken
mind. Jan Kuiken -- http://mail.python.org/mailman/listinfo/python-list

Re: Help doing it the "python way"

2012-05-29 Thread Jan Kuiken
g like this (copied from an IPython shell, could be shorter) Regards, Jan Kuiken In [1]: first_list = np.arange(0, 10).reshape((5,2)) In [2]: above = np.array([0,-1]) In [3]: below = np.array([0,+1]) In [4]: N,d = first_list.shape In [5]: second_list = np.empty((N*2,d)) In [6]: second_lis