Error while running Variogram Calculation for Subsurface Data Analytics in Python in the examples module
Calculate Sample Data Isotropic Variograms
tmin = -9999.; tmax = 9999.; lag_dist = 100.0; lag_tol = 100.0; nlag = 7; bandh = 9999.9; azi = 0; atol = 90.0; isill = 1
lag, por_sand_gamma, por_sand_npair = geostats.gamv(df_sand,"X","Y","NPor",tmin,tmax,lag_dist,lag_tol,nlag,azi,atol,bandh,isill) lag, por_shale_gamma, por_shale_npair = geostats.gamv(df_shale,"X","Y","NPor",tmin,tmax,lag_dist,lag_tol,nlag,azi,atol,bandh,isill) lag, por_gamma, por_npair = geostats.gamv(df,"X","Y","NPor",tmin,tmax,lag_dist,lag_tol,nlag,azi,atol,bandh,isill)
lag, perm_sand_gamma, perm_sand_npair = geostats.gamv(df_sand,"X","Y","NPerm",tmin,tmax,lag_dist,lag_tol,nlag,azi,atol,bandh,isill) lag, perm_shale_gamma, perm_shale_npair = geostats.gamv(df_shale,"X","Y","NPerm",tmin,tmax,lag_dist,lag_tol,nlag,azi,atol,bandh,isill) lag, perm_gamma, perm_npair = geostats.gamv(df,"X","Y","NPerm",tmin,tmax,lag_dist,lag_tol,nlag,azi,atol,bandh,isill)
plt.subplot(121) plt.plot(lag,por_gamma,'x',color = 'black',label = 'All') plt.plot(lag,por_sand_gamma,'x',color = 'orange',label = 'Sand') plt.plot(lag,por_shale_gamma,'x',color = 'brown',label = 'Shale') plt.plot([0,2000],[1.0,1.0],color = 'black') plt.xlabel(r'Lag Distance $\bf(h)$, (m)') plt.ylabel(r'$\gamma \bf(h)$') plt.title('Isotropic NSCORE Porosity Variogram') plt.xlim([0,700]) plt.ylim([0,1.8]) plt.legend(loc='upper left') plt.grid(True)
plt.subplot(122) plt.plot(lag,perm_gamma,'x',color = 'black',label = 'All') plt.plot(lag,perm_sand_gamma,'x',color = 'orange',label = 'Sand') plt.plot(lag,perm_shale_gamma,'x',color = 'brown',label = 'Shale') plt.plot([0,2000],[1.0,1.0],color = 'black') plt.xlabel(r'Lag Distance $\bf(h)$, (m)') plt.ylabel(r'$\gamma \bf(h)$') plt.title('Isotropic NSCORE Permeaiblity Variogram') plt.xlim([0,700]) plt.ylim([0,1.8]) plt.legend(loc='upper left') plt.grid(True)
plt.subplots_adjust(left=0.0, bottom=0.0, right=2.0, top=1.2, wspace=0.2, hspace=0.3) plt.show()
Trying to run this block of code and getting the following error
TypeError Traceback (most recent call last) TypeError: expected dtype object, got 'numpy.dtype[float64]'
The above exception was the direct cause of the following exception:
SystemError Traceback (most recent call last)
~/anaconda3/lib/python3.8/site-packages/geostatspy/geostats.py in gamv(df, xcol, ycol, vcol, tmin, tmax, xlag, xltol, nlag, azm, atol, bandwh, isill) 1795 1796 # Loop over combinatorial of data pairs to calculate the variogram -> 1797 dis, vario, npp = variogram_loop( 1798 x, y, vr, xlag, xltol, nlag, azm, atol, bandwh 1799 )
SystemError: CPUDispatcher(<function variogram_loop at 0x7fc1b09b6160>) returned a result with an error set
Running on ubuntu 20.04