title: Save (pickle) Scipy KDE
body: <p>How can I pickle or save a scipy kde for later use? </p>
  
  <pre><code>import scipy.stats as scs
  from sklearn.externals import joblib
  
  kde = scs.gaussian_kde(data, bw_method=.15)
  joblib.dump(kde, 'test.pkl')
  </code></pre>
  
  <p>I tried above and received this error:</p>
  
  <pre><code>PicklingError: Can't pickle &lt;function gaussian_kde.set_bandwidth.&lt;locals&gt;.&lt;lambda&gt; at 0x1a5b6fb7b8&gt;: it's not found as scipy.stats.kde.gaussian_kde.set_bandwidth.&lt;locals&gt;.&lt;lambda&gt;
  </code></pre>