Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update scipy to the current latest version to suppress FutureWarning#153

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nicolaskruchten merged 5 commits intoplotly:masterfromharupy:update-scipy
Nov 1, 2019

Conversation

harupy
Copy link
Contributor

This PR updatesscipy to the current latest version1.3.1 (release history) toresolve #148.

@harupyharupy changed the titleUpdate scipy to the latest versionUpdate scipy to the current latest versionOct 23, 2019
@emmanuelle
Copy link
Contributor

@nicolaskruchten how can we run the CI file even when the branch is not onplotly.py-docs? I'll look into it, unless you have a quick answer.

@nicolaskruchten
Copy link
Contributor

It's a setting we have to add in CircleCI, I can do it.

@nicolaskruchten
Copy link
Contributor

OK I've checked off this setting, so we need a new commit on this PR to kick off the CI.

@harupy
Copy link
ContributorAuthor

@nicolaskruchten Thanks! Pushed an empty commit to trigger the CI.

@harupy
Copy link
ContributorAuthor

The CI fails to build the following pages.

  • creating-and-updating-figures (link)
  • plotly-express (link)

These two pages usepx.scatter with the keyword argmenttrendline which importsstatsmodels and causes the error below.

ImportError                               Traceback (most recent call last)<ipython-input-7-78cbd26bdc21> in <module>      2 iris = px.data.iris()      3 fig = px.scatter(iris, x="sepal_width", y="sepal_length", color="species", marginal_y="violin",----> 4            marginal_x="box", trendline="ols")      5 fig.show()/srv/conda/envs/notebook/lib/python3.7/site-packages/plotly/express/_chart_types.py in scatter(data_frame, x, y, color, symbol, size, hover_name, hover_data, custom_data, text, facet_row, facet_col, error_x, error_x_minus, error_y, error_y_minus, animation_frame, animation_group, category_orders, labels, color_discrete_sequence, color_discrete_map, color_continuous_scale, range_color, color_continuous_midpoint, symbol_sequence, symbol_map, opacity, size_max, marginal_x, marginal_y, trendline, trendline_color_override, log_x, log_y, range_x, range_y, render_mode, title, template, width, height)     51     In a scatter plot, each row of `data_frame` is represented by a symbol mark in 2D space.     52     """---> 53     return make_figure(args=locals(), constructor=go.Scatter)     54      55 /srv/conda/envs/notebook/lib/python3.7/site-packages/plotly/express/_core.py in make_figure(args, constructor, trace_patch, layout_patch)   1221    1222             patch, fit_results = make_trace_kwargs(-> 1223                 args, trace_spec, group, mapping_labels.copy(), sizeref   1224             )   1225             trace.update(patch)/srv/conda/envs/notebook/lib/python3.7/site-packages/plotly/express/_core.py in make_trace_kwargs(args, trace_spec, g, mapping_labels, sizeref)    218             elif k == "trendline":    219                 if v in ["ols", "lowess"] and args["x"] and args["y"] and len(g) > 1:--> 220                     import statsmodels.api as sm    221     222                     # sorting is bad but trace_specs with "trendline" have no other attrs/srv/conda/envs/notebook/lib/python3.7/site-packages/statsmodels/api.py in <module>     14 from . import robust     15 from .robust.robust_linear_model import RLM---> 16 from .discrete.discrete_model import (Poisson, Logit, Probit,     17                                       MNLogit, NegativeBinomial,     18                                       GeneralizedPoisson,/srv/conda/envs/notebook/lib/python3.7/site-packages/statsmodels/discrete/discrete_model.py in <module>     43      44 from statsmodels.base.l1_slsqp import fit_l1_slsqp---> 45 from statsmodels.distributions import genpoisson_p     46      47 try:/srv/conda/envs/notebook/lib/python3.7/site-packages/statsmodels/distributions/__init__.py in <module>      1 from .empirical_distribution import ECDF, monotone_fn_inverter, StepFunction----> 2 from .edgeworth import ExpandedNormal      3 from .discrete import genpoisson_p, zipoisson, zigenpoisson, zinegbin/srv/conda/envs/notebook/lib/python3.7/site-packages/statsmodels/distributions/edgeworth.py in <module>      5 import numpy as np      6 from numpy.polynomial.hermite_e import HermiteE----> 7 from scipy.misc import factorial      8 from scipy.stats import rv_continuous      9 import scipy.special as specialImportError: cannot import name 'factorial' from 'scipy.misc' (/srv/conda/envs/notebook/lib/python3.7/site-packages/scipy/misc/__init__.py)

@harupy
Copy link
ContributorAuthor

Updatingstatsmodels should solve this issue (ref) .

@harupy
Copy link
ContributorAuthor

@harupy
Copy link
ContributorAuthor

Looks like I misunderstood something. Where can I see the built pages?

@nicolaskruchten
Copy link
Contributor

They get uploaded as artifacts in CI I believe. Thanks for looking into this for us :)

@harupy
Copy link
ContributorAuthor

harupy commentedOct 31, 2019
edited
Loading

The warning disappeared!

Screen Shot 2019-10-31 at 22 07 29

@nicolaskruchten
Copy link
Contributor

OK so this is working now? thebuilt branch only updates once PRs are merged intomaster :)

@harupy
Copy link
ContributorAuthor

Yes this is working

@harupyharupy changed the titleUpdate scipy to the current latest versionUpdate scipy to the current latest version to suppress FutureWarningNov 1, 2019
@harupy
Copy link
ContributorAuthor

harupy commentedNov 1, 2019
edited
Loading

oh, I found another one. This one seems to be from pandas.

https://plot.ly/python/choropleth-maps/#full-county-choropleths

nbconvert doesn't seem to have an option to hide warning messages...

@harupy
Copy link
ContributorAuthor

One workaround that I came up with is adding the css below to hidediv that contains warning messages.

div.output_stderr {display: none;}

@nicolaskruchtennicolaskruchten merged commitcb8580c intoplotly:masterNov 1, 2019
@nicolaskruchten
Copy link
Contributor

Thanks for the PR! We should look into that other warning for sure. Really what we should do is have CI grep the HTML output forWarning and fail the build if there is one :)

harupy reacted with thumbs up emoji

@harupyharupy deleted the update-scipy branchNovember 4, 2019 00:28
@harupyharupy mentioned this pull requestNov 4, 2019
12 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

FutureWarning on the doc
3 participants
@harupy@emmanuelle@nicolaskruchten

[8]ページ先頭

©2009-2025 Movatter.jp