{"action":"created","comment":{"url":"https://api.github.com/repos/scipy/scipy/pulls/comments/88734084","pull_request_review_id":9301564,"id":88734084,"diff_hunk":"@@ -1076,46 +1117,173 @@ cdef public class cKDTree [object ckdtree, type ckdtree_type]:\n         else:\n             raise ValueError(\"Invalid output type\") \n \n+    def _build_weights(cKDTree self, object weights):\n+        \"\"\"\n+        _build_weights(weights)\n+\n+        Compute weights of nodes from weights of data points. This will sum\n+        up the total weight per node. This function is used internally.\n+\n+        Parameters\n+        ----------\n+        weights : array_like\n+            weights of data points; must be the same length as the data points.\n+            currently only scalar weights are supported. Therefore the weights\n+            array must be 1 dimensional.\n+\n+        Returns\n+        -------\n+        node_weights : array_like\n+            total weight for each KD-Tree node.\n+\n+        \"\"\"\n+        cdef np.intp_t num_of_nodes\n+        cdef np.ndarray[np.float64_t, ndim=1, mode=\"c\"] node_weights\n+        cdef np.ndarray[np.float64_t, ndim=1, mode=\"c\"] proper_weights\n+\n+        num_of_nodes = self.tree_buffer.size();\n+        node_weights = np.empty(num_of_nodes, dtype=np.float64)\n+\n+        # FIXME: use templates to avoid the type conversion \n+        proper_weights = np.ascontiguousarray(weights, dtype=np.float64)\n+\n+        if len(proper_weights) != self.n:\n+            raise ValueError('Number of weights differ from the number of data points')\n+\n+        build_weights(<ckdtree*> self, <np.float64_t*>np.PyArray_DATA(node_weights),\n+                            <np.float64_t*> np.PyArray_DATA(proper_weights))\n+\n+        return node_weights\n \n     # ---------------\n     # count_neighbors\n     # ---------------\n \n     @cython.boundscheck(False)\n-    def count_neighbors(cKDTree self, cKDTree other, object r, np.float64_t p=2.):\n+    def count_neighbors(cKDTree self, cKDTree other, object r, np.float64_t p=2., \n+                        object weights=None, int cumulative=True):\n         \"\"\"\n-        count_neighbors(self, other, r, p=2.)\n+        count_neighbors(self, other, r, p=2., self_weights=None, other_weights=None, cumulative=True)\n \n-        Count how many nearby pairs can be formed.\n+        Count how many nearby pairs can be formed. (pair-counting)\n \n         Count the number of pairs (x1,x2) can be formed, with x1 drawn\n-        from self and x2 drawn from `other`, and where\n+        from self and x2 drawn from ``other``, and where\n         ``distance(x1, x2, p) <= r``.\n-        This is the \"two-point correlation\" described in Gray and Moore 2000,\n-        \"N-body problems in statistical learning\", and the code here is based\n-        on their algorithm.\n+\n+        Data points on self and other are optionally weighted by \n+        ``self_weights`` and ``other_weights``.\n+\n+        The algorithm we implement here is based on [1]_. See notes for further discussion.\n \n         Parameters\n         ----------\n         other : cKDTree instance\n-            The other tree to draw points from.\n+            The other tree to draw points from, can be the same tree as self.\n         r : float or one-dimensional array of floats\n             The radius to produce a count for. Multiple radii are searched with\n-            a single tree traversal.\n+            a single tree traversal. \n+            If the count is non-cumulative(``cumulative=False``), ``r`` defines \n+            the edges of the bins, and must be non-decreasing.\n         p : float, optional \n-            1<=p<=infinity, default 2.0\n-            Which Minkowski p-norm to use\n+            1<=p<=infinity. \n+            Which Minkowski p-norm to use.\n+            Default 2.0.\n+        weights : tuple, array_like, or None, optional\n+            If given as a tuple, weights[0] is the weights of points in self, and\n+            weights[1] is the weights of points in other; either can be None to \n+            indicate the points are unweighted.\n+            If given as an array_like, weights is the weights of points in self \n+            and other. If self and other are two different trees, an Error is raised.\n+            If None, the pair-counting is unweighted.\n+            Default: None\n+        cumulative : bool, optional\n+            Whether the returned counts are cumulative. When cumulative is set to ``False``\n+            the algorithm is optimized to work with a large number of bins (>10) specified\n+            by ``r``. When ``cumulative`` is set to True, the algorithm is optimized to work\n+            with a small number of ``r``. Default: True\n \n         Returns\n         -------\n-        result : int or 1-D array of ints\n-            The number of pairs.\n+        result : scalar or 1-D array\n+            The number of pairs. For unweighted counts, the result is integer.\n+            For weighted counts, the result is float.\n+            If cumulative is False, ``result[i]`` contains the counts with\n+            ``(-inf if i == 0 else r[i-1]) < R <= r[i]``\n+\n+        Notes\n+        -----\n+\n+        Pair-counting is the basic operation used to calculate the two point\n+        correlation functions from a data set composed of position of objects.\n+\n+        Two point correlation function measures the clustering of objects and\n+        is widely used in cosmology to quantify the large scale structure\n+        in our Universe, but it may be useful for data analysis in other fields\n+        where self-similar assembly of objects also occur.\n+\n+        The Landy-Szalay estimator for the two point correlation function of\n+        ``D`` measures the clustering signal in ``D``. [2]_\n+\n+        For example, given the position of two sets of objects,\n+\n+        - objects ``D`` (data) contains the clustering signal, and\n+\n+        - objects ``R`` (random) that contains no signal,\n+\n+        .. math::\n+\n+             \\\\xi(r) = \\\\frac{<D, D> - 2 f <D, R> + f^2<R, R>}{f^2<R, R>},\n+\n+        where the brakets represents counting pairs between two data sets\n+        in a finite bin around ``r`` (distance), corresponding to setting\n+        `cumulative=False`, and ``f = float(len(D)) / float(len(R))`` is the\n+        ratio between number of objects from data and random.\n+\n+        The algorithm implemented here is loosely based on the dual-tree algorithm\n+        described in [1]_. We","path":"scipy/spatial/ckdtree.pyx","position":null,"original_position":340,"commit_id":"df03bb107ea8eb7e0e67c272dee707dcbff804bc","original_commit_id":"0fc656227770d9855405780c169ea0144350fb78","user":{"login":"rgommers","id":98330,"avatar_url":"https://avatars.githubusercontent.com/u/98330?v=3","gravatar_id":"","url":"https://api.github.com/users/rgommers","html_url":"https://github.com/rgommers","followers_url":"https://api.github.com/users/rgommers/followers","following_url":"https://api.github.com/users/rgommers/following{/other_user}","gists_url":"https://api.github.com/users/rgommers/gists{/gist_id}","starred_url":"https://api.github.com/users/rgommers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgommers/subscriptions","organizations_url":"https://api.github.com/users/rgommers/orgs","repos_url":"https://api.github.com/users/rgommers/repos","events_url":"https://api.github.com/users/rgommers/events{/privacy}","received_events_url":"https://api.github.com/users/rgommers/received_events","type":"User","site_admin":false},"body":"changes in the last commit look good, thanks.","created_at":"2016-11-18T20:33:47Z","updated_at":"2016-11-18T20:33:47Z","html_url":"https://github.com/scipy/scipy/pull/5647#discussion_r88734084","pull_request_url":"https://api.github.com/repos/scipy/scipy/pulls/5647","_links":{"self":{"href":"https://api.github.com/repos/scipy/scipy/pulls/comments/88734084"},"html":{"href":"https://github.com/scipy/scipy/pull/5647#discussion_r88734084"},"pull_request":{"href":"https://api.github.com/repos/scipy/scipy/pulls/5647"}}},"pull_request":{"url":"https://api.github.com/repos/scipy/scipy/pulls/5647","id":54888139,"html_url":"https://github.com/scipy/scipy/pull/5647","diff_url":"https://github.com/scipy/scipy/pull/5647.diff","patch_url":"https://github.com/scipy/scipy/pull/5647.patch","issue_url":"https://api.github.com/repos/scipy/scipy/issues/5647","number":5647,"state":"open","locked":false,"title":"ENH: Faster count_neighour in cKDTree / + weighted input data","user":{"login":"rainwoodman","id":138060,"avatar_url":"https://avatars.githubusercontent.com/u/138060?v=3","gravatar_id":"","url":"https://api.github.com/users/rainwoodman","html_url":"https://github.com/rainwoodman","followers_url":"https://api.github.com/users/rainwoodman/followers","following_url":"https://api.github.com/users/rainwoodman/following{/other_user}","gists_url":"https://api.github.com/users/rainwoodman/gists{/gist_id}","starred_url":"https://api.github.com/users/rainwoodman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rainwoodman/subscriptions","organizations_url":"https://api.github.com/users/rainwoodman/orgs","repos_url":"https://api.github.com/users/rainwoodman/repos","events_url":"https://api.github.com/users/rainwoodman/events{/privacy}","received_events_url":"https://api.github.com/users/rainwoodman/received_events","type":"User","site_admin":false},"body":"Pure pair-counting is barely useful. A common form of data comes with a weight for counting, e.g. galaxies come with a weight to compensate for fiber collision (more collision=> larger weight), but there must be use cases in other fields as well.\n\nThis PR adds a parameters to cKDTree.count_neighbors to allow counting using weights per data instead of bare pair-counting.\n\nThe performance improvement on regular counting is measured with the CNeighbors benchmark suite. The 'deep' test was to simulate a very deep tree by setting leaf_size to 1. The shallow test uses leaf_size=8. For deep trees and large number of bins the improvement can be huge. \n\n```\n· Running 4 total benchmarks (2 commits * 1 environments * 2 benchmarks)\n[  0.00%] · For scipy commit hash 073cea63:\n[  0.00%] ·· Building for py2.7-Cython0.22-Tempita0.5.2-numpy1.8.2-six...\n[  0.00%] ·· Benchmarking py2.7-Cython0.22-Tempita0.5.2-numpy1.8.2-six\n[ 25.00%] ··· Running spatial.CNeighborsDeep.time_count_neighbors_deep                                                              ok\n[ 25.00%] ···· \n               ================== ========= ========= ========== ========== ==========\n               --                                          Nr                         \n               ------------------ ----------------------------------------------------\n                  (m, n1, n2)         2         10       100        400        1000   \n               ================== ========= ========= ========== ========== ==========\n                (2, 1000, 1000)     9.53ms   35.38ms   63.87ms    90.81ms    133.08ms \n                (8, 1000, 1000)    52.37ms   68.70ms   111.52ms   197.85ms   358.69ms \n                (16, 1000, 1000)   57.90ms   69.03ms   117.52ms   230.17ms   446.46ms \n               ================== ========= ========= ========== ========== ==========\n\n[ 50.00%] ··· Running spatial.CNeighborsDeep.time_count_neighbors_shallow                                                           ok\n[ 50.00%] ···· \n               ================== ========= ========= ========= ========== ==========\n               --                                          Nr                        \n               ------------------ ---------------------------------------------------\n                  (m, n1, n2)         2         10       100       400        1000   \n               ================== ========= ========= ========= ========== ==========\n                (2, 1000, 1000)     2.53ms    8.13ms   27.72ms   64.58ms    140.12ms \n                (8, 1000, 1000)     9.27ms   14.73ms   69.47ms   204.95ms   483.66ms \n                (16, 1000, 1000)   14.38ms   19.02ms   75.66ms   228.15ms   533.98ms \n               ================== ========= ========= ========= ========== ==========\n\n[ 50.00%] · For scipy commit hash 1eeef280:\n[ 50.00%] ·· Building for py2.7-Cython0.22-Tempita0.5.2-numpy1.8.2-six...\n[ 50.00%] ·· Benchmarking py2.7-Cython0.22-Tempita0.5.2-numpy1.8.2-six\n[ 75.00%] ··· Running spatial.CNeighborsDeep.time_count_neighbors_deep                                                              ok\n[ 75.00%] ···· \n               ================== ========= ========== ========== ========== ==========\n               --                                           Nr                         \n               ------------------ -----------------------------------------------------\n                  (m, n1, n2)         2         10        100        400        1000   \n               ================== ========= ========== ========== ========== ==========\n                (2, 1000, 1000)    15.20ms   53.33ms    122.29ms   218.28ms   381.81ms \n                (8, 1000, 1000)    81.06ms   104.77ms   299.83ms   724.96ms    1.53s   \n                (16, 1000, 1000)   85.85ms   109.32ms   330.75ms   847.97ms    1.85s   \n               ================== ========= ========== ========== ========== ==========\n\n[100.00%] ··· Running spatial.CNeighborsDeep.time_count_neighbors_shallow                                                           ok\n[100.00%] ···· \n               ================== ========= ========= ========= ========== ==========\n               --                                          Nr                        \n               ------------------ ---------------------------------------------------\n                  (m, n1, n2)         2         10       100       400        1000   \n               ================== ========= ========= ========= ========== ==========\n                (2, 1000, 1000)     3.00ms    9.29ms   31.96ms   81.50ms    171.24ms \n                (8, 1000, 1000)     9.80ms   15.73ms   72.63ms   217.93ms   511.78ms \n                (16, 1000, 1000)   15.53ms   21.28ms   79.60ms   240.17ms   560.76ms \n               ================== ========= ========= ========= ========== ==========\n\nBENCHMARK                                    BEFORE      AFTER     FACTOR\n...hbors_shallow((16, 1000, 1000), 1000)   560.76ms   533.98ms   0.95224981x\n...ghbors_shallow((16, 1000, 1000), 100)    79.60ms    75.66ms   0.95050881x\n...ghbors_shallow((16, 1000, 1000), 400)   240.17ms   228.15ms   0.94994971x\n...neighbors_shallow((8, 1000, 1000), 2)     9.80ms     9.27ms   0.94612715x\n...ghbors_shallow((8, 1000, 1000), 1000)   511.78ms   483.66ms   0.94505563x\n...ighbors_shallow((8, 1000, 1000), 400)   217.93ms   204.95ms   0.94044012x\n...eighbors_shallow((8, 1000, 1000), 10)    15.73ms    14.73ms   0.93628868x\n...eighbors_shallow((16, 1000, 1000), 2)    15.53ms    14.38ms   0.92618798x\n...ighbors_shallow((16, 1000, 1000), 10)    21.28ms    19.02ms   0.89399968x\n...eighbors_shallow((2, 1000, 1000), 10)     9.29ms     8.13ms   0.87586497x\n...ighbors_shallow((2, 1000, 1000), 100)    31.96ms    27.72ms   0.86724635x\n...neighbors_shallow((2, 1000, 1000), 2)     3.00ms     2.53ms   0.84421965x\n...ghbors_shallow((2, 1000, 1000), 1000)   171.24ms   140.12ms   0.81831769x\n...ighbors_shallow((2, 1000, 1000), 400)    81.50ms    64.58ms   0.79230330x\n...t_neighbors_deep((16, 1000, 1000), 2)    85.85ms    57.90ms   0.67439301x\n...t_neighbors_deep((2, 1000, 1000), 10)    53.33ms    35.38ms   0.66339412x\n...t_neighbors_deep((8, 1000, 1000), 10)   104.77ms    68.70ms   0.65576404x\n...nt_neighbors_deep((8, 1000, 1000), 2)    81.06ms    52.37ms   0.64604150x\n..._neighbors_deep((16, 1000, 1000), 10)   109.32ms    69.03ms   0.63143677x\n...nt_neighbors_deep((2, 1000, 1000), 2)    15.20ms     9.53ms   0.62687735x\n..._neighbors_deep((2, 1000, 1000), 100)   122.29ms    63.87ms   0.52225190x\n..._neighbors_deep((2, 1000, 1000), 400)   218.28ms    90.81ms   0.41603387x\n..._neighbors_deep((8, 1000, 1000), 100)   299.83ms   111.52ms   0.37193161x\n...neighbors_deep((16, 1000, 1000), 100)   330.75ms   117.52ms   0.35531857x\n...neighbors_deep((2, 1000, 1000), 1000)   381.81ms   133.08ms   0.34853469x\n..._neighbors_deep((8, 1000, 1000), 400)   724.96ms   197.85ms   0.27290822x\n...neighbors_deep((16, 1000, 1000), 400)   847.97ms   230.17ms   0.27143081x\n...eighbors_deep((16, 1000, 1000), 1000)      1.85s   446.46ms   0.24083336x\n...neighbors_deep((8, 1000, 1000), 1000)      1.53s   358.69ms   0.23479183x\n\nSOME BENCHMARKS HAVE CHANGED SIGNIFICANTLY.\n```\n","created_at":"2016-01-01T06:37:11Z","updated_at":"2016-11-18T20:33:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c4f5bec67c31a541c6590272f969ae4f95d88247","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/scipy/scipy/milestones/30","html_url":"https://github.com/scipy/scipy/milestones/0.19.0","labels_url":"https://api.github.com/repos/scipy/scipy/milestones/30/labels","id":1836547,"number":30,"title":"0.19.0","description":"","creator":{"login":"ev-br","id":2133832,"avatar_url":"https://avatars.githubusercontent.com/u/2133832?v=3","gravatar_id":"","url":"https://api.github.com/users/ev-br","html_url":"https://github.com/ev-br","followers_url":"https://api.github.com/users/ev-br/followers","following_url":"https://api.github.com/users/ev-br/following{/other_user}","gists_url":"https://api.github.com/users/ev-br/gists{/gist_id}","starred_url":"https://api.github.com/users/ev-br/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ev-br/subscriptions","organizations_url":"https://api.github.com/users/ev-br/orgs","repos_url":"https://api.github.com/users/ev-br/repos","events_url":"https://api.github.com/users/ev-br/events{/privacy}","received_events_url":"https://api.github.com/users/ev-br/received_events","type":"User","site_admin":false},"open_issues":17,"closed_issues":201,"state":"open","created_at":"2016-06-19T11:44:03Z","updated_at":"2016-11-17T11:35:11Z","due_on":"2017-01-20T00:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/scipy/scipy/pulls/5647/commits","review_comments_url":"https://api.github.com/repos/scipy/scipy/pulls/5647/comments","review_comment_url":"https://api.github.com/repos/scipy/scipy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scipy/scipy/issues/5647/comments","statuses_url":"https://api.github.com/repos/scipy/scipy/statuses/df03bb107ea8eb7e0e67c272dee707dcbff804bc","head":{"label":"rainwoodman:weighted","ref":"weighted","sha":"df03bb107ea8eb7e0e67c272dee707dcbff804bc","user":{"login":"rainwoodman","id":138060,"avatar_url":"https://avatars.githubusercontent.com/u/138060?v=3","gravatar_id":"","url":"https://api.github.com/users/rainwoodman","html_url":"https://github.com/rainwoodman","followers_url":"https://api.github.com/users/rainwoodman/followers","following_url":"https://api.github.com/users/rainwoodman/following{/other_user}","gists_url":"https://api.github.com/users/rainwoodman/gists{/gist_id}","starred_url":"https://api.github.com/users/rainwoodman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rainwoodman/subscriptions","organizations_url":"https://api.github.com/users/rainwoodman/orgs","repos_url":"https://api.github.com/users/rainwoodman/repos","events_url":"https://api.github.com/users/rainwoodman/events{/privacy}","received_events_url":"https://api.github.com/users/rainwoodman/received_events","type":"User","site_admin":false},"repo":{"id":11513183,"name":"scipy","full_name":"rainwoodman/scipy","owner":{"login":"rainwoodman","id":138060,"avatar_url":"https://avatars.githubusercontent.com/u/138060?v=3","gravatar_id":"","url":"https://api.github.com/users/rainwoodman","html_url":"https://github.com/rainwoodman","followers_url":"https://api.github.com/users/rainwoodman/followers","following_url":"https://api.github.com/users/rainwoodman/following{/other_user}","gists_url":"https://api.github.com/users/rainwoodman/gists{/gist_id}","starred_url":"https://api.github.com/users/rainwoodman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rainwoodman/subscriptions","organizations_url":"https://api.github.com/users/rainwoodman/orgs","repos_url":"https://api.github.com/users/rainwoodman/repos","events_url":"https://api.github.com/users/rainwoodman/events{/privacy}","received_events_url":"https://api.github.com/users/rainwoodman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rainwoodman/scipy","description":"Scipy main repository","fork":true,"url":"https://api.github.com/repos/rainwoodman/scipy","forks_url":"https://api.github.com/repos/rainwoodman/scipy/forks","keys_url":"https://api.github.com/repos/rainwoodman/scipy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rainwoodman/scipy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rainwoodman/scipy/teams","hooks_url":"https://api.github.com/repos/rainwoodman/scipy/hooks","issue_events_url":"https://api.github.com/repos/rainwoodman/scipy/issues/events{/number}","events_url":"https://api.github.com/repos/rainwoodman/scipy/events","assignees_url":"https://api.github.com/repos/rainwoodman/scipy/assignees{/user}","branches_url":"https://api.github.com/repos/rainwoodman/scipy/branches{/branch}","tags_url":"https://api.github.com/repos/rainwoodman/scipy/tags","blobs_url":"https://api.github.com/repos/rainwoodman/scipy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rainwoodman/scipy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rainwoodman/scipy/git/refs{/sha}","trees_url":"https://api.github.com/repos/rainwoodman/scipy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rainwoodman/scipy/statuses/{sha}","languages_url":"https://api.github.com/repos/rainwoodman/scipy/languages","stargazers_url":"https://api.github.com/repos/rainwoodman/scipy/stargazers","contributors_url":"https://api.github.com/repos/rainwoodman/scipy/contributors","subscribers_url":"https://api.github.com/repos/rainwoodman/scipy/subscribers","subscription_url":"https://api.github.com/repos/rainwoodman/scipy/subscription","commits_url":"https://api.github.com/repos/rainwoodman/scipy/commits{/sha}","git_commits_url":"https://api.github.com/repos/rainwoodman/scipy/git/commits{/sha}","comments_url":"https://api.github.com/repos/rainwoodman/scipy/comments{/number}","issue_comment_url":"https://api.github.com/repos/rainwoodman/scipy/issues/comments{/number}","contents_url":"https://api.github.com/repos/rainwoodman/scipy/contents/{+path}","compare_url":"https://api.github.com/repos/rainwoodman/scipy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rainwoodman/scipy/merges","archive_url":"https://api.github.com/repos/rainwoodman/scipy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rainwoodman/scipy/downloads","issues_url":"https://api.github.com/repos/rainwoodman/scipy/issues{/number}","pulls_url":"https://api.github.com/repos/rainwoodman/scipy/pulls{/number}","milestones_url":"https://api.github.com/repos/rainwoodman/scipy/milestones{/number}","notifications_url":"https://api.github.com/repos/rainwoodman/scipy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rainwoodman/scipy/labels{/name}","releases_url":"https://api.github.com/repos/rainwoodman/scipy/releases{/id}","deployments_url":"https://api.github.com/repos/rainwoodman/scipy/deployments","created_at":"2013-07-18T20:37:16Z","updated_at":"2015-07-24T22:52:50Z","pushed_at":"2016-11-18T19:19:07Z","git_url":"git://github.com/rainwoodman/scipy.git","ssh_url":"git@github.com:rainwoodman/scipy.git","clone_url":"https://github.com/rainwoodman/scipy.git","svn_url":"https://github.com/rainwoodman/scipy","homepage":"http://scipy.org/","size":61866,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"LANDINGBRANCH"}},"base":{"label":"scipy:master","ref":"master","sha":"ccb338fa0521070107200a9ebcab67905b286a7a","user":{"login":"scipy","id":288277,"avatar_url":"https://avatars.githubusercontent.com/u/288277?v=3","gravatar_id":"","url":"https://api.github.com/users/scipy","html_url":"https://github.com/scipy","followers_url":"https://api.github.com/users/scipy/followers","following_url":"https://api.github.com/users/scipy/following{/other_user}","gists_url":"https://api.github.com/users/scipy/gists{/gist_id}","starred_url":"https://api.github.com/users/scipy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scipy/subscriptions","organizations_url":"https://api.github.com/users/scipy/orgs","repos_url":"https://api.github.com/users/scipy/repos","events_url":"https://api.github.com/users/scipy/events{/privacy}","received_events_url":"https://api.github.com/users/scipy/received_events","type":"Organization","site_admin":false},"repo":{"id":1460385,"name":"scipy","full_name":"scipy/scipy","owner":{"login":"scipy","id":288277,"avatar_url":"https://avatars.githubusercontent.com/u/288277?v=3","gravatar_id":"","url":"https://api.github.com/users/scipy","html_url":"https://github.com/scipy","followers_url":"https://api.github.com/users/scipy/followers","following_url":"https://api.github.com/users/scipy/following{/other_user}","gists_url":"https://api.github.com/users/scipy/gists{/gist_id}","starred_url":"https://api.github.com/users/scipy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scipy/subscriptions","organizations_url":"https://api.github.com/users/scipy/orgs","repos_url":"https://api.github.com/users/scipy/repos","events_url":"https://api.github.com/users/scipy/events{/privacy}","received_events_url":"https://api.github.com/users/scipy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scipy/scipy","description":"Scipy library main repository","fork":false,"url":"https://api.github.com/repos/scipy/scipy","forks_url":"https://api.github.com/repos/scipy/scipy/forks","keys_url":"https://api.github.com/repos/scipy/scipy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scipy/scipy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scipy/scipy/teams","hooks_url":"https://api.github.com/repos/scipy/scipy/hooks","issue_events_url":"https://api.github.com/repos/scipy/scipy/issues/events{/number}","events_url":"https://api.github.com/repos/scipy/scipy/events","assignees_url":"https://api.github.com/repos/scipy/scipy/assignees{/user}","branches_url":"https://api.github.com/repos/scipy/scipy/branches{/branch}","tags_url":"https://api.github.com/repos/scipy/scipy/tags","blobs_url":"https://api.github.com/repos/scipy/scipy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scipy/scipy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scipy/scipy/git/refs{/sha}","trees_url":"https://api.github.com/repos/scipy/scipy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scipy/scipy/statuses/{sha}","languages_url":"https://api.github.com/repos/scipy/scipy/languages","stargazers_url":"https://api.github.com/repos/scipy/scipy/stargazers","contributors_url":"https://api.github.com/repos/scipy/scipy/contributors","subscribers_url":"https://api.github.com/repos/scipy/scipy/subscribers","subscription_url":"https://api.github.com/repos/scipy/scipy/subscription","commits_url":"https://api.github.com/repos/scipy/scipy/commits{/sha}","git_commits_url":"https://api.github.com/repos/scipy/scipy/git/commits{/sha}","comments_url":"https://api.github.com/repos/scipy/scipy/comments{/number}","issue_comment_url":"https://api.github.com/repos/scipy/scipy/issues/comments{/number}","contents_url":"https://api.github.com/repos/scipy/scipy/contents/{+path}","compare_url":"https://api.github.com/repos/scipy/scipy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scipy/scipy/merges","archive_url":"https://api.github.com/repos/scipy/scipy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scipy/scipy/downloads","issues_url":"https://api.github.com/repos/scipy/scipy/issues{/number}","pulls_url":"https://api.github.com/repos/scipy/scipy/pulls{/number}","milestones_url":"https://api.github.com/repos/scipy/scipy/milestones{/number}","notifications_url":"https://api.github.com/repos/scipy/scipy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scipy/scipy/labels{/name}","releases_url":"https://api.github.com/repos/scipy/scipy/releases{/id}","deployments_url":"https://api.github.com/repos/scipy/scipy/deployments","created_at":"2011-03-09T18:52:03Z","updated_at":"2016-11-18T17:51:28Z","pushed_at":"2016-11-18T19:19:08Z","git_url":"git://github.com/scipy/scipy.git","ssh_url":"git@github.com:scipy/scipy.git","clone_url":"https://github.com/scipy/scipy.git","svn_url":"https://github.com/scipy/scipy","homepage":"http://scipy.org/scipylib/","size":80224,"stargazers_count":2705,"watchers_count":2705,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1570,"mirror_url":null,"open_issues_count":922,"forks":1570,"open_issues":922,"watchers":2705,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scipy/scipy/pulls/5647"},"html":{"href":"https://github.com/scipy/scipy/pull/5647"},"issue":{"href":"https://api.github.com/repos/scipy/scipy/issues/5647"},"comments":{"href":"https://api.github.com/repos/scipy/scipy/issues/5647/comments"},"review_comments":{"href":"https://api.github.com/repos/scipy/scipy/pulls/5647/comments"},"review_comment":{"href":"https://api.github.com/repos/scipy/scipy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scipy/scipy/pulls/5647/commits"},"statuses":{"href":"https://api.github.com/repos/scipy/scipy/statuses/df03bb107ea8eb7e0e67c272dee707dcbff804bc"}}}}
{"actor":{"display_login":"rgommers"}}