On 23 May 2007 11:31:56 -0700, Mangabasi <[EMAIL PROTECTED]> wrote:
> When I modified this to:
>
> class Point(list):
>     def __init__(self,x,y):
>         super(Point, self).__init__([x, y])
>         self.x = x
>         self.y = y
>
> It worked.

Are you sure?
>>> p = Point(10, 20)
>>> p
[10, 20]
>>> p.x
10
>>> p.x = 15
>>> p
[10, 20]
>>> p[0]
10
>>> p.x
15
>>>

That doesn't look like what you were asking for in the original post.
I'm afraid I don't know anything about numpy arrays or what special
attributes an object may need to be put into a numpy array though.

-- 
Jerry
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to