{"action":"created","issue":{"url":"https://api.github.com/repos/pandas-dev/pandas/issues/24227","repository_url":"https://api.github.com/repos/pandas-dev/pandas","labels_url":"https://api.github.com/repos/pandas-dev/pandas/issues/24227/labels{/name}","comments_url":"https://api.github.com/repos/pandas-dev/pandas/issues/24227/comments","events_url":"https://api.github.com/repos/pandas-dev/pandas/issues/24227/events","html_url":"https://github.com/pandas-dev/pandas/pull/24227","id":389814948,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM3NzE4OTQ3","number":24227,"title":"NumPyBackedExtensionArray","user":{"login":"TomAugspurger","id":1312546,"node_id":"MDQ6VXNlcjEzMTI1NDY=","avatar_url":"https://avatars3.githubusercontent.com/u/1312546?v=4","gravatar_id":"","url":"https://api.github.com/users/TomAugspurger","html_url":"https://github.com/TomAugspurger","followers_url":"https://api.github.com/users/TomAugspurger/followers","following_url":"https://api.github.com/users/TomAugspurger/following{/other_user}","gists_url":"https://api.github.com/users/TomAugspurger/gists{/gist_id}","starred_url":"https://api.github.com/users/TomAugspurger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomAugspurger/subscriptions","organizations_url":"https://api.github.com/users/TomAugspurger/orgs","repos_url":"https://api.github.com/users/TomAugspurger/repos","events_url":"https://api.github.com/users/TomAugspurger/events{/privacy}","received_events_url":"https://api.github.com/users/TomAugspurger/received_events","type":"User","site_admin":false},"labels":[{"id":849023693,"node_id":"MDU6TGFiZWw4NDkwMjM2OTM=","url":"https://api.github.com/repos/pandas-dev/pandas/labels/ExtensionArray","name":"ExtensionArray","color":"6138b5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":34,"created_at":"2018-12-11T15:21:55Z","updated_at":"2018-12-20T18:06:15Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/pandas-dev/pandas/pulls/24227","html_url":"https://github.com/pandas-dev/pandas/pull/24227","diff_url":"https://github.com/pandas-dev/pandas/pull/24227.diff","patch_url":"https://github.com/pandas-dev/pandas/pull/24227.patch"},"body":"Adds a NumPyBckedExtensionArray, a thin wrapper around ndarray implementing\r\nthe EA interface.\r\n\r\nWe use this to ensure that `Series.array -> ExtensionArray`, rather than\r\na `Union[ndarray, ExtensionArray]`.\r\n\r\nxref #23995 \r\n\r\n---\r\n\r\ncc @jreback @jorisvandenbossche @shoyer.\r\n\r\nSome idle thoughts:\r\n\r\n1. I'm not sure whether or not we should do this. In theory, I like the idea of `Series.array` always being an ExtensionArray. It gives us so much more freedom going forward.\r\n2. This is probably bad, but I think unavoidable (for now)\r\n```python\r\nIn [4]: ser = pd.Series([1, 2, 3])\r\n\r\nIn [5]: ser.array is ser.array\r\nOut[5]: False\r\n```\r\n3. Should add a method for going from a NumPyBackedExtensionArray to an ndarray.\r\n4. temporarily patching the Series /frame constructors to box all ndarrays in an ExtensionArray will be a good way to ensure that all of pandas supports EAs \r\n5. Should the Series / Index constructors unbox NumPyBackedExtensionArrays, so that you can't \"accidentally\" put one in? (I'm going to explore this quick).\r\n\r\n\r\nTODO:\r\n\r\n- [ ] name (NumPyBackedExtensionArray is a bit long)\r\n- [ ] more docs\r\n- [ ] add public API for the ndarray? Maybe `NumPyBackedExtensionArray.to_numpy()`?"},"comment":{"url":"https://api.github.com/repos/pandas-dev/pandas/issues/comments/449086065","html_url":"https://github.com/pandas-dev/pandas/pull/24227#issuecomment-449086065","issue_url":"https://api.github.com/repos/pandas-dev/pandas/issues/24227","id":449086065,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTA4NjA2NQ==","user":{"login":"TomAugspurger","id":1312546,"node_id":"MDQ6VXNlcjEzMTI1NDY=","avatar_url":"https://avatars3.githubusercontent.com/u/1312546?v=4","gravatar_id":"","url":"https://api.github.com/users/TomAugspurger","html_url":"https://github.com/TomAugspurger","followers_url":"https://api.github.com/users/TomAugspurger/followers","following_url":"https://api.github.com/users/TomAugspurger/following{/other_user}","gists_url":"https://api.github.com/users/TomAugspurger/gists{/gist_id}","starred_url":"https://api.github.com/users/TomAugspurger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomAugspurger/subscriptions","organizations_url":"https://api.github.com/users/TomAugspurger/orgs","repos_url":"https://api.github.com/users/TomAugspurger/repos","events_url":"https://api.github.com/users/TomAugspurger/events{/privacy}","received_events_url":"https://api.github.com/users/TomAugspurger/received_events","type":"User","site_admin":false},"created_at":"2018-12-20T18:06:15Z","updated_at":"2018-12-20T18:06:15Z","author_association":"CONTRIBUTOR","body":"Sorry about the git snafu. This is now on top of https://github.com/pandas-dev/pandas/pull/24356, so I can use the compat validation. Won't have so much time for it so trying to get things in a mergeable state."}}
{"actor":{"display_login":"TomAugspurger"}}