Title: Python integers turn into Numpy integers when fetched. · Issue #690 · datajoint/datajoint-python · GitHub
Open Graph Title: Python integers turn into Numpy integers when fetched. · Issue #690 · datajoint/datajoint-python
X Title: Python integers turn into Numpy integers when fetched. · Issue #690 · datajoint/datajoint-python
Description: In my table exist a non-primary column of type longblob that stores dictionaries. Inside the dictionary some of the values are Python integers. However, when fetched, these Python integers turn into Numpy integers. It would be helpful if...
Open Graph Description: In my table exist a non-primary column of type longblob that stores dictionaries. Inside the dictionary some of the values are Python integers. However, when fetched, these Python integers turn int...
X Description: In my table exist a non-primary column of type longblob that stores dictionaries. Inside the dictionary some of the values are Python integers. However, when fetched, these Python integers turn int...
Opengraph URL: https://github.com/datajoint/datajoint-python/issues/690
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Python integers turn into Numpy integers when fetched.","articleBody":"In my table exist a non-primary column of type `longblob` that stores dictionaries. Inside the dictionary some of the values are Python integers. However, when fetched, these Python integers turn into Numpy integers. It would be helpful if the types are kept the same at insert and fetch time.\r\n\r\nDataJoint version = 0.12.0\r\n\r\nBelow is a toy example:\r\n``` Python\r\n@schema\r\nclass MyTable(dj.Manual):\r\n definition = \"\"\"\r\n prim_key: varchar(32)\r\n ---\r\n attr: longblob\r\n \r\n \"\"\"\r\n\r\nMyTable().insert1(dict(prim_key=0, attr=dict(a=1)))\r\n\r\nprint(type(MyTable().fetch1()['attr']['a']))\r\n\r\n# the output is \u003cclass 'numpy.int64'\u003e\r\n```","author":{"url":"https://github.com/mohammadbashiri","@type":"Person","name":"mohammadbashiri"},"datePublished":"2019-11-06T15:06:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":11},"url":"https://github.com/690/datajoint-python/issues/690"}
| 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:c338e9cd-7f63-b040-ebef-ff095c32f407 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8994:331610:1484D36:1C4F0C6:6A4DEB68 |
| html-safe-nonce | dd4be765285fdd94cab8de6cefcfd2a160609192af40b769f06689fbbad17d5b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OTk0OjMzMTYxMDoxNDg0RDM2OjFDNEYwQzY6NkE0REVCNjgiLCJ2aXNpdG9yX2lkIjoiNjg0MDQxODY4NTUzNTc3NTU5MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0ecd7f53dd2a83fb50fce20f64d50a56d455fc7c1c70caf55b8c89ecb4f367ee |
| hovercard-subject-tag | issue:518531523 |
| 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/datajoint/datajoint-python/690/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5bc247623a8edff2c5a28f8c0da71a39d7fff05119f6fe02644453efca6d9c72/datajoint/datajoint-python/issues/690 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5bc247623a8edff2c5a28f8c0da71a39d7fff05119f6fe02644453efca6d9c72/datajoint/datajoint-python/issues/690 |
| og:image:alt | In my table exist a non-primary column of type longblob that stores dictionaries. Inside the dictionary some of the values are Python integers. However, when fetched, these Python integers turn int... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mohammadbashiri |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| go-import | github.com/datajoint/datajoint-python git https://github.com/datajoint/datajoint-python.git |
| octolytics-dimension-user_id | 2375501 |
| octolytics-dimension-user_login | datajoint |
| octolytics-dimension-repository_id | 5866704 |
| octolytics-dimension-repository_nwo | datajoint/datajoint-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 5866704 |
| octolytics-dimension-repository_network_root_nwo | datajoint/datajoint-python |
| 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 | 1d344bdb7547fe6bca17a59bb2b8aac3dc9532a0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width