On Mar 26, 2:41 pm, Pavol Juhas wrote:
> This has nothing to do with numpy, the issue is the string "%"
> operator
> cannot convert list to a float (Line 3 in your example gives a list).
> In '"%f" % x' the x has to be a number or tuple.
>
> Does not work:
> print "%f" % [1.0]
Yes that helps.
Hi,
why does
from numpy import *
a=array([.2])
print map(type,map(float,a))
print "%f"%map(float,a)
give :TypeError: float argument required
This is confusing because line 3 returns [].
This is on python 2.5.2 and numpy 1.2.1.
Roland
--
http://mail.python.org/mailman/listinfo/python-list