Hello,
I am trying to use a piece of code in JMP 18, but I am not sure I understand how it works. I install the pythonn packages at the very beginning, then I send my variables to Python and run the Python code. But I always get one of the following errors: Either it does not detect numpy, even though numpy is installed, or it no longer detects the variable I just sent.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
lstMeasures = Column( dt, "height" ) << Get As Matrix();
Python Install Packages( "numpy pandas scipy" );
Python Send( lstMeasures );
Python Submit(
"
import numpy as np
from scipy.stats import kstest, norm, weibull_min, rayleigh
data = np.array(lstMeasures)
# Fit des lois
mu, sigma = norm.fit(data)
ks_norm = kstest(data, 'norm', args=(mu, sigma))
c, loc, scale = weibull_min.fit(data)
ks_weibull = kstest(data, 'weibull_min', args=(c, loc, scale))
loc_r, scale_r = rayleigh.fit(data)
ks_rayleigh = kstest(data, 'rayleigh', args=(loc_r, scale_r))
"
);
ks_norm = Python Get( ks_norm );
ks_weibull = Python Get( ks_weibull );
ks_rayleigh = Python Get( ks_rayleigh );

