Closed ivan-marroquin closed 2 years ago
Would you mind creating a PR to fix this? There we could discuss further on what was happening.
I guess you only need to add brackets ([...]
) around your specified_drift_arrays
and convert them to numpy arrays. I assume you are using only one array for the specified drift, but that has to be supplied as a list with that one numpy array as only element:
residual_predict, residual_variance = model.execute(
style='points',
xpoints= coor_test[:,0],
ypoints= coor_test[:,1],
zpoints= coor_test[:,2],
specified_drift_arrays=[np.asarray(spec)],
)
This is also stated in the doc-string of that method.
Hi,
Many thanks for such great package!
I am using PyKrige 1.6.1 and noticed the following error message when executing universal kriging 3d:
The produced error message is as follows: residual_predict, residual_variance= model.execute(style= 'points', xpoints= coor_test[:,0], ypoints= coor_test[:,1], zpoints= coor_test[:,2], File "C:\Temp\Python_3.8.10\lib\site-packages\pykrige\uk3d.py", line 1072, in execute if spec.ndim != 1:
Checking the Python code, I noticed the 'spec' is used to go through the list of arrays defined in specified drift arrays parameter of execute object. Since the execute object expects to have a list of arrays, the command 'spec.ndim' produces the error message. I also noticed that there is another checking using: spec.shape[0] != xpts.size, which I am sure it will produce another error.
My workaround was to uncomment Python line commands from 1072 - 1083.
Kind regards,
Ivan