<?xml  version="1.0" ?><html>
<head>
<title></title>
</head>
<body>
<div align="left"><font face="Arial"><span style="font-size:10pt">On 9 May 2005 at 8:33, Joachim Saul wrote:</span></font></div>
<div align="left"><br/>
</div>
<div align="left"><font face="Arial" color="#7f0000"><span style="font-size:10pt">&gt; * George Sakkis [2005-05-08 21:00]:</span></font></div>
<div align="left"><font face="Arial" color="#7f0000"><span style="font-size:10pt">&gt; &gt; cdef class MyVector(ArrayType):</span></font></div>
<div align="left"><font face="Arial" color="#7f0000"><span style="font-size:10pt">&gt; &gt;&#160;&#160;&#160;&#160; pass</span></font></div>
<div align="left"><font face="Arial" color="#7f0000"><span style="font-size:10pt">&gt; &gt;</span></font></div>
<div align="left"><font face="Arial" color="#7f0000"><span style="font-size:10pt">&gt; &gt; # seg fauls</span></font></div>
<div align="left"><font face="Arial" color="#7f0000"><span style="font-size:10pt">&gt; &gt; v = Vector((1,2))</span></font></div>
<div align="left"><font face="Arial" color="#7f0000"><span style="font-size:10pt">&gt; &gt;</span></font></div>
<div align="left"><font face="Arial" color="#7f0000"><span style="font-size:10pt">&gt; &gt; Can anyone show the simplest working subclass of PyArrayObject ?</span></font></div>
<div align="left"><font face="Arial" color="#7f0000"><span style="font-size:10pt">&gt; </span></font></div>
<div align="left"><font face="Arial" color="#7f0000"><span style="font-size:10pt">&gt; To the best of my knowledge you can't subclass Numeric arrays in</span></font></div>
<div align="left"><font face="Arial" color="#7f0000"><span style="font-size:10pt">&gt; Python and as Greg said, if not in Python you can't do so in Pyrex</span></font></div>
<div align="left"><font face="Arial" color="#7f0000"><span style="font-size:10pt">&gt; either. This has been a subject of intense discussion amongst the</span></font></div>
<div align="left"><font face="Arial" color="#7f0000"><span style="font-size:10pt">&gt; developers and users of Numeric, and apart from some &quot;historical&quot;</span></font></div>
<div align="left"><font face="Arial" color="#7f0000"><span style="font-size:10pt">&gt; reasons there are some good technical reasons *not* to support</span></font></div>
<div align="left"><font face="Arial" color="#7f0000"><span style="font-size:10pt">&gt; subclassing of Numeric arrays.</span></font></div>
<div align="left"><font face="Arial" color="#7f0000"><span style="font-size:10pt">&gt; </span></font></div>
<div align="left"><font face="Arial"><span style="font-size:10pt">This is just an aside, but a numarray array can be subclassed:</span></font></div>
<div align="left"><br/></div>
<div align="left"><font face="Arial" color="#7f0000"><span style="font-size:10pt">Python 2.3.3 (#51, Jan 27 2004, 16:30:16) [MSC v.1200 32 bit (Intel)] on win32</span></font></div>
<div align="left"><font face="Arial" color="#7f0000"><span style="font-size:10pt">Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for 
more information.</span></font></div>
<div align="left"><font face="Arial" color="#7f0000"><span style="font-size:10pt">&gt;&gt;&gt; import numarray</span></font></div>
<div align="left"><font face="Arial" color="#7f0000"><span style="font-size:10pt">&gt;&gt;&gt; class MyArray(numarray.ArrayType): pass</span></font></div>
<div align="left"><font face="Arial" color="#7f0000"><span style="font-size:10pt">...</span></font></div>
<div align="left"><font face="Arial" color="#7f0000"><span style="font-size:10pt">&gt;&gt;&gt;</span></font></div>
<div align="left"><br/>
</div>
<div align="left"><font face="Arial"><span style="font-size:10pt">Lenard Lindstrom</span></font></div>
<div align="left"><font face="Arial"><span style="font-size:10pt">&lt;len-l@telus.net&gt;</span></font></div>
<div align="left"></div>
</body>
</html>