{"action":"opened","issue":{"url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues/909","labels_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues/909/labels{/name}","comments_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues/909/comments","events_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues/909/events","html_url":"https://github.com/deeplearning4j/deeplearning4j/issues/909","id":119347470,"number":909,"title":"Java docs mentioning whether Nd4j operations creates a new copy or not","user":{"login":"dkmisra","id":3355694,"avatar_url":"https://avatars.githubusercontent.com/u/3355694?v=3","gravatar_id":"","url":"https://api.github.com/users/dkmisra","html_url":"https://github.com/dkmisra","followers_url":"https://api.github.com/users/dkmisra/followers","following_url":"https://api.github.com/users/dkmisra/following{/other_user}","gists_url":"https://api.github.com/users/dkmisra/gists{/gist_id}","starred_url":"https://api.github.com/users/dkmisra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkmisra/subscriptions","organizations_url":"https://api.github.com/users/dkmisra/orgs","repos_url":"https://api.github.com/users/dkmisra/repos","events_url":"https://api.github.com/users/dkmisra/events{/privacy}","received_events_url":"https://api.github.com/users/dkmisra/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-29T09:08:30Z","updated_at":"2015-11-29T09:08:30Z","closed_at":null,"body":"## Issue\r\n\r\nThere are certain Nd4j operations which do not create a new copy of INDArray and its difficult to tell from the java docs. Example, \r\n\r\n`INDArray transformed  = Nd4j.zeros(100);`\r\n`INDArray nonLinear = Nd4j.getExecutioner().execAndReturn(new HardTanh(transformed));`\r\n\r\n`nonLinear` and `transformed` reference the same memory region. This can lead to unexpected behavior and waste lots of time, if the programmer makes the wrong assumption. \r\n\r\n## Suggestion\r\n\r\nJava docs or a list on the website would solve this. Crafty naming styles can also solve this as well. INDArray does this pretty well already (`muli` vs `mul`) where `i` can be read as in-place operation."}}