Title: bug: error with the latest dev version AttributeError: 'list' object has no attribute 'dtype' · Issue #411 · proplot-dev/proplot · GitHub
Open Graph Title: bug: error with the latest dev version AttributeError: 'list' object has no attribute 'dtype' · Issue #411 · proplot-dev/proplot
X Title: bug: error with the latest dev version AttributeError: 'list' object has no attribute 'dtype' · Issue #411 · proplot-dev/proplot
Description: Got error with the latest dev version: fig, ax = pplt.subplot() ax.plot(np.arange(10)) Traceback --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) /tmp/ipykernel_...
Open Graph Description: Got error with the latest dev version: fig, ax = pplt.subplot() ax.plot(np.arange(10)) Traceback --------------------------------------------------------------------------- AttributeError Traceback...
X Description: Got error with the latest dev version: fig, ax = pplt.subplot() ax.plot(np.arange(10)) Traceback --------------------------------------------------------------------------- AttributeError Traceback...
Opengraph URL: https://github.com/proplot-dev/proplot/issues/411
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bug: error with the latest dev version AttributeError: 'list' object has no attribute 'dtype'","articleBody":"Got error with the latest dev version:\r\n```python\r\nfig, ax = pplt.subplot()\r\nax.plot(np.arange(10))\r\n```\r\n\r\nTraceback\r\n```\r\n---------------------------------------------------------------------------\r\nAttributeError Traceback (most recent call last)\r\n/tmp/ipykernel_109695/309448141.py in \u003cmodule\u003e\r\n 1 fig, ax = pplt.subplot()\r\n----\u003e 2 ax.plot(np.arange(10))\r\n\r\n~/local/conda/envs/nemo/lib/python3.8/site-packages/proplot/internals/inputs.py in _preprocess_or_redirect(self, *args, **kwargs)\r\n 292 \r\n 293 # Call main function\r\n--\u003e 294 return func(self, *args, **kwargs) # call unbound method\r\n 295 \r\n 296 return _preprocess_or_redirect\r\n\r\n~/local/conda/envs/nemo/lib/python3.8/site-packages/proplot/axes/plot.py in plot(self, *args, **kwargs)\r\n 2899 \"\"\"\r\n 2900 kwargs = _parse_vert(default_vert=True, **kwargs)\r\n-\u003e 2901 return self._apply_plot(*args, **kwargs)\r\n 2902 \r\n 2903 @inputs._preprocess_or_redirect('y', 'x', allow_extra=True)\r\n\r\n~/local/conda/envs/nemo/lib/python3.8/site-packages/proplot/axes/plot.py in _apply_plot(self, vert, *pairs, **kwargs)\r\n 2858 ys, kw = inputs._dist_reduce(ys, **kw)\r\n 2859 guide_kw = _pop_params(kw, self._update_guide) # after standardize\r\n-\u003e 2860 for _, n, x, y, kw in self._iter_arg_cols(xs, ys, **kw):\r\n 2861 kw = self._parse_cycle(n, **kw)\r\n 2862 *eb, kw = self._add_error_bars(x, y, vert=vert, default_barstds=True, **kw) # noqa: E501\r\n\r\n~/local/conda/envs/nemo/lib/python3.8/site-packages/proplot/axes/plot.py in _iter_arg_cols(self, label, labels, values, *args, **kwargs)\r\n 4216 labels = [\r\n 4217 str(_not_none(label, ''))\r\n-\u003e 4218 for label in inputs._to_numpy_array(labels)\r\n 4219 ]\r\n 4220 else:\r\n\r\n~/local/conda/envs/nemo/lib/python3.8/site-packages/proplot/internals/inputs.py in _to_numpy_array(data, strip_units)\r\n 131 elif isinstance(data, (DataFrame, Series, Index)):\r\n 132 data = data.values\r\n--\u003e 133 if data.dtype == bool:\r\n 134 data = data.view(np.uint8)\r\n 135 if Quantity is not ndarray and isinstance(data, Quantity):\r\n\r\nAttributeError: 'list' object has no attribute 'dtype'\r\n```\r\n\r\ndebug\r\n```\r\n\u003e ~/local/conda/envs/nemo/lib/python3.8/site-packages/proplot/internals/inputs.py(133)_to_numpy_array()\r\n 131 elif isinstance(data, (DataFrame, Series, Index)):\r\n 132 data = data.values\r\n--\u003e 133 if data.dtype == bool:\r\n 134 data = data.view(np.uint8)\r\n 135 if Quantity is not ndarray and isinstance(data, Quantity):\r\n\r\nipdb\u003e p data\r\n[None]\r\n```\r\n\r\nThe error seems related to this PR https://github.com/proplot-dev/proplot/pull/410.","author":{"url":"https://github.com/syrte","@type":"Person","name":"syrte"},"datePublished":"2023-03-24T23:51:59.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/411/proplot/issues/411"}
| 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:891c5c14-ec5a-9d42-de18-a317018f1009 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AE74:7C2B5:383FF3:4C00E5:697CE2E3 |
| html-safe-nonce | b28649cbafa4031193006acdabb5d96e3d453090ef4f4cf23ebd8af0a4323ade |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRTc0OjdDMkI1OjM4M0ZGMzo0QzAwRTU6Njk3Q0UyRTMiLCJ2aXNpdG9yX2lkIjoiODk2MTEwODYzMTAxNzU0NjQ2NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3c82c081a9198b8a182bc594b33f5e40444f5da8cd4bec3c054f91f18ea9ee83 |
| hovercard-subject-tag | issue:1640205692 |
| 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/proplot-dev/proplot/411/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e18ec22a735c50326728fecd8b5a0a0c3c45d00f5e980d073d2845dc6a1bf801/proplot-dev/proplot/issues/411 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e18ec22a735c50326728fecd8b5a0a0c3c45d00f5e980d073d2845dc6a1bf801/proplot-dev/proplot/issues/411 |
| og:image:alt | Got error with the latest dev version: fig, ax = pplt.subplot() ax.plot(np.arange(10)) Traceback --------------------------------------------------------------------------- AttributeError Traceback... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | syrte |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f20df5019a7f846ce01350c443b1b5209bcc8b08d1ff80f92fdef440a0c7c89 |
| turbo-cache-control | no-preview |
| go-import | github.com/proplot-dev/proplot git https://github.com/proplot-dev/proplot.git |
| octolytics-dimension-user_id | 108025793 |
| octolytics-dimension-user_login | proplot-dev |
| octolytics-dimension-repository_id | 113293661 |
| octolytics-dimension-repository_nwo | proplot-dev/proplot |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 113293661 |
| octolytics-dimension-repository_network_root_nwo | proplot-dev/proplot |
| 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 | 0f08fae6208283a46e6e5febf9878b9cdddfaa23 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width