some code fixes

This commit is contained in:
2017-11-27 10:26:03 +01:00
parent 82f40834ea
commit 4e17882dd5
3 changed files with 28 additions and 16 deletions

View File

@@ -11,7 +11,7 @@ def kerneldensity(data, xmin, xmax, sigma=1.0) :
dx = 0.05*sigma
xg = np.arange(-4.0*sigma, 4.0*sigma + 0.5*dx, dx)
gauss = np.exp(-0.5*xg*xg/sigma/sigma)/np.sqrt(2.0*np.pi)/sigma
ng = len(gauss)/2
ng = len(gauss)//2
x = np.arange(xmin, xmax+0.5*dx, dx)
kd = np.zeros(len(x))
for xd in data: