Re: Getting lengths/dimensions in vectorz-clj

2013-10-22 Thread P Martin
Great! Thanks for the clarification. Patrick On Tuesday, October 22, 2013 12:21:33 PM UTC-4, Mikera wrote: > > You probably want: > > (shape M) ;; returns a vector [4 6] for a 4x6 Matrix > > Though you can also access the individual dimension sizes as follows, > which is sometimes useful: > >

Re: Getting lengths/dimensions in vectorz-clj

2013-10-22 Thread Mikera
You probably want: (shape M) ;; returns a vector [4 6] for a 4x6 Matrix Though you can also access the individual dimension sizes as follows, which is sometimes useful: (dimension-count M 0) ;; returns 4 as the count of the first dimension (dimension-count M 1) ;; returns 6 as the count o

Getting lengths/dimensions in vectorz-clj

2013-10-22 Thread P Martin
Hi there, I am using vectors-clj to do some optimization work, but I am having trouble getting the dimensions of the matrices I build. I come from Matlab, so I am used to commands such as "size(M)" which returns the (n,m) dimensions of the matrix M. I am including clojure.core.matrix in my code