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

plot error (OMGP) #17

Open
suzusuzu opened this issue Sep 27, 2019 · 0 comments
Open

plot error (OMGP) #17

suzusuzu opened this issue Sep 27, 2019 · 0 comments

Comments

@suzusuzu
Copy link

Python 3.6.8

I executed this code.

from GPclust import OMGP
import numpy as np
import matplotlib.pyplot as plt

X = np.linspace(0.0, 1.0, 10).reshape(-1, 1)
Y = np.linspace(0.0, 1.0, 10).reshape(-1, 1)
m = OMGP(X, Y, K=2, variance=0.01, prior_Z='DP')
m.plot()

Error message appeared.

KeyError                                  Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/matplotlib/colors.py in to_rgba(c, alpha)
    173     try:
--> 174         rgba = _colors_full_map.cache[c, alpha]
    175     except (KeyError, TypeError):  # Not in cache, or unhashable.

KeyError: (0.38499836444719515, None)

During handling of the above exception, another exception occurred:

ValueError                                Traceback (most recent call last)
8 frames
ValueError: Invalid RGBA argument: 0.38499836444719515

During handling of the above exception, another exception occurred:

ValueError                                Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/matplotlib/axes/_axes.py in scatter(self, x, y, s, c, marker, cmap, norm, vmin, vmax, alpha, linewidths, verts, edgecolors, **kwargs)
   4243                         "acceptable for use with 'x' with size {xs}, "
   4244                         "'y' with size {ys}."
-> 4245                         .format(nc=n_elem, xs=x.size, ys=y.size)
   4246                     )
   4247                 # Both the mapping *and* the RGBA conversion failed: pretty

ValueError: 'c' argument has 10 elements, which is not acceptable for use with 'x' with size 10, 'y' with size 10.
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

1 participant