Re: How to get all the variables in a python shell

2008-05-31 Thread caca
Have you seen this page? http://matplotlib.sourceforge.net/screenshots.html On watching this, I wouldn't say matplotlib is inferior to matlab plotting. Also, I don't know what they use in sage, but they have 3D plots of surfaces that you can rotate with the mouse. Do as you like, but if

Re: How to get all the variables in a python shell

2008-05-31 Thread caca
I meant it prints 4, which means the value of test is modified by the access to the dict > test=5 > __IPYTHON__.user_ns['test']=4 > print test #prints 4 > -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get all the variables in a python shell

2008-05-30 Thread caca
Your project interests me. Actually I was thinking about doing the same. I hadn't worked on it at all, but I though about it and had the idea about reading the session namespace directly, which I though would be stored in the __dict__ attribute of something. After reading your post, I have bee

Re: fastest method to choose a random element

2008-01-07 Thread caca
> Just for fun, I profiled my answer versus the final answer... This mailing list is awesome! PS:ajaksu, I have to leave now, I hope bukzor's answer was enough to you (at least for the moment) -- http://mail.python.org/mailman/listinfo/python-list

Re: Request for help with Image color space conversion

2008-01-06 Thread caca
> > ...where the image data is loaded into a numpy array > (1600x1200x3)... One comment: that is a big array, too big for the cache memory. I know that in these cases it makes a difference how many times the slices of the array are loaded and unloaded from RAM onto cache. One issue is that a 2D a

Re: fastest method to choose a random element

2008-01-05 Thread caca
On Jan 5, 9:50 pm, Paul Hankin <[EMAIL PROTECTED]> wrote: > On Jan 5, 5:12 pm, Paul Hankin <[EMAIL PROTECTED]> wrote: > > > > > On Jan 5, 4:14 pm, [EMAIL PROTECTED] wrote: > > > > On Jan 5, 5:07 pm, [EMAIL PROTECTED] wrote: > > > > > Hello, Paul and Arnaud. > > > > While I think about your answers:

Re: fastest method to choose a random element

2008-01-05 Thread caca
On Jan 5, 5:07 pm, [EMAIL PROTECTED] wrote: > Hello, Paul and Arnaud. > While I think about your answers: do you think there is any way to > avoid shuffle? > It may take unnecessary long on a long list most of whose elements > have the property. Umm... You provide nice answers in the case many ele

Re: fastest method to choose a random element

2008-01-05 Thread caca
Hello, Paul and Arnaud. While I think about your answers: do you think there is any way to avoid shuffle? It may take unnecessary long on a long list most of whose elements have the property. -- http://mail.python.org/mailman/listinfo/python-list

Re: fastest method to choose a random element

2008-01-05 Thread caca
> Caching might help. > > If random_pick is called several times with the same list(s) then > cache the result of > [property(i) for i in a_list] against a_list. > > If random_pick is called several times with list(s) with multiple > instances of list items then cache > property(i) against i for

fastest method to choose a random element

2008-01-04 Thread caca
Hello, This is a question for the best method (in terms of performance only) to choose a random element from a list among those that satisfy a certain property. This is the setting: I need to pick from a list a random element that satisfies a given property. All or none of the elements may h