Skip to content

Commit

Permalink
Extra edits
Browse files Browse the repository at this point in the history
  • Loading branch information
mikera committed Sep 8, 2015
1 parent 0a86151 commit d35aad8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/clj_nd4j/core.clj
Expand Up @@ -108,11 +108,14 @@
have the specified dimension."
(aget (.shape m) (long dimension-number)))

;; TODO: for some reason the [row] and [row,column] accessors trigger an ND4J bug?
mp/PIndexedAccess
(mp/get-1d [m row]
(.getDouble m (int row)))
(let [ixs (int-array [row])]
(.getDouble m ixs)))
(mp/get-2d [m row column]
(.getDouble m (int row) (int column)))
(let [ixs (int-array [row column])]
(.getDouble m ixs)))
(mp/get-nd [m indexes]
(let [ixs (int-array indexes)]
(.getDouble m ixs)))
Expand Down

0 comments on commit d35aad8

Please sign in to comment.