Title: examples/misc/longshort.py is outdated · Issue #6866 · matplotlib/matplotlib · GitHub
Open Graph Title: examples/misc/longshort.py is outdated · Issue #6866 · matplotlib/matplotlib
X Title: examples/misc/longshort.py is outdated · Issue #6866 · matplotlib/matplotlib
Description: As of master / numpy 1.11: $ python2 examples/misc/longshort.py Traceback (most recent call last): File "examples/misc/longshort.py", line 24, in
Open Graph Description: As of master / numpy 1.11: $ python2 examples/misc/longshort.py Traceback (most recent call last): File "examples/misc/longshort.py", line 24, in
X Description: As of master / numpy 1.11: $ python2 examples/misc/longshort.py Traceback (most recent call last): File "examples/misc/longshort.py", line 24, in <module> r1 = mlab.rec_append_field...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/6866
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"examples/misc/longshort.py is outdated","articleBody":"As of master / numpy 1.11:\n\n```\n$ python2 examples/misc/longshort.py\nTraceback (most recent call last):\n File \"examples/misc/longshort.py\", line 24, in \u003cmodule\u003e\n r1 = mlab.rec_append_fields(r1, 'gains', gains1)\n File \"/home/antony/src/extern/matplotlib/lib/matplotlib/mlab.py\", line 2389, in rec_append_fields\n newdtype = np.dtype(rec.dtype.descr + list(zip(names, dtypes)))\nTypeError: data type not understood\n\n$ python3 examples/misc/longshort.py\nTraceback (most recent call last):\n File \"examples/misc/longshort.py\", line 12, in \u003cmodule\u003e\n u1 = urllib.urlretrieve('http://ichart.finance.yahoo.com/table.csv?s=AAPL\u0026d=9\u0026e=14\u0026f=2008\u0026g=d\u0026a=8\u0026b=7\u0026c=1984\u0026ignore=.csv')\nAttributeError: module 'urllib' has no attribute 'urlretrieve'\n```\n\nBasically `mlab.rec_append_fields` has some unicode/bytes issues on Py2 and the imports need to be renamed on Py3 (I guess).\n","author":{"url":"https://github.com/anntzer","@type":"Person","name":"anntzer"},"datePublished":"2016-07-31T08:55:20.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/6866/matplotlib/issues/6866"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6038af38-cc51-c92a-8cbf-47e8f90f3b05 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 84E2:1F08C5:114073E:16DC4DA:6A54220D |
| html-safe-nonce | b00d1eb3d92513cd4ab387264d7720f27c062d394b5c3692ece75a0c8b215914 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NEUyOjFGMDhDNToxMTQwNzNFOjE2REM0REE6NkE1NDIyMEQiLCJ2aXNpdG9yX2lkIjoiNDYwMjA5MTMzODE0OTkyOTQ4NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e0c0d8e38b8d4fd5cfd69470f54efa6ef59681501e056402f46f005b90338942 |
| hovercard-subject-tag | issue:168508724 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/6866/issue_layout |
| twitter:image | https://opengraph.githubassets.com/394dabaf5e29601690d36fa6cdb7d8ea469acd1a5b035aab59e216c30e019e61/matplotlib/matplotlib/issues/6866 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/394dabaf5e29601690d36fa6cdb7d8ea469acd1a5b035aab59e216c30e019e61/matplotlib/matplotlib/issues/6866 |
| og:image:alt | As of master / numpy 1.11: $ python2 examples/misc/longshort.py Traceback (most recent call last): File "examples/misc/longshort.py", line 24, in |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | anntzer |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width