Re: Multidimensional Float arrays

2011-01-12 Thread Ken Wesson
On Wed, Jan 12, 2011 at 8:15 AM, WoodHacker wrote: > This is a much better solution.   It's shorter and is easier to read. > Thanks for tip! > > On Jan 10, 11:49 pm, Sunil S Nandihalli > wrote: >> (into-array (map float-array  [[1.0 1.0 2.0 2.0] [3.0 2.2 4.0 0.0]])) Why not generalize further?

Re: Multidimensional Float arrays

2011-01-12 Thread WoodHacker
This is a much better solution. It's shorter and is easier to read. Thanks for tip! Bill On Jan 10, 11:49 pm, Sunil S Nandihalli wrote: > Hi Bill , > the following is one way of doing it .. > > (into-array (map float-array  [[1.0 1.0 2.0 2.0] [3.0 2.2 4.0 0.0]])) > > Sunil. > > On Mon, Jan 10,

Re: Multidimensional Float arrays

2011-01-11 Thread WoodHacker
When all else fails, read the directions. Thanks for the help. On Jan 10, 4:44 pm, Ken Wesson wrote: > On Mon, Jan 10, 2011 at 4:40 PM, WoodHacker wrote: > > The question was how to place data in the array, not create it.   I've > > been > > doing that.   How do you populate it?    The doc show

Re: Multidimensional Float arrays

2011-01-10 Thread Sunil S Nandihalli
since you are looking at multidimensional float arrays .. the following may be of interest to you ... http://clj-me.cgrand.net/2009/10/15/multidim-arrays/ On Tue, Jan 11, 2011 at 10:19 AM, Sunil S Nandihalli < sunil.nandiha...@gmail.com> wrote: > Hi Bill , > the following is one way

Re: Multidimensional Float arrays

2011-01-10 Thread Sunil S Nandihalli
Hi Bill , the following is one way of doing it .. (into-array (map float-array [[1.0 1.0 2.0 2.0] [3.0 2.2 4.0 0.0]])) Sunil. On Mon, Jan 10, 2011 at 8:32 PM, WoodHacker wrote: > Hi, > > Can anybody explain to me how to create a multidimensional array of > floats such as: > > [[1.0 1.0 2.0

Re: Multidimensional Float arrays

2011-01-10 Thread Ken Wesson
On Mon, Jan 10, 2011 at 4:40 PM, WoodHacker wrote: > The question was how to place data in the array, not create it.   I've > been > doing that.   How do you populate it?    The doc shows: > > user=> (doc aset-float) > - > clojure.core/aset-float > ([array idx val] [array i

Re: Multidimensional Float arrays

2011-01-10 Thread WoodHacker
The question was how to place data in the array, not create it. I've been doing that. How do you populate it?The doc shows: user=> (doc aset-float) - clojure.core/aset-float ([array idx val] [array idx idx2 & idxv]) If I try that I get: user=> (def wa (make-array

Re: Multidimensional Float arrays

2011-01-10 Thread Albert Cardona
2011/1/10 WoodHacker : > Hi, > > Can anybody explain to me how to create a multidimensional array of > floats such as: > >   [[1.0 1.0 2.0 2.0] [3.0 2.2 4.0 0.0]] > > Anything I try gives me errors. user=> (doc make-array) - clojure.core/make-array ([type len] [type dim &

Multidimensional Float arrays

2011-01-10 Thread WoodHacker
Hi, Can anybody explain to me how to create a multidimensional array of floats such as: [[1.0 1.0 2.0 2.0] [3.0 2.2 4.0 0.0]] Anything I try gives me errors. Bill -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email