From 1484f9128e3465285544823fa0f0ef0b12c0ff97 Mon Sep 17 00:00:00 2001 From: "per.andreas.brodtkorb" Date: Mon, 22 Nov 2010 13:23:57 +0000 Subject: [PATCH] Updated example in TKDE --- pywafo/src/wafo/kdetools.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pywafo/src/wafo/kdetools.py b/pywafo/src/wafo/kdetools.py index 6fe3761..42f28ad 100644 --- a/pywafo/src/wafo/kdetools.py +++ b/pywafo/src/wafo/kdetools.py @@ -103,12 +103,12 @@ class TKDE(object): ... 1.09547561, 1.01671133, 0.73211143, 0.61891719, 0.75903487, ... 1.8919469 , 0.72433808, 1.92973094, 0.44749838, 1.36508452]) - >>> x = np.linspace(0, max(data.ravel()) + 1, 10) - >>> kde = wk.TKDE(data, hs=0.5, alpha=0.5, L2=0.5) + >>> x = np.linspace(0.01, max(data.ravel()) + 1, 10) + >>> kde = wk.TKDE(data, hs=0.5, L2=0.5) >>> f = kde(x) >>> f - array([ 0.0541248 , 0.16555235, 0.33084399, 0.45293325, 0.48345808, - 0.48345808, 0.45293325, 0.33084399, 0.16555235, 0.0541248 ]) + array([ 1.03982714, 0.45839018, 0.39514782, 0.32860602, 0.26433318, + 0.20717946, 0.15907684, 0.1201074 , 0.08941027, 0.06574882]) import pylab as plb h1 = plb.plot(x, f) # 1D probability density plot