[SciPy-User] Error

Robert Kern robert.kern@gmail....
Fri Oct 22 08:11:17 CDT 2010


On Fri, Oct 22, 2010 at 06:54, Waléria Antunes David
<waleriantunes@gmail.com> wrote:
>
> The problem was solved.
> Now occurs this error:
>
> TypeError at /index/
>
> unsupported operand type(s) for ** or pow(): 'Decimal' and 'float'

When you use DecimalFields, the value you get will be a Decimal
object, not a float. You will need to use other Decimal values (e.g.
Decimal('-0.5')) in expressions with them.

  http://docs.python.org/library/decimal

In any case, this has nothing to do with numpy or scipy.

--
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


More information about the SciPy-User mailing list