need help with class of arrays which have attibutes

Rob rob at pythonemproject.com
Fri Dec 28 22:46:52 EST 2001


Emile van Sebille wrote:
> 
> "Rob" <roblytle at ieee.org> wrote in message
> news:pan.2001.12.28.15.45.35.83.2001 at ieee.org...
> > Hi,
> >
> > I'm trying to contruct a class of arrays which have attributes.  This one
> > respresents a wire[] array which can have x,y,z etc coordinates.  I just
> > can't figure out how to do it.  Here is what I have so far:  (it uses
> > Numpy)
> <snip>
> 
> You need to review and work some with classes.  Start with section 9 in the
> tutorial http://www.python.org/doc/current/tut/node11.html and look at the
> __init__ references, which is used to initialize class instances.
> 
> HTH,
> 
> --
> 
> Emile van Sebille
> emile at fenx.com
> 
> ---------

-- 
The Numeric Python EM Project

www.pythonemproject.com


Hi Emile,  I've been reading the books and experimenting with different
kinds of classes, but it just doesn't seem possible to use an array as a
basis for a number of class attributes.  For example,
wire=conductor (i.e. class)  wire[1].x1=30  wire[2].x2=40  etc.    Rob.



More information about the Python-list mailing list