{"action":"opened","number":1443,"pull_request":{"url":"https://api.github.com/repos/psi4/psi4/pulls/1443","id":240529337,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQwNTI5MzM3","html_url":"https://github.com/psi4/psi4/pull/1443","diff_url":"https://github.com/psi4/psi4/pull/1443.diff","patch_url":"https://github.com/psi4/psi4/pull/1443.patch","issue_url":"https://api.github.com/repos/psi4/psi4/issues/1443","number":1443,"state":"open","locked":false,"title":"[WIP] Moving to xtensor","user":{"login":"robertodr","id":3708689,"node_id":"MDQ6VXNlcjM3MDg2ODk=","avatar_url":"https://avatars0.githubusercontent.com/u/3708689?v=4","gravatar_id":"","url":"https://api.github.com/users/robertodr","html_url":"https://github.com/robertodr","followers_url":"https://api.github.com/users/robertodr/followers","following_url":"https://api.github.com/users/robertodr/following{/other_user}","gists_url":"https://api.github.com/users/robertodr/gists{/gist_id}","starred_url":"https://api.github.com/users/robertodr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertodr/subscriptions","organizations_url":"https://api.github.com/users/robertodr/orgs","repos_url":"https://api.github.com/users/robertodr/repos","events_url":"https://api.github.com/users/robertodr/events{/privacy}","received_events_url":"https://api.github.com/users/robertodr/received_events","type":"User","site_admin":false},"body":"## Description\r\nIt was agreed at PsiCon that the `Matrix` and `Vector` class be rewritten to use xtensor as storage backend. This is my work on this so far. It is not complete - indeed `Matrix` and `Vector` are still used everywhere - but I think it's better to put this up early because it will take time to transition to the new classes. **We do need a strategy to orchestrate the transition**\r\n\r\n## Todos\r\nNotable points (developer or user-interest) that this PR has or will accomplish.\r\n- [x] Use `_a` literal in pybind11 export sources rather that `py::arg`\r\n- [x] Basic templated `Tensor` class with Python bindings.\r\n- [x] `doublet` for `Tensor<double, 2>` aka a `Matrix` of `double`-s working.\r\n\r\n## Questions\r\n- With @amjames we discussed that it might be better to have linear algebra operations as free functions (BLAS/LAPACK- and NumPy-like) Should an `LA` namespace be introduced? Possibly also create a Python submodule with pybind11?\r\n- The Python bindings for the `Tensor` class allow to do: `a_tensor[h]` to get a block (binding `operator[]` to `__getitem__`, but not `a_tensor[h] = np.random.randn(*a_tensor[h].shape)`. For the latter I tried binding `set_block` to `__setitem__` but I get horrible, horrible compiler errors. I think this should be made to work to make the Python interface feel as native as possible.\r\n- As a quick way to get `xtensor-python` up and running, I've copied their `FindNumPy.cmake` file. @loriab your input on this and how to make avoid duplication with `FindPythonModule.cmake` wanted.\r\n\r\n## Checklist\r\n- [x] Tests added for any new features\r\n- [ ] [All or relevant fraction of full tests run](http://psicode.org/psi4manual/master/build_planning.html#how-to-run-a-subset-of-tests)\r\n\r\n## Status\r\n- [x] Ready for review\r\n- [ ] Ready for merge\r\n","created_at":"2018-12-21T17:08:26Z","updated_at":"2018-12-21T17:08:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":781182366,"node_id":"MDU6TGFiZWw3ODExODIzNjY=","url":"https://api.github.com/repos/psi4/psi4/labels/C++","name":"C++","color":"a2ba09","default":false},{"id":34310633,"node_id":"MDU6TGFiZWwzNDMxMDYzMw==","url":"https://api.github.com/repos/psi4/psi4/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":781177013,"node_id":"MDU6TGFiZWw3ODExNzcwMTM=","url":"https://api.github.com/repos/psi4/psi4/labels/python","name":"python","color":"f79838","default":false}],"milestone":{"url":"https://api.github.com/repos/psi4/psi4/milestones/5","html_url":"https://github.com/psi4/psi4/milestone/5","labels_url":"https://api.github.com/repos/psi4/psi4/milestones/5/labels","id":3863563,"node_id":"MDk6TWlsZXN0b25lMzg2MzU2Mw==","number":5,"title":"Psi4 1.4","description":"","creator":{"login":"loriab","id":2314730,"node_id":"MDQ6VXNlcjIzMTQ3MzA=","avatar_url":"https://avatars0.githubusercontent.com/u/2314730?v=4","gravatar_id":"","url":"https://api.github.com/users/loriab","html_url":"https://github.com/loriab","followers_url":"https://api.github.com/users/loriab/followers","following_url":"https://api.github.com/users/loriab/following{/other_user}","gists_url":"https://api.github.com/users/loriab/gists{/gist_id}","starred_url":"https://api.github.com/users/loriab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loriab/subscriptions","organizations_url":"https://api.github.com/users/loriab/orgs","repos_url":"https://api.github.com/users/loriab/repos","events_url":"https://api.github.com/users/loriab/events{/privacy}","received_events_url":"https://api.github.com/users/loriab/received_events","type":"User","site_admin":false},"open_issues":15,"closed_issues":0,"state":"open","created_at":"2018-12-01T23:43:19Z","updated_at":"2018-12-21T17:08:26Z","due_on":"2019-06-01T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/psi4/psi4/pulls/1443/commits","review_comments_url":"https://api.github.com/repos/psi4/psi4/pulls/1443/comments","review_comment_url":"https://api.github.com/repos/psi4/psi4/pulls/comments{/number}","comments_url":"https://api.github.com/repos/psi4/psi4/issues/1443/comments","statuses_url":"https://api.github.com/repos/psi4/psi4/statuses/48c54001bd6b64ca9bba0d7459da0b4bd8b0a009","head":{"label":"robertodr:xtensor","ref":"xtensor","sha":"48c54001bd6b64ca9bba0d7459da0b4bd8b0a009","user":{"login":"robertodr","id":3708689,"node_id":"MDQ6VXNlcjM3MDg2ODk=","avatar_url":"https://avatars0.githubusercontent.com/u/3708689?v=4","gravatar_id":"","url":"https://api.github.com/users/robertodr","html_url":"https://github.com/robertodr","followers_url":"https://api.github.com/users/robertodr/followers","following_url":"https://api.github.com/users/robertodr/following{/other_user}","gists_url":"https://api.github.com/users/robertodr/gists{/gist_id}","starred_url":"https://api.github.com/users/robertodr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertodr/subscriptions","organizations_url":"https://api.github.com/users/robertodr/orgs","repos_url":"https://api.github.com/users/robertodr/repos","events_url":"https://api.github.com/users/robertodr/events{/privacy}","received_events_url":"https://api.github.com/users/robertodr/received_events","type":"User","site_admin":false},"repo":{"id":71557269,"node_id":"MDEwOlJlcG9zaXRvcnk3MTU1NzI2OQ==","name":"psi4","full_name":"robertodr/psi4","private":false,"owner":{"login":"robertodr","id":3708689,"node_id":"MDQ6VXNlcjM3MDg2ODk=","avatar_url":"https://avatars0.githubusercontent.com/u/3708689?v=4","gravatar_id":"","url":"https://api.github.com/users/robertodr","html_url":"https://github.com/robertodr","followers_url":"https://api.github.com/users/robertodr/followers","following_url":"https://api.github.com/users/robertodr/following{/other_user}","gists_url":"https://api.github.com/users/robertodr/gists{/gist_id}","starred_url":"https://api.github.com/users/robertodr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertodr/subscriptions","organizations_url":"https://api.github.com/users/robertodr/orgs","repos_url":"https://api.github.com/users/robertodr/repos","events_url":"https://api.github.com/users/robertodr/events{/privacy}","received_events_url":"https://api.github.com/users/robertodr/received_events","type":"User","site_admin":false},"html_url":"https://github.com/robertodr/psi4","description":"Open-Source Quantum Chemistry – an electronic structure package in C++ driven by Python","fork":true,"url":"https://api.github.com/repos/robertodr/psi4","forks_url":"https://api.github.com/repos/robertodr/psi4/forks","keys_url":"https://api.github.com/repos/robertodr/psi4/keys{/key_id}","collaborators_url":"https://api.github.com/repos/robertodr/psi4/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/robertodr/psi4/teams","hooks_url":"https://api.github.com/repos/robertodr/psi4/hooks","issue_events_url":"https://api.github.com/repos/robertodr/psi4/issues/events{/number}","events_url":"https://api.github.com/repos/robertodr/psi4/events","assignees_url":"https://api.github.com/repos/robertodr/psi4/assignees{/user}","branches_url":"https://api.github.com/repos/robertodr/psi4/branches{/branch}","tags_url":"https://api.github.com/repos/robertodr/psi4/tags","blobs_url":"https://api.github.com/repos/robertodr/psi4/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/robertodr/psi4/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/robertodr/psi4/git/refs{/sha}","trees_url":"https://api.github.com/repos/robertodr/psi4/git/trees{/sha}","statuses_url":"https://api.github.com/repos/robertodr/psi4/statuses/{sha}","languages_url":"https://api.github.com/repos/robertodr/psi4/languages","stargazers_url":"https://api.github.com/repos/robertodr/psi4/stargazers","contributors_url":"https://api.github.com/repos/robertodr/psi4/contributors","subscribers_url":"https://api.github.com/repos/robertodr/psi4/subscribers","subscription_url":"https://api.github.com/repos/robertodr/psi4/subscription","commits_url":"https://api.github.com/repos/robertodr/psi4/commits{/sha}","git_commits_url":"https://api.github.com/repos/robertodr/psi4/git/commits{/sha}","comments_url":"https://api.github.com/repos/robertodr/psi4/comments{/number}","issue_comment_url":"https://api.github.com/repos/robertodr/psi4/issues/comments{/number}","contents_url":"https://api.github.com/repos/robertodr/psi4/contents/{+path}","compare_url":"https://api.github.com/repos/robertodr/psi4/compare/{base}...{head}","merges_url":"https://api.github.com/repos/robertodr/psi4/merges","archive_url":"https://api.github.com/repos/robertodr/psi4/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/robertodr/psi4/downloads","issues_url":"https://api.github.com/repos/robertodr/psi4/issues{/number}","pulls_url":"https://api.github.com/repos/robertodr/psi4/pulls{/number}","milestones_url":"https://api.github.com/repos/robertodr/psi4/milestones{/number}","notifications_url":"https://api.github.com/repos/robertodr/psi4/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/robertodr/psi4/labels{/name}","releases_url":"https://api.github.com/repos/robertodr/psi4/releases{/id}","deployments_url":"https://api.github.com/repos/robertodr/psi4/deployments","created_at":"2016-10-21T10:53:06Z","updated_at":"2018-12-06T21:02:51Z","pushed_at":"2018-12-21T16:55:05Z","git_url":"git://github.com/robertodr/psi4.git","ssh_url":"git@github.com:robertodr/psi4.git","clone_url":"https://github.com/robertodr/psi4.git","svn_url":"https://github.com/robertodr/psi4","homepage":"http://psicode.org","size":90821,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"psi4:master","ref":"master","sha":"c27a5c40439dd7f0426890e070c914bfd5f89db5","user":{"login":"psi4","id":2636883,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MzY4ODM=","avatar_url":"https://avatars1.githubusercontent.com/u/2636883?v=4","gravatar_id":"","url":"https://api.github.com/users/psi4","html_url":"https://github.com/psi4","followers_url":"https://api.github.com/users/psi4/followers","following_url":"https://api.github.com/users/psi4/following{/other_user}","gists_url":"https://api.github.com/users/psi4/gists{/gist_id}","starred_url":"https://api.github.com/users/psi4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psi4/subscriptions","organizations_url":"https://api.github.com/users/psi4/orgs","repos_url":"https://api.github.com/users/psi4/repos","events_url":"https://api.github.com/users/psi4/events{/privacy}","received_events_url":"https://api.github.com/users/psi4/received_events","type":"Organization","site_admin":false},"repo":{"id":9174469,"node_id":"MDEwOlJlcG9zaXRvcnk5MTc0NDY5","name":"psi4","full_name":"psi4/psi4","private":false,"owner":{"login":"psi4","id":2636883,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MzY4ODM=","avatar_url":"https://avatars1.githubusercontent.com/u/2636883?v=4","gravatar_id":"","url":"https://api.github.com/users/psi4","html_url":"https://github.com/psi4","followers_url":"https://api.github.com/users/psi4/followers","following_url":"https://api.github.com/users/psi4/following{/other_user}","gists_url":"https://api.github.com/users/psi4/gists{/gist_id}","starred_url":"https://api.github.com/users/psi4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psi4/subscriptions","organizations_url":"https://api.github.com/users/psi4/orgs","repos_url":"https://api.github.com/users/psi4/repos","events_url":"https://api.github.com/users/psi4/events{/privacy}","received_events_url":"https://api.github.com/users/psi4/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/psi4/psi4","description":"Open-Source Quantum Chemistry – an electronic structure package in C++ driven by Python","fork":false,"url":"https://api.github.com/repos/psi4/psi4","forks_url":"https://api.github.com/repos/psi4/psi4/forks","keys_url":"https://api.github.com/repos/psi4/psi4/keys{/key_id}","collaborators_url":"https://api.github.com/repos/psi4/psi4/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/psi4/psi4/teams","hooks_url":"https://api.github.com/repos/psi4/psi4/hooks","issue_events_url":"https://api.github.com/repos/psi4/psi4/issues/events{/number}","events_url":"https://api.github.com/repos/psi4/psi4/events","assignees_url":"https://api.github.com/repos/psi4/psi4/assignees{/user}","branches_url":"https://api.github.com/repos/psi4/psi4/branches{/branch}","tags_url":"https://api.github.com/repos/psi4/psi4/tags","blobs_url":"https://api.github.com/repos/psi4/psi4/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/psi4/psi4/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/psi4/psi4/git/refs{/sha}","trees_url":"https://api.github.com/repos/psi4/psi4/git/trees{/sha}","statuses_url":"https://api.github.com/repos/psi4/psi4/statuses/{sha}","languages_url":"https://api.github.com/repos/psi4/psi4/languages","stargazers_url":"https://api.github.com/repos/psi4/psi4/stargazers","contributors_url":"https://api.github.com/repos/psi4/psi4/contributors","subscribers_url":"https://api.github.com/repos/psi4/psi4/subscribers","subscription_url":"https://api.github.com/repos/psi4/psi4/subscription","commits_url":"https://api.github.com/repos/psi4/psi4/commits{/sha}","git_commits_url":"https://api.github.com/repos/psi4/psi4/git/commits{/sha}","comments_url":"https://api.github.com/repos/psi4/psi4/comments{/number}","issue_comment_url":"https://api.github.com/repos/psi4/psi4/issues/comments{/number}","contents_url":"https://api.github.com/repos/psi4/psi4/contents/{+path}","compare_url":"https://api.github.com/repos/psi4/psi4/compare/{base}...{head}","merges_url":"https://api.github.com/repos/psi4/psi4/merges","archive_url":"https://api.github.com/repos/psi4/psi4/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/psi4/psi4/downloads","issues_url":"https://api.github.com/repos/psi4/psi4/issues{/number}","pulls_url":"https://api.github.com/repos/psi4/psi4/pulls{/number}","milestones_url":"https://api.github.com/repos/psi4/psi4/milestones{/number}","notifications_url":"https://api.github.com/repos/psi4/psi4/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/psi4/psi4/labels{/name}","releases_url":"https://api.github.com/repos/psi4/psi4/releases{/id}","deployments_url":"https://api.github.com/repos/psi4/psi4/deployments","created_at":"2013-04-02T16:21:04Z","updated_at":"2018-12-20T19:06:08Z","pushed_at":"2018-12-21T14:28:54Z","git_url":"git://github.com/psi4/psi4.git","ssh_url":"git@github.com:psi4/psi4.git","clone_url":"https://github.com/psi4/psi4.git","svn_url":"https://github.com/psi4/psi4","homepage":"http://psicode.org","size":90006,"stargazers_count":269,"watchers_count":269,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":209,"mirror_url":null,"archived":false,"open_issues_count":130,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"forks":209,"open_issues":130,"watchers":269,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/psi4/psi4/pulls/1443"},"html":{"href":"https://github.com/psi4/psi4/pull/1443"},"issue":{"href":"https://api.github.com/repos/psi4/psi4/issues/1443"},"comments":{"href":"https://api.github.com/repos/psi4/psi4/issues/1443/comments"},"review_comments":{"href":"https://api.github.com/repos/psi4/psi4/pulls/1443/comments"},"review_comment":{"href":"https://api.github.com/repos/psi4/psi4/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/psi4/psi4/pulls/1443/commits"},"statuses":{"href":"https://api.github.com/repos/psi4/psi4/statuses/48c54001bd6b64ca9bba0d7459da0b4bd8b0a009"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":16,"additions":2372,"deletions":1186,"changed_files":69}}
{"actor":{"display_login":"robertodr"}}