Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 8fa1e4296360f3be1a3b549c79f675b4 > files > 1005

numpy-1.4.1-6.fc14.x86_64.rpm

>>> import foo
>>> foo.calculate(range(5), lambda x: x*x)
array([  0.,   1.,   4.,   9.,  16.])
>>> import math
>>> foo.calculate(range(5), math.exp)
array([  1.        ,   2.71828175,   7.38905621,  20.08553696,  54.59814835])