MaxManus Messages 268 Reaction score 1 Thread starter Sep 26, 2008 #1 How do you make an arrey out of this list? for X, H in zip(xarrey,harrey): print "%.2f %.5f" % (X,H)
chroot Staff Emeritus Science Advisor Gold Member Messages 10,270 Reaction score 45 Sep 26, 2008 #2 Can you give me a more detailed explanation? I don't know what list you're talking about, or what you mean by "making an array" out it. Python doesn't have "arrays," it has lists. - Warren
Can you give me a more detailed explanation? I don't know what list you're talking about, or what you mean by "making an array" out it. Python doesn't have "arrays," it has lists. - Warren
MaxManus Messages 268 Reaction score 1 Sep 27, 2008 #3 from scitools.all import * def h(x): return (1/(sqrt(2*pi)))*e**-(0.5*x**2) xarray = linspace(-4,4,10) x = xarray harrey = zeros(len(xarrey)) for i in xrange(len(xarray)): harrey = h(x) for X, H in zip(xarray,harray): print "%.2f %.5f" % (X,H)
from scitools.all import * def h(x): return (1/(sqrt(2*pi)))*e**-(0.5*x**2) xarray = linspace(-4,4,10) x = xarray harrey = zeros(len(xarrey)) for i in xrange(len(xarray)): harrey = h(x) for X, H in zip(xarray,harray): print "%.2f %.5f" % (X,H)