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

[Feature Request] Raise warning for unused keyword arguments if bokeh figure is initialized. #20

Open
tomroesch opened this issue Feb 20, 2020 · 0 comments

Comments

@tomroesch
Copy link

When using viz.predictive_ecdf(), viz.histogram() and viz.predictive_regression(), any keyword argument can be given, if a bokeh figure is initialized in advance and given as a keyword argument. The following code works just fine, however I think it should be avoided to silently ignore keyword arguments. At least a warning should be returned.

import bebi103
import numpy as np
import bokeh.plotting
import bokeh.io

bokeh.io.output_notebook()

sample = np.array([np.random.normal(0, 10, size=1000) for i in range(10)])

p1 = bokeh.plotting.figure(
    plot_width=200,
    plot_height=200
)


bokeh.io.show(
    bebi103.viz.predictive_ecdf(
        sample,
        p=p1,
        foo="bar"
    )
)


p2 = bokeh.plotting.figure(
    plot_width=200,
    plot_height=200
)

bokeh.io.show(
    bebi103.viz.histogram(
        sample[0],
        p=p2,
        foo="bar"
    )
)

p3 = bokeh.plotting.figure(
    plot_width=200,
    plot_height=200
)

bokeh.io.show(
    bebi103.viz.predictive_regression(
        sample,
        sample[0],
        p=p3,
        foo="bar"
    )
)

with package versions
CPython 3.7.5
IPython 7.11.1

bokeh 1.4.0
bebi103 0.0.52
numpy 1.17.4
jupyterlab 1.2.6

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