Bill Spotz wrote:
> I think I see a bug in lib.user_array.container class.  The __eq__  
> method is
> 
>      def __eq__(self,other): return self._rc(equal(self.array,other))
> 
> the expression equal(self.array,other) will return an ndarray of  
> bools, which is then converted, by way of self._rc(), to whatever the  
> derived class is.  In my case, this does not make sense, because an  
> array of bools is not a valid argument to the constructor (actually,  
> the data buffer is accepted, but the results are not reliable).  What  
> I want, and it seem most people would want in this situation, is just  
> the array of bools; i.e. don't apply the self._rc() method.

No, it's not a bug. It's just the design of that class: always return the same 
class of object. Of course, since that class only exists to be subclassed, if 
you need different behavior from those methods, override them.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to