question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Plotting is broken with a dimension mismatch error. Here is a minimum working example:

import GPy
import numpy as np

x = np.linspace(0.0, 1.0, 100)[:, np.newaxis]
y = np.linspace(0.0, 1.0, 100)[:, np.newaxis]

model = GPy.models.GPRegression(x, y)

fig = model.plot()

This issue was mentioned in #723. The user mentions that f2py is having some issue, but does not specify a solution, so I’m reopening the issue here.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
kakilacommented, Mar 20, 2019

Ubuntu 18.04 (venv): python 3.6.7, GPy 1.9.6, scipy 1.2.1 and numpy 1.16.2 - plot doesn’t work As reported above

python -m pip install --upgrade --force-reinstall numpy==1.15.4 GPy scipy

Makes the plot work, however plotly output is giving deprecation watnings

plotly.graph_objs.Font is deprecated. Please replace it with one of the following more specific types

  • plotly.graph_objs.layout.Font
  • plotly.graph_objs.layout.hoverlabel.Font
  • etc. plotly.graph_objs.Marker is deprecated.

Please replace it with one of the following more specific types

  • plotly.graph_objs.scatter.Marker
  • plotly.graph_objs.histogram.selected.Marker
  • etc.

plotly.graph_objs.Line is deprecated. Please replace it with one of the following more specific types

  • plotly.graph_objs.scatter.Line
  • plotly.graph_objs.layout.shape.Line
  • etc.
2reactions
palindromikcommented, Jan 31, 2019

This error could be related to the latest release of numpy (v 1.16.0 on Jan 14th: https://pypi.org/project/numpy/1.16.0/#history).

On Mac OS X, the given model.plot example fails when updating the numpy version while keeping other dependencies constant. Works: GPy - 1.9.6 and numpy - 1.15.4 Doesn’t work: GPy - 1.9.6 and numpy - 1.16.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Break Down Plot — plot.broken • breakDown
S3 method for broken plot(x, trans = I, ..., top_features = 0, min_delta = 0, add_contributions ... maximal number of variables from model...
Read more >
Plotting broken? - General Usage - Julia Discourse
0 I find the following problem. Any help? julia> using Plots. julia> plot(1:5). Error showing value of type Plots.Plot{Plots.GRBackend}:.
Read more >
Broken Axis — Matplotlib 3.1.0 documentation
Broken axis example, where the y-axis will have a portion cut out. ... 14]] += .8 # If we were to simply plot...
Read more >
Create a plot with broken axis in Python using Matplotlib
In this article, we are going to learn about how to plot a graph or figure with the broken axis in Python using...
Read more >
Plotting lines are broken, can anyone help me out how to fix ...
Plotting lines are broken, can anyone help me out how to fix this issue? It is related to Graphics but my graphics drivers...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found