-
Notifications
You must be signed in to change notification settings - Fork 5
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
error in chignolin_example #2
Comments
hmm, can you try the following: 1). print out 2). print out 3). Try comment out the vlines to see if the error goes away. This is a strange bug, and might be because matplotlib changed something in its APIs. |
Ok I solved by updating the matplotlib considering the latest version
(2.2.2).
Thank you
Il giorno gio 9 ago 2018 alle ore 16:22 msultan <notifications@github.com>
ha scritto:
… hmm, can you try the following:
1). print out clf.coef_.T to see that there are a list of coefficient
values there.
2). print out clr_plt to see that there are a list of styles there.
3). Try comment out the vlines to see if the error goes away.
This is a strange bug, and might be because matplotlib changed something
in its APIs.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AoQpz9JzYf4qKCa-MzHM9fKkGHnupUs6ks5uPEWUgaJpZM4V1ye->
.
|
closing now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
when I try to execute the svm_chignolin.py example, I got the following error:
"TypeError Traceback (most recent call last)
~/Scaricati/SML_CV-master/chignolin_example/svm_chignolin.py in ()
118 clr_plt = sns.color_palette("colorblind")
119 plot(clf.coef_.T,marker='o',c=clr_plt[2])
--> 120 vlines(14,-.15,0.15,linestyles='dashed')
121 vlines(50,-.15,0.15,linestyles='dashed')
122 ylim([-.15,0.15])
/opt/python/3/lib/python3.6/site-packages/matplotlib/pyplot.py in vlines(x, ymin, ymax, colors, linestyles, label, hold, data, **kwargs)
3652 try:
3653 ret = ax.vlines(x, ymin, ymax, colors=colors, linestyles=linestyles,
-> 3654 label=label, data=data, **kwargs)
3655 finally:
3656 ax._hold = washold
/opt/python/3/lib/python3.6/site-packages/matplotlib/init.py in inner(ax, *args, **kwargs)
1708 warnings.warn(msg % (label_namer, func.name),
1709 RuntimeWarning, stacklevel=2)
-> 1710 return func(ax, *args, **kwargs)
1711 pre_doc = inner.doc
1712 if pre_doc is None:
/opt/python/3/lib/python3.6/site-packages/matplotlib/axes/_axes.py in vlines(self, x, ymin, ymax, colors, linestyles, label, **kwargs)
1060 #print 'creating line collection'
1061 lines = mcoll.LineCollection(verts, colors=colors,
-> 1062 linestyles=linestyles, label=label)
1063 self.add_collection(lines, autolim=False)
1064 lines.update(kwargs)
/opt/python/3/lib/python3.6/site-packages/matplotlib/collections.py in init(self, segments, linewidths, colors, antialiaseds, linestyles, offsets, transOffset, norm, cmap, pickradius, zorder, facecolors, **kwargs)
1162 antialiaseds = (mpl.rcParams['lines.antialiased'],)
1163
-> 1164 colors = mcolors.to_rgba_array(colors)
1165
1166 Collection.init(
/opt/python/3/lib/python3.6/site-packages/matplotlib/colors.py in to_rgba_array(c, alpha)
206 # array has the wrong kind or shape, raise the error during one-at-a-time
207 # conversion.)
--> 208 if (isinstance(c, tuple(np.ndarray)) and c.dtype.kind in "if"
209 and c.ndim == 2 and c.shape[1] in [3, 4]):
210 if c.shape[1] == 3:
TypeError: 'type' object is not iterable"
Can you help to solve this?
Thank you!
The text was updated successfully, but these errors were encountered: