Re: [Numpy-discussion] Classes as records within an numpy array

2011-04-10 Thread David Crisp
On Mon, Apr 11, 2011 at 1:17 PM, David Crisp wrote: > On Mon, Apr 11, 2011 at 11:00 AM, Sturla Molden wrote: >> Den 11.04.2011 02:01, skrev David Crisp: >>> Can anybody guide me through this problem? I dont know how acceptable it is to answer your own question :P here goes:

Re: [Numpy-discussion] Classes as records within an numpy array

2011-04-10 Thread David Crisp
On Mon, Apr 11, 2011 at 11:00 AM, Sturla Molden wrote: > Den 11.04.2011 02:01, skrev David Crisp: >> Can anybody guide me through this problem? >> > > You must use dtype=object for the array vegetation_matrix. I changed the line which set up the vegetation_matri

Re: [Numpy-discussion] Classes as records within an numpy array

2011-04-10 Thread David Crisp
On Mon, Apr 11, 2011 at 11:00 AM, Sturla Molden wrote: > Den 11.04.2011 02:01, skrev David Crisp: >> Can anybody guide me through this problem? >> > > You must use dtype=object for the array vegetation_matrix. Thank you. This seemed to remove the error I was havi

[Numpy-discussion] Classes as records within an numpy array

2011-04-10 Thread David Crisp
I am trying to make a class a record within a numpy array. The piece of code I am working on has the following class within it: class Record: def __init__(self): self.count = 0 self.level = 0 self.list = [] self.max = None

[Numpy-discussion] Matrix to Array Transformation assistance required

2011-04-03 Thread David Crisp
Hello, I am trying to convert a numpy matrix to an array containing coordinate pairs, and I am having difficulty understanding the transformation process. I know there is a fairly simply way of doing this transformation but am unsure of the commands to use. The matrix I have is created with th