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 Float/TYPE 4 4)) #'user/wa user=> wa #<float[][] [...@4cb533b8> user=> (aset-float wa 0 0 & 1.0) java.lang.Exception: Unable to resolve symbol: & in this context (NO_SOURCE_FILE:5) user=> What am I missing? On Jan 10, 10:08 am, Albert Cardona <sapri...@gmail.com> wrote: > 2011/1/10 WoodHacker <ramsa...@comcast.net>: > > > 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 & more-dims]) > Creates and returns an array of instances of the specified class of > the specified dimension(s). Note that a class object is required. > Class objects can be obtained by using their imported or > fully-qualified name. Class objects for the primitive types can be > obtained using, e.g., Integer/TYPE. > nil > user=> (make-array Double/TYPE 2 8) > #<double[][] [...@4cb533b8> > user=> (count (aget *1 0)) > 8 > > --http://albert.rierol.net -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en