import numpy as np
from fastkde import fastKDE
import pylab as PP
#Generate two random variables dataset (representing 100000 pairs of datapoints)
N = 2 * 10**5
var1 = np.array(50*np.random.normal(size=N) + 0.1)
var2 = np.array(0.01*np.random.normal(size=N) - 300)
#Do the self-consistent density estimate
myPDF,axes = fastKDE.pdf(var1,var2)
I get this error
ValueError: inputArray does not appear to be array like. Error was: Buffer dtype mismatch, expected 'intp_t' but got 'long'
What is intp_t data type? How do I correct this??? Am new to Python.
On line numbers, etc. attached is the 2 page output of my jupyter notebook: Jupyter notebook output:
int-_terror suggests it's rather buried in thepdffunction. What doesfastKDE.pdfaccept as inputs? Your 2 variables are float arrays. - hpauljpip install --upgrade fastkde. - fukanchiknp.arraywrapper onvar1/2, but I don't think that matters (it's not needed). I'd suggest running their example exactly, and then ask the developers if you still have problems. And change tags if there is one for this package. And run it in regular terminal or Ipython session, just to make sure the notebook iterface isn't in the way. - hpaulj