Title: Only `float` type should automatically convert to `System.Double` when target type is `System.Object` · Issue #1957 · pythonnet/pythonnet · GitHub
Open Graph Title: Only `float` type should automatically convert to `System.Double` when target type is `System.Object` · Issue #1957 · pythonnet/pythonnet
X Title: Only `float` type should automatically convert to `System.Double` when target type is `System.Object` · Issue #1957 · pythonnet/pythonnet
Description: Environment Pythonnet version: 3.0.0 Details var numpy = Py.Import("numpy"); var float64 = numpy.GetAttr("float64"); var float64Value = float64.Invoke(42.ToPython()); Console.WriteLine(float64Value.As
Open Graph Description: Environment Pythonnet version: 3.0.0 Details var numpy = Py.Import("numpy"); var float64 = numpy.GetAttr("float64"); var float64Value = float64.Invoke(42.ToPython()); Console.WriteLine(float64Value...
X Description: Environment Pythonnet version: 3.0.0 Details var numpy = Py.Import("numpy"); var float64 = numpy.GetAttr("float64"); var float64Value = float64.Invoke(42.ToPython()); Console.Wr...
Opengraph URL: https://github.com/pythonnet/pythonnet/issues/1957
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Only `float` type should automatically convert to `System.Double` when target type is `System.Object`","articleBody":"### Environment\r\n\r\n- Pythonnet version: 3.0.0\r\n\r\n### Details\r\n\r\n```csharp\r\nvar numpy = Py.Import(\"numpy\");\r\nvar float64 = numpy.GetAttr(\"float64\");\r\nvar float64Value = float64.Invoke(42.ToPython());\r\nConsole.WriteLine(float64Value.As\u003cobject\u003e().GetType());\r\n```\r\n\r\n**Expected:** `Python.Runtime.PyObject`\r\n**Actual**: `System.Double`","author":{"url":"https://github.com/lostmsu","@type":"Person","name":"lostmsu"},"datePublished":"2022-09-30T17:58:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1957/pythonnet/issues/1957"}
| 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:d9b47b7f-12b8-e189-719c-cfbd24b32f07 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9786:2835D5:162220C:1DA99B0:697067D6 |
| html-safe-nonce | eb86f29bfed507699121a252c122d53a152093595a7be864a05763133ebb15ec |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Nzg2OjI4MzVENToxNjIyMjBDOjFEQTk5QjA6Njk3MDY3RDYiLCJ2aXNpdG9yX2lkIjoiOTAwNTUwMTQyMTU3ODExOTEyNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 28e9879ca902608f87a00f1dd29af60586e67f96da12aae744fa7a49b1f1e0ad |
| hovercard-subject-tag | issue:1392775588 |
| 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/pythonnet/pythonnet/1957/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e29b46043abb2571a0c93347b1dee8d0e4f19abbbdaca99fc078efac3ee9761c/pythonnet/pythonnet/issues/1957 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e29b46043abb2571a0c93347b1dee8d0e4f19abbbdaca99fc078efac3ee9761c/pythonnet/pythonnet/issues/1957 |
| og:image:alt | Environment Pythonnet version: 3.0.0 Details var numpy = Py.Import("numpy"); var float64 = numpy.GetAttr("float64"); var float64Value = float64.Invoke(42.ToPython()); Console.WriteLine(float64Value... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lostmsu |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9920a62ba22d06470388e2904804fb7e5ec51c9e35f81784e9191394c74b2bd2 |
| turbo-cache-control | no-preview |
| go-import | github.com/pythonnet/pythonnet git https://github.com/pythonnet/pythonnet.git |
| octolytics-dimension-user_id | 6050430 |
| octolytics-dimension-user_login | pythonnet |
| octolytics-dimension-repository_id | 14748123 |
| octolytics-dimension-repository_nwo | pythonnet/pythonnet |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14748123 |
| octolytics-dimension-repository_network_root_nwo | pythonnet/pythonnet |
| 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 | 7d6181066430cc06553c8396ca201e194ae33cb9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width