Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem updating variogram_model_parameters with a dict #76

Closed
Camilo-HG opened this issue Oct 30, 2017 · 2 comments
Closed

Problem updating variogram_model_parameters with a dict #76

Camilo-HG opened this issue Oct 30, 2017 · 2 comments

Comments

@Camilo-HG
Copy link

Camilo-HG commented Oct 30, 2017

UniversalKriging

Updating variogram mode...
Using 'gaussian' Variogram Model
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-16-21c1fac50399> in <module>()
      4 #                               anisotropy_scaling=1., anisotropy_angle=0.)
      5 
----> 6 K.update_variogram_model('gaussian', variogram_parameters={'sill':2.25166068e04, 'range':3.84845608e00, 'nugget':2.90938889e02})
      7 K.variogram_model_parameters
      8 K.display_variogram_model()
~/anaconda3/lib/python3.6/site-packages/pykrige/uk.py in update_variogram_model(self, variogram_model, variogram_parameters, variogram_function, nlags, weight, anisotropy_scaling, anisotropy_angle)
    547             else:
    548                 print("Using '%s' Variogram Model" % self.variogram_model)
--> 549                 print("Sill:", self.variogram_model_parameters[0])
    550                 print("Range:", self.variogram_model_parameters[1])
    551                 print("Nugget:", self.variogram_model_parameters[2])
TypeError: 'set' object does not support indexing
@Camilo-HG
Copy link
Author

Camilo-HG commented Oct 30, 2017

When called with a list, it doesn't produce any error.

update_variogram_model('gaussian', variogram_parameters=[2.25166068e04, 6.84845608e00, 2.90938889e02])

@rth
Copy link
Contributor

rth commented Oct 30, 2017

@CamiloHG15 Thanks for opening this issue. I can reproduce this with 1.3.2 but not 1.4.dev0. The support of variogram_parameters as dicts was added in f292545 and didn't make it to 1.3.2.

Please install the development version from Github for now.

Edit: please reopen if you still encounter issues.

@rth rth closed this as completed Oct 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants