GitHub PullRequestReviewCommentEvent at 2014-08-12 04:08:42
Repository: spark
Actor: mengxr
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/16094851","id":16094851,"diff_hunk":"@@ -160,6 +161,15 @@ def squared_distance(self, other):\n                 j += 1\n             return result\n \n+    def toDense(self):\n+        \"\"\"\n+        Returns a copy of this SparseVector as a 1-dimensional NumPy array.\n+        \"\"\"\n+        arr = numpy.zeros(self.size)\n+        for i in range(self.indices.size):","path":"python/pyspark/mllib/linalg.py","position":17,"original_position":17,"commit_id":"ab48f6eb01541309ffa2d86febb0a039f435a60a","original_commit_id":"ab48f6eb01541309ffa2d86febb0a039f435a60a","user":{"login":"mengxr","id":829644,"avatar_url":"https://avatars.githubusercontent.com/u/829644?v=2","gravatar_id":"0e16fce91950d1b5a312649751ff1b14","url":"https://api.github.com/users/mengxr","html_url":"https://github.com/mengxr","followers_url":"https://api.github.com/users/mengxr/followers","following_url":"https://api.github.com/users/mengxr/following{/other_user}","gists_url":"https://api.github.com/users/mengxr/gists{/gist_id}","starred_url":"https://api.github.com/users/mengxr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mengxr/subscriptions","organizations_url":"https://api.github.com/users/mengxr/orgs","repos_url":"https://api.github.com/users/mengxr/repos","events_url":"https://api.github.com/users/mengxr/events{/privacy}","received_events_url":"https://api.github.com/users/mengxr/received_events","type":"User","site_admin":false},"body":"`range` -> `xrange`","created_at":"2014-08-12T04:08:42Z","updated_at":"2014-08-12T04:08:42Z","html_url":"https://github.com/apache/spark/pull/1878#discussion_r16094851","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/1878","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/16094851"},"html":{"href":"https://github.com/apache/spark/pull/1878#discussion_r16094851"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/1878"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/1878","id":19575874,"html_url":"https://github.com/apache/spark/pull/1878","diff_url":"https://github.com/apache/spark/pull/1878.diff","patch_url":"https://github.com/apache/spark/pull/1878.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/1878","number":1878,"state":"open","title":"[SPARK-2850] [mllib] MLlib stats examples + small fixes","user":{"login":"jkbradley","id":5084283,"avatar_url":"https://avatars.githubusercontent.com/u/5084283?v=2","gravatar_id":"1ec25fbe943954fbffcfe065c93a1e40","url":"https://api.github.com/users/jkbradley","html_url":"https://github.com/jkbradley","followers_url":"https://api.github.com/users/jkbradley/followers","following_url":"https://api.github.com/users/jkbradley/following{/other_user}","gists_url":"https://api.github.com/users/jkbradley/gists{/gist_id}","starred_url":"https://api.github.com/users/jkbradley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkbradley/subscriptions","organizations_url":"https://api.github.com/users/jkbradley/orgs","repos_url":"https://api.github.com/users/jkbradley/repos","events_url":"https://api.github.com/users/jkbradley/events{/privacy}","received_events_url":"https://api.github.com/users/jkbradley/received_events","type":"User","site_admin":false},"body":"Added examples for statistical summarization:\r\n* Scala: StatisticalSummary.scala\r\n** Tests: correlation, MultivariateOnlineSummarizer\r\n* python: statistical_summary.py\r\n** Tests: correlation (since MultivariateOnlineSummarizer has no Python API)\r\n\r\nAdded examples for random and sampled RDDs:\r\n* Scala: RandomAndSampledRDDs.scala\r\n* python: random_and_sampled_rdds.py\r\n* Both test:\r\n** RandomRDDGenerators.normalRDD, normalVectorRDD\r\n** RDD.sample, takeSample, sampleByKey\r\n\r\nAdded sc.stop() to all examples.\r\n\r\nCorrelationSuite.scala\r\n* Added 1 test for RDDs with only 1 value\r\n\r\nRowMatrix.scala\r\n* numCols(): Added check for numRows = 0, with error message.\r\n* computeCovariance(): Added check for numRows <= 1, with error message.\r\n\r\nPython SparseVector (pyspark/mllib/linalg.py)\r\n* Added toDense() function\r\n\r\npython/run-tests script\r\n* Added stat.py (doc test)\r\n\r\nCC: @mengxr @dorx  Main changes were examples to show usage across APIs.","created_at":"2014-08-10T18:37:26Z","updated_at":"2014-08-12T04:08:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"893ae2ddf4682cbc46a3da79935727fea4b32a9c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/1878/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/1878/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments/{number}","comments_url":"https://api.github.com/repos/apache/spark/issues/1878/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/ab48f6eb01541309ffa2d86febb0a039f435a60a","head":{"label":"jkbradley:mllib-stats-api-check","ref":"mllib-stats-api-check","sha":"ab48f6eb01541309ffa2d86febb0a039f435a60a","user":{"login":"jkbradley","id":5084283,"avatar_url":"https://avatars.githubusercontent.com/u/5084283?v=2","gravatar_id":"1ec25fbe943954fbffcfe065c93a1e40","url":"https://api.github.com/users/jkbradley","html_url":"https://github.com/jkbradley","followers_url":"https://api.github.com/users/jkbradley/followers","following_url":"https://api.github.com/users/jkbradley/following{/other_user}","gists_url":"https://api.github.com/users/jkbradley/gists{/gist_id}","starred_url":"https://api.github.com/users/jkbradley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkbradley/subscriptions","organizations_url":"https://api.github.com/users/jkbradley/orgs","repos_url":"https://api.github.com/users/jkbradley/repos","events_url":"https://api.github.com/users/jkbradley/events{/privacy}","received_events_url":"https://api.github.com/users/jkbradley/received_events","type":"User","site_admin":false},"repo":{"id":19877817,"name":"spark","full_name":"jkbradley/spark","owner":{"login":"jkbradley","id":5084283,"avatar_url":"https://avatars.githubusercontent.com/u/5084283?v=2","gravatar_id":"1ec25fbe943954fbffcfe065c93a1e40","url":"https://api.github.com/users/jkbradley","html_url":"https://github.com/jkbradley","followers_url":"https://api.github.com/users/jkbradley/followers","following_url":"https://api.github.com/users/jkbradley/following{/other_user}","gists_url":"https://api.github.com/users/jkbradley/gists{/gist_id}","starred_url":"https://api.github.com/users/jkbradley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkbradley/subscriptions","organizations_url":"https://api.github.com/users/jkbradley/orgs","repos_url":"https://api.github.com/users/jkbradley/repos","events_url":"https://api.github.com/users/jkbradley/events{/privacy}","received_events_url":"https://api.github.com/users/jkbradley/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jkbradley/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/jkbradley/spark","forks_url":"https://api.github.com/repos/jkbradley/spark/forks","keys_url":"https://api.github.com/repos/jkbradley/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jkbradley/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jkbradley/spark/teams","hooks_url":"https://api.github.com/repos/jkbradley/spark/hooks","issue_events_url":"https://api.github.com/repos/jkbradley/spark/issues/events{/number}","events_url":"https://api.github.com/repos/jkbradley/spark/events","assignees_url":"https://api.github.com/repos/jkbradley/spark/assignees{/user}","branches_url":"https://api.github.com/repos/jkbradley/spark/branches{/branch}","tags_url":"https://api.github.com/repos/jkbradley/spark/tags","blobs_url":"https://api.github.com/repos/jkbradley/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jkbradley/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jkbradley/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/jkbradley/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jkbradley/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/jkbradley/spark/languages","stargazers_url":"https://api.github.com/repos/jkbradley/spark/stargazers","contributors_url":"https://api.github.com/repos/jkbradley/spark/contributors","subscribers_url":"https://api.github.com/repos/jkbradley/spark/subscribers","subscription_url":"https://api.github.com/repos/jkbradley/spark/subscription","commits_url":"https://api.github.com/repos/jkbradley/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/jkbradley/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/jkbradley/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/jkbradley/spark/issues/comments/{number}","contents_url":"https://api.github.com/repos/jkbradley/spark/contents/{+path}","compare_url":"https://api.github.com/repos/jkbradley/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jkbradley/spark/merges","archive_url":"https://api.github.com/repos/jkbradley/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jkbradley/spark/downloads","issues_url":"https://api.github.com/repos/jkbradley/spark/issues{/number}","pulls_url":"https://api.github.com/repos/jkbradley/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/jkbradley/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/jkbradley/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jkbradley/spark/labels{/name}","releases_url":"https://api.github.com/repos/jkbradley/spark/releases{/id}","created_at":"2014-05-17T03:51:41Z","updated_at":"2014-07-09T21:38:00Z","pushed_at":"2014-08-10T18:26:11Z","git_url":"git://github.com/jkbradley/spark.git","ssh_url":"git@github.com:jkbradley/spark.git","clone_url":"https://github.com/jkbradley/spark.git","svn_url":"https://github.com/jkbradley/spark","homepage":null,"size":74644,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"482c5afbf6f3f12ac23851300a33249b26ddff3c","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=2","gravatar_id":"a676c0bf448fcd49f588249ead719b4c","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":17165658,"name":"spark","full_name":"apache/spark","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=2","gravatar_id":"a676c0bf448fcd49f588249ead719b4c","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/spark","description":"Mirror of Apache Spark","fork":false,"url":"https://api.github.com/repos/apache/spark","forks_url":"https://api.github.com/repos/apache/spark/forks","keys_url":"https://api.github.com/repos/apache/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/spark/teams","hooks_url":"https://api.github.com/repos/apache/spark/hooks","issue_events_url":"https://api.github.com/repos/apache/spark/issues/events{/number}","events_url":"https://api.github.com/repos/apache/spark/events","assignees_url":"https://api.github.com/repos/apache/spark/assignees{/user}","branches_url":"https://api.github.com/repos/apache/spark/branches{/branch}","tags_url":"https://api.github.com/repos/apache/spark/tags","blobs_url":"https://api.github.com/repos/apache/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/spark/languages","stargazers_url":"https://api.github.com/repos/apache/spark/stargazers","contributors_url":"https://api.github.com/repos/apache/spark/contributors","subscribers_url":"https://api.github.com/repos/apache/spark/subscribers","subscription_url":"https://api.github.com/repos/apache/spark/subscription","commits_url":"https://api.github.com/repos/apache/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/spark/issues/comments/{number}","contents_url":"https://api.github.com/repos/apache/spark/contents/{+path}","compare_url":"https://api.github.com/repos/apache/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/spark/merges","archive_url":"https://api.github.com/repos/apache/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/spark/downloads","issues_url":"https://api.github.com/repos/apache/spark/issues{/number}","pulls_url":"https://api.github.com/repos/apache/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/spark/labels{/name}","releases_url":"https://api.github.com/repos/apache/spark/releases{/id}","created_at":"2014-02-25T08:00:08Z","updated_at":"2014-08-12T04:04:39Z","pushed_at":"2014-08-12T03:46:01Z","git_url":"git://github.com/apache/spark.git","ssh_url":"git@github.com:apache/spark.git","clone_url":"https://github.com/apache/spark.git","svn_url":"https://github.com/apache/spark","homepage":null,"size":2588606,"stargazers_count":1007,"watchers_count":1007,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":1047,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":264,"forks":1047,"open_issues":264,"watchers":1007,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/1878"},"html":{"href":"https://github.com/apache/spark/pull/1878"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/1878"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/1878/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/1878/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/1878/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/ab48f6eb01541309ffa2d86febb0a039f435a60a"}}}}