Zero division error!
chris liechti
cliechti at mails.ch
Thu Aug 2 14:00:52 EDT 2001
[posted and mailed]
Prem Rachakonda <prem at engr.uky.edu> wrote in
news:Pine.LNX.4.21.0108021330570.19621-100000 at seahawk.ecc.engr.uky.edu:
> Hi,
> I am writing a script for 'cubic spline interpolation' and when there is
> a float value = 0.004, it is rounded off to zero and I am getting a
> Zero Division error. Is it a python bug?
>
> x=array([2.056, 2.06, 2.064, 2.068, 2.072, 2.076, 2.08, 2.084, 2.088,
> 2.092, 2.096, 2.1, 2.104])
you are using the array module, i dont know that but i see in the docs that
it has s specific data type. have you choosen integers as type? only type
'f' and 'd' can store decimal fractions.
--
chris <cliechti at mails.ch>
More information about the Python-list
mailing list