{"action":"created","issue":{"url":"https://api.github.com/repos/deeplearning4j/nd4j/issues/1662","repository_url":"https://api.github.com/repos/deeplearning4j/nd4j","labels_url":"https://api.github.com/repos/deeplearning4j/nd4j/issues/1662/labels{/name}","comments_url":"https://api.github.com/repos/deeplearning4j/nd4j/issues/1662/comments","events_url":"https://api.github.com/repos/deeplearning4j/nd4j/issues/1662/events","html_url":"https://github.com/deeplearning4j/nd4j/issues/1662","id":209448008,"number":1662,"title":"Arrays with length > MAX_INT","user":{"login":"raver119","id":12250879,"avatar_url":"https://avatars2.githubusercontent.com/u/12250879?v=4","gravatar_id":"","url":"https://api.github.com/users/raver119","html_url":"https://github.com/raver119","followers_url":"https://api.github.com/users/raver119/followers","following_url":"https://api.github.com/users/raver119/following{/other_user}","gists_url":"https://api.github.com/users/raver119/gists{/gist_id}","starred_url":"https://api.github.com/users/raver119/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raver119/subscriptions","organizations_url":"https://api.github.com/users/raver119/orgs","repos_url":"https://api.github.com/users/raver119/repos","events_url":"https://api.github.com/users/raver119/events{/privacy}","received_events_url":"https://api.github.com/users/raver119/received_events","type":"User","site_admin":false},"labels":[{"id":125745467,"url":"https://api.github.com/repos/deeplearning4j/nd4j/labels/bug","name":"bug","color":"d93f0b","default":true}],"state":"closed","locked":false,"assignee":{"login":"raver119","id":12250879,"avatar_url":"https://avatars2.githubusercontent.com/u/12250879?v=4","gravatar_id":"","url":"https://api.github.com/users/raver119","html_url":"https://github.com/raver119","followers_url":"https://api.github.com/users/raver119/followers","following_url":"https://api.github.com/users/raver119/following{/other_user}","gists_url":"https://api.github.com/users/raver119/gists{/gist_id}","starred_url":"https://api.github.com/users/raver119/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raver119/subscriptions","organizations_url":"https://api.github.com/users/raver119/orgs","repos_url":"https://api.github.com/users/raver119/repos","events_url":"https://api.github.com/users/raver119/events{/privacy}","received_events_url":"https://api.github.com/users/raver119/received_events","type":"User","site_admin":false},"assignees":[{"login":"raver119","id":12250879,"avatar_url":"https://avatars2.githubusercontent.com/u/12250879?v=4","gravatar_id":"","url":"https://api.github.com/users/raver119","html_url":"https://github.com/raver119","followers_url":"https://api.github.com/users/raver119/followers","following_url":"https://api.github.com/users/raver119/following{/other_user}","gists_url":"https://api.github.com/users/raver119/gists{/gist_id}","starred_url":"https://api.github.com/users/raver119/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raver119/subscriptions","organizations_url":"https://api.github.com/users/raver119/orgs","repos_url":"https://api.github.com/users/raver119/repos","events_url":"https://api.github.com/users/raver119/events{/privacy}","received_events_url":"https://api.github.com/users/raver119/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2017-02-22T13:03:55Z","updated_at":"2017-07-20T09:06:31Z","closed_at":"2017-07-20T09:06:31Z","body":"We allow arrays creation with length > MAX_INT, but it breaks logic in many places.\r\n\r\nHere's test that shows bad behavior:\r\n\r\n```\r\n// we create 2D array, total nr. of elements is 2.4B elements, > MAX_INT\r\nINDArray huge = Nd4j.rand(8000000, 300);\r\n\r\n// we apply element-wise scalar ops, just to make sure stuff still works\r\nhuge.subi(0.5).divi(2);\r\n\r\n\r\n// now we're checking different rows, they should NOT equal\r\nINDArray row0 = huge.getRow(100001);\r\nINDArray row1 = huge.getRow(100002);\r\nassertNotEquals(row0, row1);\r\n\r\n\r\n// same idea, but this code is broken: rowA and rowB will be pointing to the same offset\r\nINDArray rowA = huge.getRow(huge.rows() - 3);\r\nINDArray rowB = huge.getRow(huge.rows() - 10);\r\n\r\n// safety check, to see if we're really working on the same offset. \r\nrowA.addi(1.0);\r\n\r\n// and this fails, so rowA and rowB are pointing to the same offset, despite different getRow() arguments were used\r\nassertNotEquals(rowA, rowB);\r\n```\r\n\r\nFollow up from this issue: https://github.com/deeplearning4j/nd4j/issues/1644"},"comment":{"url":"https://api.github.com/repos/deeplearning4j/nd4j/issues/comments/316643825","html_url":"https://github.com/deeplearning4j/nd4j/issues/1662#issuecomment-316643825","issue_url":"https://api.github.com/repos/deeplearning4j/nd4j/issues/1662","id":316643825,"user":{"login":"raver119","id":12250879,"avatar_url":"https://avatars2.githubusercontent.com/u/12250879?v=4","gravatar_id":"","url":"https://api.github.com/users/raver119","html_url":"https://github.com/raver119","followers_url":"https://api.github.com/users/raver119/followers","following_url":"https://api.github.com/users/raver119/following{/other_user}","gists_url":"https://api.github.com/users/raver119/gists{/gist_id}","starred_url":"https://api.github.com/users/raver119/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raver119/subscriptions","organizations_url":"https://api.github.com/users/raver119/orgs","repos_url":"https://api.github.com/users/raver119/repos","events_url":"https://api.github.com/users/raver119/events{/privacy}","received_events_url":"https://api.github.com/users/raver119/received_events","type":"User","site_admin":false},"created_at":"2017-07-20T09:06:31Z","updated_at":"2017-07-20T09:06:31Z","body":"Fixed"}}
{"actor":{"display_login":"raver119"}}