Opened 13 years ago
Closed 13 years ago
#2314 closed defect (fixed)
Python function block returns string to add block
Reported by: | tonyforster | Owned by: | walter |
---|---|---|---|
Priority: | Unspecified by Maintainer | Milestone: | Unspecified |
Component: | Turtleart | Version: | Unspecified |
Severity: | Unspecified | Keywords: | |
Cc: | Distribution/OS: | Unspecified | |
Bug Status: | Unconfirmed |
Description
print (1+python block(log10(100)))
gives 12.0
should give 3.0
Attachments (1)
Change History (5)
Changed 13 years ago by walter
comment:1 Changed 13 years ago by walter
comment:2 Changed 13 years ago by tonyforster
1+log10(100) = 12
1+math.log10(100) =3
thats a surprise!
V96
comment:3 Changed 13 years ago by walter
For some reason unknown to me, importing numpy is the source of this problem. I am removing the import and all is well.
Oddly, I don't know why math.log10 ever worked, since I import from math, but don't import math. Now that I removed the numpy import, you cannot use the form math.log10 any more, which is probably the behavior we want any way.
Will push the patch in v99.
comment:4 Changed 13 years ago by walter
- Resolution set to fixed
- Status changed from new to closed
This is the patch that fixed the problem:
Note: See
TracTickets for help on using
tickets.
I cannot reproduce this error. See attached image.