Numeric and the new division operator
Michael James Barber
mjbarber at ascc.artsci.wustl.edu
Thu Jan 3 17:25:25 CET 2002
[true division doesn't work with Numeric]
In article <Xns918BA68A2D43cliechtigmxnet at 22.214.171.124>,
Chris Liechti <cliechti at gmx.net> wrote:
>from the docs:
>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
Looking further on the Numeric site, I have also found this:
Please note that the __future__ options wrt integer division in Python
2.2 are NOT available in Numeric at this time.
I guess it's time to wait a bit longer. :(
Michael J. Barber
More information about the Python-list