{"action":"closed","issue":{"url":"https://api.github.com/repos/deeplearning4j/nd4j/issues/501","labels_url":"https://api.github.com/repos/deeplearning4j/nd4j/issues/501/labels{/name}","comments_url":"https://api.github.com/repos/deeplearning4j/nd4j/issues/501/comments","events_url":"https://api.github.com/repos/deeplearning4j/nd4j/issues/501/events","html_url":"https://github.com/deeplearning4j/nd4j/issues/501","id":117957736,"number":501,"title":"ArrayIndexOutOfBoundsException in ArrayUtil.removeIndex() from StandardDeviation","user":{"login":"edudar","id":584181,"avatar_url":"https://avatars.githubusercontent.com/u/584181?v=3","gravatar_id":"","url":"https://api.github.com/users/edudar","html_url":"https://github.com/edudar","followers_url":"https://api.github.com/users/edudar/followers","following_url":"https://api.github.com/users/edudar/following{/other_user}","gists_url":"https://api.github.com/users/edudar/gists{/gist_id}","starred_url":"https://api.github.com/users/edudar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edudar/subscriptions","organizations_url":"https://api.github.com/users/edudar/orgs","repos_url":"https://api.github.com/users/edudar/repos","events_url":"https://api.github.com/users/edudar/events{/privacy}","received_events_url":"https://api.github.com/users/edudar/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-20T03:22:22Z","updated_at":"2015-11-20T11:59:51Z","closed_at":"2015-11-20T11:59:51Z","body":"Version: `0.4-rc3.6`\r\n\r\nI have the following NDArray:\r\n```\r\nshape = {int[2]@7257} \r\n  0 = 1\r\n  1 = 600\r\ndata = {org.nd4j.linalg.api.buffer.FloatBuffer@7259} \r\n  [6.26399,6.266993,7.008971,7.3896317,...]\r\nrows = 1\r\ncolumns = 600\r\nlength = 600\r\n```\r\n\r\n`stdNumber()` for it results into:\r\n```\r\nCaused by: java.lang.ArrayIndexOutOfBoundsException: 1\r\n\tat org.nd4j.linalg.util.ArrayUtil.removeIndex(ArrayUtil.java:608)\r\n\tat org.nd4j.linalg.api.ops.impl.accum.StandardDeviation.exec(StandardDeviation.java:85)\r\n\tat org.nd4j.linalg.api.ops.executioner.DefaultOpExecutioner.exec(DefaultOpExecutioner.java:245)\r\n\tat org.nd4j.linalg.api.ndarray.BaseNDArray.std(BaseNDArray.java:3400)\r\n\tat org.nd4j.linalg.api.ndarray.BaseNDArray.stdNumber(BaseNDArray.java:930)\r\n```\r\n\r\n`ArrayUtil.removeIndex` allocates `ret=int[1]` because of `{1, 600}.length - {2147483647}.length` but none of `data` values are in `index` array so both go to `ret`."}}