You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a maximum size on ndarray matrices? Is this documented somewhere? I'm getting the following error. Note that the matrix seems to have been made successfully, but then I get an out of bounds exception. The total number of cells is 10^5 x 10^5, but the out of bounds error is at a location much less than 10^10. (If it's a Java Array limitation, would it be possible to generate an error when a matrix is created that's too large?)
(nsmwe-ndarray-error
(:require [clojure.core.matrix :as mx]))
(defnmake-mat
[size]
(println"In make-mat with size=" size)
(let [m (mx/new-matrix:ndarray size size)]
(println"Made matrix, with dimensions" (mx/shape m))
(doseq [row (range size)
col (range size)]
(mx/mset! m col row 1))
(println"Done initializing matrix")
m))
(defm (make-env100000))
Update: The same problem occurs with mget. It doesn't occur with :persistent-vector. I haven't tried other implementations, but I'm guessing that it's specific to ndarrays.
I believe the NDArray maxes out at the Java int size (for array indexes). It should indeed be specific to ndarray. In general, different implementation can have different constraints on array shapes (total size, max number of dimensions etc.)
Is there a maximum size on ndarray matrices? Is this documented somewhere? I'm getting the following error. Note that the matrix seems to have been made successfully, but then I get an out of bounds exception. The total number of cells is 10^5 x 10^5, but the out of bounds error is at a location much less than 10^10. (If it's a Java Array limitation, would it be possible to generate an error when a matrix is created that's too large?)
The text was updated successfully, but these errors were encountered: