{"action":"created","issue":{"url":"https://api.github.com/repos/lebigot/uncertainties/issues/30","labels_url":"https://api.github.com/repos/lebigot/uncertainties/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/lebigot/uncertainties/issues/30/comments","events_url":"https://api.github.com/repos/lebigot/uncertainties/issues/30/events","html_url":"https://github.com/lebigot/uncertainties/issues/30","id":35605493,"number":30,"title":"Summing unusably slow","user":{"login":"nmearl","id":4141126,"avatar_url":"https://avatars.githubusercontent.com/u/4141126?v=3","gravatar_id":"","url":"https://api.github.com/users/nmearl","html_url":"https://github.com/nmearl","followers_url":"https://api.github.com/users/nmearl/followers","following_url":"https://api.github.com/users/nmearl/following{/other_user}","gists_url":"https://api.github.com/users/nmearl/gists{/gist_id}","starred_url":"https://api.github.com/users/nmearl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmearl/subscriptions","organizations_url":"https://api.github.com/users/nmearl/orgs","repos_url":"https://api.github.com/users/nmearl/repos","events_url":"https://api.github.com/users/nmearl/events{/privacy}","received_events_url":"https://api.github.com/users/nmearl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"lebigot","id":5793,"avatar_url":"https://avatars.githubusercontent.com/u/5793?v=3","gravatar_id":"","url":"https://api.github.com/users/lebigot","html_url":"https://github.com/lebigot","followers_url":"https://api.github.com/users/lebigot/followers","following_url":"https://api.github.com/users/lebigot/following{/other_user}","gists_url":"https://api.github.com/users/lebigot/gists{/gist_id}","starred_url":"https://api.github.com/users/lebigot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lebigot/subscriptions","organizations_url":"https://api.github.com/users/lebigot/orgs","repos_url":"https://api.github.com/users/lebigot/repos","events_url":"https://api.github.com/users/lebigot/events{/privacy}","received_events_url":"https://api.github.com/users/lebigot/received_events","type":"User","site_admin":false},"milestone":null,"comments":14,"created_at":"2014-06-12T17:26:58Z","updated_at":"2015-07-29T17:14:34Z","closed_at":null,"body":"I just want to make sure this is a limitation of the package, and not my own fault. But it seems that summing large arrays is prohibitively slow. I have several arrays with about 20,000 points, each with errors, but it's impossible to find the mean because it takes too long to calculate. To be more specific, I'm getting the mean to normalize the array\r\n\r\n````\r\nalpha = 1.0 + (alpha - alpha.mean()) / (alpha.max() - alpha.min())\r\n````\r\n\r\nIs there any quicker way this can be done? Thanks."},"comment":{"url":"https://api.github.com/repos/lebigot/uncertainties/issues/comments/126023199","html_url":"https://github.com/lebigot/uncertainties/issues/30#issuecomment-126023199","issue_url":"https://api.github.com/repos/lebigot/uncertainties/issues/30","id":126023199,"user":{"login":"lebigot","id":5793,"avatar_url":"https://avatars.githubusercontent.com/u/5793?v=3","gravatar_id":"","url":"https://api.github.com/users/lebigot","html_url":"https://github.com/lebigot","followers_url":"https://api.github.com/users/lebigot/followers","following_url":"https://api.github.com/users/lebigot/following{/other_user}","gists_url":"https://api.github.com/users/lebigot/gists{/gist_id}","starred_url":"https://api.github.com/users/lebigot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lebigot/subscriptions","organizations_url":"https://api.github.com/users/lebigot/orgs","repos_url":"https://api.github.com/users/lebigot/repos","events_url":"https://api.github.com/users/lebigot/events{/privacy}","received_events_url":"https://api.github.com/users/lebigot/received_events","type":"User","site_admin":false},"created_at":"2015-07-29T17:14:33Z","updated_at":"2015-07-29T17:14:33Z","body":"**PS**: ChainMaps actually do not solve the quadratic time problem, because the lookup of shared variables between terms would become linear, for each additional term. The current situation is that the collection of the terms of a long formal sum is quadratic (with the formal sum being calculated linearly in time). Maybe it is possible to introduce a new class that would make the collection linear in time while preserving the generally good idea of doing the collection for intermediate variables?\r\n\r\n**Additional challenge**: have *both* sum() *and* cumsum() run fast (linear time)."}}