[Tutor] Python's OOP-Inheritance make me confuse.

2013-01-18 Thread Moore John
Hi, I am new to Python language. I have only 10 days experience on it. When I start learning there is no difficult, but it make me slow down when I reach "Object Oriented Concept", especially "Inherited". Some of my background knowledge about "Inherited is the child class can get all of characteris

Re: [Tutor] HELP- Regarding working with python

2013-01-18 Thread bob gailer
On 1/18/2013 8:03 AM, eryksun wrote: Yes, it's a mistake in the PCA example from the docs: http://mlpy.sourceforge.net/docs/3.5/dim_red.html#principal-component-analysis-pca There seems to be no way to report a bug in that documentation! Or am I missing something? -- Bob Gailer 919-636-4239 C

Re: [Tutor] list of references to object properties

2013-01-18 Thread Alan Gauld
On 18/01/13 11:11, Jose Amoreira wrote: Suppose I have a list l_obj of similar objects. Is there any way I can generate a list l_prp of references to a given property of those objects in such a way that, if change the value of one element in l_prp, the corresponding object in l_obj gets its prop

Re: [Tutor] sqlite search syntax

2013-01-18 Thread Prasad, Ramit
Roger Shaw wrote: > > Hello, > I am very new to python. > > Wrote a small program to use on my android phone using pickle/shelve to > access data. > > That worked fine but i realised it would be better to use sqlite as a > database to more easily modify the data. > > I havent got a clue about

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-18 Thread Albert-Jan Roskam
>> Thanks for your replies. os.putenv() may be easier than os.environ because, >> hopefully, it takes care of the OS-specific separators of the values >> (";" for Windows, ":" for Linux, others I don't > know > > I wouldn't count on it. Support for changing environment variables on the > fl

[Tutor] sqlite search syntax

2013-01-18 Thread Roger Shaw
Hello, I am very new to python. Wrote a small program to use on my android phone using pickle/shelve to access data. That worked fine but i realised it would be better to use sqlite as a database to more easily modify the data. I havent got a clue about sqlite, have a book but cant find

Re: [Tutor] HELP- Regarding working with python

2013-01-18 Thread eryksun
On Fri, Jan 18, 2013 at 3:25 AM, Lie Ryan wrote: > On 18/01/13 17:11, Gayathri S wrote: >> >> >>> import numpy as np >> >>> import matplotlib.pyplot as plt >> >>> import mlpy >> >>> np.random.seed(0) >> >>> mean,cov,n=[0,0],[[1,1],[1,1.5]],100 >> >>> x=np.random.multivariate_normal(mean,cov,

Re: [Tutor] list of references to object properties

2013-01-18 Thread Jose Amoreira
Thanks, Peter. I was trying to avoid the regenerate step for updating. But maybe I can restructure my code and objects to make this simpler. Before that I'll try this view approach. Thanks again Ze On Fri, Jan 18, 2013 at 11:37 AM, Peter Otten <__pete...@web.de> wrote: > Jose Amoreira wrote: > >

Re: [Tutor] list of references to object properties

2013-01-18 Thread Peter Otten
Jose Amoreira wrote: > Hello > Suppose I have a list l_obj of similar objects. Is there any way I can > generate a list l_prp of references to a given property of those objects > in such a way that, if change the value of one element in l_prp, the > corresponding object in l_obj gets its property

[Tutor] list of references to object properties

2013-01-18 Thread Jose Amoreira
Hello Suppose I have a list l_obj of similar objects. Is there any way I can generate a list l_prp of references to a given property of those objects in such a way that, if change the value of one element in l_prp, the corresponding object in l_obj gets its property updated, and vice-versa? Let giv

Re: [Tutor] HELP- Regarding working with python

2013-01-18 Thread Lie Ryan
On 18/01/13 17:11, Gayathri S wrote: hi... I am using principal component analysis for dimensionality reduction in python. am having this following error... >>> import numpy as np >>> import matplotlib.pyplot as plt >>> import mlpy >>> np.random.seed(0) >>> mean,cov,n=[0,0],[[1,1]

Re: [Tutor] HELP- Regarding working with python

2013-01-18 Thread Marc Tompkins
On Thu, Jan 17, 2013 at 10:11 PM, Gayathri S wrote: > >>> import numpy as np > >>> import matplotlib.pyplot as plt > >>> import mlpy > >>> np.random.seed(0) > >>> mean,cov,n=[0,0],[[1,1],[1,1.5]],100 > >>> x=np.random.multivariate_normal(mean,cov,n) > >>> pca.learn(x) > Traceback (most recent call