{"action":"closed","issue":{"url":"https://api.github.com/repos/deeplearning4j/nd4j/issues/37","labels_url":"https://api.github.com/repos/deeplearning4j/nd4j/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/deeplearning4j/nd4j/issues/37/comments","events_url":"https://api.github.com/repos/deeplearning4j/nd4j/issues/37/events","html_url":"https://github.com/deeplearning4j/nd4j/issues/37","id":61094678,"number":37,"title":"exception in DataSet.binarize()","user":{"login":"aritasimoes","id":400020,"avatar_url":"https://avatars.githubusercontent.com/u/400020?v=3","gravatar_id":"","url":"https://api.github.com/users/aritasimoes","html_url":"https://github.com/aritasimoes","followers_url":"https://api.github.com/users/aritasimoes/followers","following_url":"https://api.github.com/users/aritasimoes/following{/other_user}","gists_url":"https://api.github.com/users/aritasimoes/gists{/gist_id}","starred_url":"https://api.github.com/users/aritasimoes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aritasimoes/subscriptions","organizations_url":"https://api.github.com/users/aritasimoes/orgs","repos_url":"https://api.github.com/users/aritasimoes/repos","events_url":"https://api.github.com/users/aritasimoes/events{/privacy}","received_events_url":"https://api.github.com/users/aritasimoes/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-13T15:19:15Z","updated_at":"2015-03-15T23:36:14Z","closed_at":"2015-03-15T23:36:14Z","body":"On 0.0.3.5.5.3-SNAPSHOT, the following exception is thrown when calling ```.binarize(0)``` on a DataSet:\r\n\r\n```java\r\nException in thread \"main\" java.lang.IllegalArgumentException: Unable to do linear indexing with dimensions greater than 1\r\n\tat org.nd4j.linalg.api.ndarray.BaseNDArray.getScalar(BaseNDArray.java:1673)\r\n\tat org.nd4j.linalg.dataset.DataSet.binarize(DataSet.java:261)\r\n\tat BoW_DBN.main(BoW_DBN.java:77)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:606)\r\n\tat com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)\r\n```\r\n\r\nReplacing line 261 in DataSet.java by:\r\n\r\n```java\r\ndouble curr = data.getFeatures().getDouble(i);\r\n```\r\n\r\nsolves the problem for me.\r\n\r\n"}}