Numeric and the new division operator

Michael James Barber mjbarber at ascc.artsci.wustl.edu
Thu Jan 3 11:25:25 EST 2002


[true division doesn't work with Numeric]

In article <Xns918BA68A2D43cliechtigmxnet at 62.2.16.82>,
Chris Liechti  <cliechti at gmx.net> wrote:
>
>from the docs:
>---------
>__div__(self, other) 
>__truediv__(self, other) 
>The division operator (/) is implemented by these methods. The 
>__truediv__() method is used when __future__.division is in effect, 
>otherwise __div__() is used. If only one of these two methods is defined, 
>the object will not support division in the alternate context; TypeError 
>will be raised instead.
>---------
>
>so i think they have not implemented __truediv__.
>

Ah, that would explain it.   Somehow I missed that in the docs -- too 
focused on finding something related to Numeric, I guess.  Thanks for 
clarifying that.

Looking further on the Numeric site, I have also found this:

Version 20.3
   Please note that the __future__ options wrt integer division in Python 
2.2 are NOT available in Numeric at this time.

at <http://www.pfdubois.com/numpy/changes.txt>.

I guess it's time to wait a bit longer. :(
-- 
					Michael J. Barber



More information about the Python-list mailing list