{"action":"created","comment":{"url":"https://api.github.com/repos/apache/incubator-systemml/pulls/comments/90695735","pull_request_review_id":11215798,"id":90695735,"diff_hunk":"@@ -51,8 +51,12 @@ def createJavaObject(sc, obj_type):\n     try:\n         return _createJavaObject(sc, obj_type)\n     except (py4j.protocol.Py4JError, TypeError):\n-        import imp\n-        jar_file_name = os.path.join(imp.find_module(\"systemml\")[1], \"systemml-java\", 'SystemML.jar')\n+        import imp, fnmatch\n+        jar_file_name = '_ignore.jar'\n+        java_dir = os.path.join(imp.find_module(\"systemml\")[1], \"systemml-java\")\n+        for file in os.listdir(java_dir):\n+            if fnmatch.fnmatch(file, 'systemml-*-incubating-SNAPSHOT.jar'):\n+                jar_file_name = os.path.join(java_dir, file)","path":"src/main/python/systemml/classloader.py","position":11,"original_position":11,"commit_id":"afac2b2eeca75b7fd9474220d31caf7f357d60ec","original_commit_id":"8afae2265685368b3a2c005bcbe59000c0e9d9f1","user":{"login":"niketanpansare","id":11686380,"avatar_url":"https://avatars.githubusercontent.com/u/11686380?v=3","gravatar_id":"","url":"https://api.github.com/users/niketanpansare","html_url":"https://github.com/niketanpansare","followers_url":"https://api.github.com/users/niketanpansare/followers","following_url":"https://api.github.com/users/niketanpansare/following{/other_user}","gists_url":"https://api.github.com/users/niketanpansare/gists{/gist_id}","starred_url":"https://api.github.com/users/niketanpansare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niketanpansare/subscriptions","organizations_url":"https://api.github.com/users/niketanpansare/orgs","repos_url":"https://api.github.com/users/niketanpansare/repos","events_url":"https://api.github.com/users/niketanpansare/events{/privacy}","received_events_url":"https://api.github.com/users/niketanpansare/received_events","type":"User","site_admin":false},"body":"Yes. Please try following script on your spark cluster:\r\n\r\n```python\r\nimport systemml as sml\r\nfrom systemml.random import uniform\r\nm1 = uniform(size=(10000,10000))\r\nm2 = m1.dot(m1).sum().toNumPy()\r\nprint(m2)\r\n```","created_at":"2016-12-02T18:38:51Z","updated_at":"2016-12-02T18:38:51Z","html_url":"https://github.com/apache/incubator-systemml/pull/290#discussion_r90695735","pull_request_url":"https://api.github.com/repos/apache/incubator-systemml/pulls/290","_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-systemml/pulls/comments/90695735"},"html":{"href":"https://github.com/apache/incubator-systemml/pull/290#discussion_r90695735"},"pull_request":{"href":"https://api.github.com/repos/apache/incubator-systemml/pulls/290"}}},"pull_request":{"url":"https://api.github.com/repos/apache/incubator-systemml/pulls/290","id":94286596,"html_url":"https://github.com/apache/incubator-systemml/pull/290","diff_url":"https://github.com/apache/incubator-systemml/pull/290.diff","patch_url":"https://github.com/apache/incubator-systemml/pull/290.patch","issue_url":"https://api.github.com/repos/apache/incubator-systemml/issues/290","number":290,"state":"open","locked":false,"title":"[SYSTEMML-1116] Make SystemML Python DSL NumPy-friendly","user":{"login":"niketanpansare","id":11686380,"avatar_url":"https://avatars.githubusercontent.com/u/11686380?v=3","gravatar_id":"","url":"https://api.github.com/users/niketanpansare","html_url":"https://github.com/niketanpansare","followers_url":"https://api.github.com/users/niketanpansare/followers","following_url":"https://api.github.com/users/niketanpansare/following{/other_user}","gists_url":"https://api.github.com/users/niketanpansare/gists{/gist_id}","starred_url":"https://api.github.com/users/niketanpansare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niketanpansare/subscriptions","organizations_url":"https://api.github.com/users/niketanpansare/orgs","repos_url":"https://api.github.com/users/niketanpansare/repos","events_url":"https://api.github.com/users/niketanpansare/events{/privacy}","received_events_url":"https://api.github.com/users/niketanpansare/received_events","type":"User","site_admin":false},"body":"- Bumped up the Python package version number @deroneriksson \r\n\r\n- Allow SystemML matrix to be invoked by numpy methods ( @dusenberrymw  ):\r\n```python\r\nimport systemml as sml\r\nimport numpy as np\r\nm1 = sml.matrix(np.ones((3,3)) + 2)\r\nm2 = sml.matrix(np.ones((3,3)) + 3)\r\nnp.add(m1, m2).toNumPyArray()\r\n```\r\n\r\n- Allow users to control the depth of lazy evaluation (as per @frreiss  suggestion).\r\n```python\r\n>>> import systemml as sml\r\n>>> import numpy as np\r\n>>> m1 = sml.matrix(np.ones((3,3)) + 2)\r\n\r\nWelcome to Apache SystemML!\r\n\r\n>>> m2 = sml.matrix(np.ones((3,3)) + 3)\r\n>>> np.add(m1, m2) + m1\r\n# This matrix (mVar4) is backed by below given PyDML script (which is not yet evaluated). To fetch the data of this matrix, invoke toNumPyArray() or toDataFrame() or toPandas() methods.\r\nmVar2 = load(\" \", format=\"csv\")\r\nmVar1 = load(\" \", format=\"csv\")\r\nmVar3 = mVar1 + mVar2\r\nmVar4 = mVar3 + mVar1\r\nsave(mVar4, \" \")\r\n\r\n\r\n>>> sml.set_max_depth(1)\r\n>>> m1 = sml.matrix(np.ones((3,3)) + 2)\r\n>>> m2 = sml.matrix(np.ones((3,3)) + 3)\r\n>>> np.add(m1, m2) + m1\r\n# This matrix (mVar8) is backed by NumPy array. To fetch the NumPy array, invoke toNumPyArray() method.\r\n```\r\n\r\nFew caveats:\r\n- The current version of NumPy explicitly disables overriding `ufunc`, but this should be enabled in next release. Until then to test above code, please use:\r\n\r\n```bash\r\ngit clone https://github.com/niketanpansare/numpy.git\r\ncd numpy\r\npython setup.py install\r\n```\r\n\r\n- Following NumPy ufunc that are not yet implemented in SystemML's Python DSL:\r\n```bash\r\nconj, hyperbolic/inverse-hyperbolic functions(i.e. sinh, arcsinh, cosh, ...), bitwise operator, xor operator, isreal, iscomplex, isfinite, isinf, isnan, copysign, nextafter, modf, frexp, trunc\r\n```","created_at":"2016-11-18T01:24:37Z","updated_at":"2016-12-02T18:38:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"772ec63132713b149f417be5f9b92137db00c1d2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/incubator-systemml/pulls/290/commits","review_comments_url":"https://api.github.com/repos/apache/incubator-systemml/pulls/290/comments","review_comment_url":"https://api.github.com/repos/apache/incubator-systemml/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/incubator-systemml/issues/290/comments","statuses_url":"https://api.github.com/repos/apache/incubator-systemml/statuses/afac2b2eeca75b7fd9474220d31caf7f357d60ec","head":{"label":"niketanpansare:python_dsl","ref":"python_dsl","sha":"afac2b2eeca75b7fd9474220d31caf7f357d60ec","user":{"login":"niketanpansare","id":11686380,"avatar_url":"https://avatars.githubusercontent.com/u/11686380?v=3","gravatar_id":"","url":"https://api.github.com/users/niketanpansare","html_url":"https://github.com/niketanpansare","followers_url":"https://api.github.com/users/niketanpansare/followers","following_url":"https://api.github.com/users/niketanpansare/following{/other_user}","gists_url":"https://api.github.com/users/niketanpansare/gists{/gist_id}","starred_url":"https://api.github.com/users/niketanpansare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niketanpansare/subscriptions","organizations_url":"https://api.github.com/users/niketanpansare/orgs","repos_url":"https://api.github.com/users/niketanpansare/repos","events_url":"https://api.github.com/users/niketanpansare/events{/privacy}","received_events_url":"https://api.github.com/users/niketanpansare/received_events","type":"User","site_admin":false},"repo":{"id":53172132,"name":"incubator-systemml","full_name":"niketanpansare/incubator-systemml","owner":{"login":"niketanpansare","id":11686380,"avatar_url":"https://avatars.githubusercontent.com/u/11686380?v=3","gravatar_id":"","url":"https://api.github.com/users/niketanpansare","html_url":"https://github.com/niketanpansare","followers_url":"https://api.github.com/users/niketanpansare/followers","following_url":"https://api.github.com/users/niketanpansare/following{/other_user}","gists_url":"https://api.github.com/users/niketanpansare/gists{/gist_id}","starred_url":"https://api.github.com/users/niketanpansare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niketanpansare/subscriptions","organizations_url":"https://api.github.com/users/niketanpansare/orgs","repos_url":"https://api.github.com/users/niketanpansare/repos","events_url":"https://api.github.com/users/niketanpansare/events{/privacy}","received_events_url":"https://api.github.com/users/niketanpansare/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/niketanpansare/incubator-systemml","description":"Mirror of Apache SystemML (Incubating)","fork":true,"url":"https://api.github.com/repos/niketanpansare/incubator-systemml","forks_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/forks","keys_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/teams","hooks_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/hooks","issue_events_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/issues/events{/number}","events_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/events","assignees_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/assignees{/user}","branches_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/branches{/branch}","tags_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/tags","blobs_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/git/refs{/sha}","trees_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/statuses/{sha}","languages_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/languages","stargazers_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/stargazers","contributors_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/contributors","subscribers_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/subscribers","subscription_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/subscription","commits_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/commits{/sha}","git_commits_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/git/commits{/sha}","comments_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/comments{/number}","issue_comment_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/issues/comments{/number}","contents_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/contents/{+path}","compare_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/merges","archive_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/downloads","issues_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/issues{/number}","pulls_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/pulls{/number}","milestones_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/milestones{/number}","notifications_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/labels{/name}","releases_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/releases{/id}","deployments_url":"https://api.github.com/repos/niketanpansare/incubator-systemml/deployments","created_at":"2016-03-04T23:28:50Z","updated_at":"2016-03-04T23:28:59Z","pushed_at":"2016-12-02T18:21:46Z","git_url":"git://github.com/niketanpansare/incubator-systemml.git","ssh_url":"git@github.com:niketanpansare/incubator-systemml.git","clone_url":"https://github.com/niketanpansare/incubator-systemml.git","svn_url":"https://github.com/niketanpansare/incubator-systemml","homepage":null,"size":191569,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"d786e27f8f8bdfe8e7f6702a70d1a1165498e2a6","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":45896813,"name":"incubator-systemml","full_name":"apache/incubator-systemml","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/incubator-systemml","description":"Mirror of Apache SystemML (Incubating)","fork":false,"url":"https://api.github.com/repos/apache/incubator-systemml","forks_url":"https://api.github.com/repos/apache/incubator-systemml/forks","keys_url":"https://api.github.com/repos/apache/incubator-systemml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/incubator-systemml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/incubator-systemml/teams","hooks_url":"https://api.github.com/repos/apache/incubator-systemml/hooks","issue_events_url":"https://api.github.com/repos/apache/incubator-systemml/issues/events{/number}","events_url":"https://api.github.com/repos/apache/incubator-systemml/events","assignees_url":"https://api.github.com/repos/apache/incubator-systemml/assignees{/user}","branches_url":"https://api.github.com/repos/apache/incubator-systemml/branches{/branch}","tags_url":"https://api.github.com/repos/apache/incubator-systemml/tags","blobs_url":"https://api.github.com/repos/apache/incubator-systemml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/incubator-systemml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/incubator-systemml/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/incubator-systemml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/incubator-systemml/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/incubator-systemml/languages","stargazers_url":"https://api.github.com/repos/apache/incubator-systemml/stargazers","contributors_url":"https://api.github.com/repos/apache/incubator-systemml/contributors","subscribers_url":"https://api.github.com/repos/apache/incubator-systemml/subscribers","subscription_url":"https://api.github.com/repos/apache/incubator-systemml/subscription","commits_url":"https://api.github.com/repos/apache/incubator-systemml/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/incubator-systemml/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/incubator-systemml/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/incubator-systemml/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/incubator-systemml/contents/{+path}","compare_url":"https://api.github.com/repos/apache/incubator-systemml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/incubator-systemml/merges","archive_url":"https://api.github.com/repos/apache/incubator-systemml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/incubator-systemml/downloads","issues_url":"https://api.github.com/repos/apache/incubator-systemml/issues{/number}","pulls_url":"https://api.github.com/repos/apache/incubator-systemml/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/incubator-systemml/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/incubator-systemml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/incubator-systemml/labels{/name}","releases_url":"https://api.github.com/repos/apache/incubator-systemml/releases{/id}","deployments_url":"https://api.github.com/repos/apache/incubator-systemml/deployments","created_at":"2015-11-10T08:00:06Z","updated_at":"2016-12-01T08:53:11Z","pushed_at":"2016-12-02T18:21:47Z","git_url":"git://github.com/apache/incubator-systemml.git","ssh_url":"git@github.com:apache/incubator-systemml.git","clone_url":"https://github.com/apache/incubator-systemml.git","svn_url":"https://github.com/apache/incubator-systemml","homepage":null,"size":195517,"stargazers_count":428,"watchers_count":428,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":163,"mirror_url":"git://git.apache.org/incubator-systemml.git","open_issues_count":16,"forks":163,"open_issues":16,"watchers":428,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-systemml/pulls/290"},"html":{"href":"https://github.com/apache/incubator-systemml/pull/290"},"issue":{"href":"https://api.github.com/repos/apache/incubator-systemml/issues/290"},"comments":{"href":"https://api.github.com/repos/apache/incubator-systemml/issues/290/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/incubator-systemml/pulls/290/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/incubator-systemml/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/incubator-systemml/pulls/290/commits"},"statuses":{"href":"https://api.github.com/repos/apache/incubator-systemml/statuses/afac2b2eeca75b7fd9474220d31caf7f357d60ec"}}}}
{"actor":{"display_login":"niketanpansare"}}