[Numpy-discussion] Idea: fractional polynomial class

josef.pktd at gmail.com josef.pktd at gmail.com
Fri Apr 24 22:46:29 EDT 2009


On Fri, Apr 24, 2009 at 10:43 PM, Robert Kern <robert.kern at gmail.com> wrote:
> On Fri, Apr 24, 2009 at 21:42,  <josef.pktd at gmail.com> wrote:
>> 2009/4/24 Stéfan van der Walt <stefan at sun.ac.za>:
>>> 2009/4/24 Pauli Virtanen <pav at iki.fi>:
>>>> polyint fixed in r6883, there doesn't seem anything else to fix:
>>>>
>>>>>>> import numpy as np
>>>>>>> from fractions import Fraction
>>>>>>> a = np.poly1d([Fraction(4,19), Fraction(3,19), Fraction(2,19), 0])
>>>
>>> Very cool.  I think we should mention thi example in the docs as well?
>>>
>>
>>>>> from fractions import Fraction
>> Traceback (most recent call last):
>>  File "<pyshell#40>", line 1, in <module>
>>    from fractions import Fraction
>> ImportError: No module named fractions
>>
>> where does fractions come from?
>
> Python 2.6.
>

I should have read the details of the original message.
"Since python 2.6 introduced a "fractions" class"

I'm not so far yet.

Josef



More information about the NumPy-Discussion mailing list