-
Notifications
You must be signed in to change notification settings - Fork 55
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
Sum models break the docs #177
Comments
Hi @mmaelicke, |
Here's the code that fails in Sphinx, does it also run for you or am I missing something environment/setup-wise? import skgstat as skg
import numpy as np
coords, vals = skg.data.pancake(N=200).get('sample')
V = skg.Variogram(
coords,
vals,
n_lags=25
)
V.maxlag = 500
# Build a custom model by applying the @variogram decorator (here adding a linear term to a spherical model)
from skgstat.models import variogram, spherical
@variogram
def custom_model(h, r1, c1, a):
return spherical(h, r1, c1) + h * a
V.model = custom_model
# We define the bounds for r1, c1 and a
bounds_custom = [(0, 0, 0), (np.max(V.bins), np.max(V.experimental), 2)]
V.fit(bounds=bounds_custom)
V.plot() |
Looking at the error again (third argument missing in I don't have much experience with I also double-checked and I did add tests for the plotting of custom models, so should in principle always work: https://github.com/mmaelicke/scikit-gstat/blob/main/skgstat/tests/test_variogram.py#L1460 |
I'll check the code and run the sphinx build in a clean build. Possible, that I also had some images cached... I will try to free my calendar this week a bit and investigate more into this. A possible fix would be to shift the examples to sphinx_gallery examples, which I implemented way later into the docs (the tutorials are written that way). For the case, that the ipython directive in sphinx was the cause.... |
It seems to be related to this: ipython/ipython#13531 which was fixed in ipython 8.15 or 8.16 and above. |
Hey @rhugonnet,
The docs are not compiling anymore and I finally found the time to have a look at that. To me it seems like the the standard plotting routine has an issue, when calling the
Variogram.fitted_model
throughVariogram.transform
. It is one of theV.plot();
statements indocs/userguide/variogram.rst
.It started failing after we implemented the sum of models. I can't really tell which of the plot statements causes the error, but we added to that file, so I suspect it is one of the newly added plotting of sum of models.
Here is the traceback of building the docs locally:
@rhugonnet I am a bit lost here. Do you have any idea, what exactly is going wrong here?
The text was updated successfully, but these errors were encountered: