-
Notifications
You must be signed in to change notification settings - Fork 57
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
I can not use the plots #540
Comments
Please, copy the stack trace of the exception here for diagnosing the problem. |
Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): |
As you can see its in any kind of plot |
What is the version of the |
typing_extensions==4.6.2 |
I was able to reproduce it and I am trying to solve this. As a stopgap measure you can downgrade that package to version 4.3, which worked well. |
thanks! |
I traced this to a bug in the module typing_extensions (python/typing_extensions#207), which in turn was caused by copying buggy behavior from Python 3.11 (python/cpython#105144). The authors of typing_extensions have updated their package to version 4.6.3, which should solve this issue. Please, tell me if that works for you. |
I came across the same issue and can confirm that upgrading typing-extensions to the latest version solves issue. |
I will close the issue then, since it seems to be solved. |
Describe the bug
when trying to plot it raises: TypeError("Instance and class checks can only be used with"
TypeError: Instance and class checks can only be used with @runtime_checkable protocols
To Reproduce
any of the examples
from skfda import datasets
from skfda.exploratory.depth import ModifiedBandDepth, IntegratedDepth
from skfda.exploratory.visualization import Boxplot
import matplotlib.pyplot as plt
import numpy as np
X, y = datasets.fetch_weather(return_X_y=True, as_frame=True)
fd = X.iloc[:, 0].values
fd_temperatures = fd.coordinates[0]
colormap = plt.cm.get_cmap('seismic')
label_names = y.values.categories
nlabels = len(label_names)
label_colors = colormap(np.arange(nlabels) / (nlabels - 1))
fd_temperatures.plot(group=y.values.codes,
group_colors=label_colors,
group_names=label_names)
Expected behavior
Ploting something
Version information
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: