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

Bqplot - ipywidget error #53

Open
Dianeod opened this issue Jun 11, 2020 · 0 comments
Open

Bqplot - ipywidget error #53

Dianeod opened this issue Jun 11, 2020 · 0 comments

Comments

@Dianeod
Copy link
Contributor

Dianeod commented Jun 11, 2020

ipywidgets issue raised:

/%python
import numpy as np

size = 100

np.random.seed(0)

x_data = np.arange(size)

y_data = np.cumsum(np.random.randn(size)  * 100.0)

from bqplot import pyplot as plt

plt.figure(title='My First Plot')

plt.plot(x_data,x_data) 

returns error


e: bad argument type for built-in operation

  [1]  /Users/dianeodonoghue/q/p.q:13: .p.e:{$["def"~3#x;$[x[3]in"<*>";ei 3;eo];"class"~5#x;$[x[5]in"*>";ei 5;eo];eo]x}
                                             ^

  [0]  p)plt.plot(x_data,x_data)
       ^

Issue arises at line plt.plot(x_data,x_data) when initalising the scales for the interactive plot in ipywidgets, so changing the input data will not fix the issue:

/%python
from bqplot import marks,scales
dict={'x':scales.LinearScale(),
 'y':scales.LinearScale()}
marks.Lines(scales=dict)
evaluation error:

e: bad argument type for built-in operation

  [1]  /Users/dianeodonoghue/q/p.q:13: .p.e:{$["def"~3#x;$[x[3]in"<*>";ei 3;eo];"class"~5#x;$[x[5]in"*>";ei 5;eo];eo]x}
                                             ^

  [0]  p)marks.Lines(scales=dict)

Also, issue does not arise when running in a q terminal, only in a jupyter notebook.

@Dianeod Dianeod closed this as completed Jun 11, 2020
@Dianeod Dianeod reopened this Jun 11, 2020
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