This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-05-26
Channels
- # aws (7)
- # beginners (109)
- # boot (5)
- # carry (2)
- # cider (25)
- # clara (6)
- # cljs-dev (86)
- # cljs-experience (19)
- # cljsrn (1)
- # clojure (183)
- # clojure-dev (7)
- # clojure-dusseldorf (7)
- # clojure-gamedev (2)
- # clojure-greece (32)
- # clojure-italy (2)
- # clojure-norway (1)
- # clojure-russia (228)
- # clojure-sg (3)
- # clojure-spec (38)
- # clojure-uk (104)
- # clojurebridge (1)
- # clojurescript (29)
- # community-development (9)
- # core-async (118)
- # core-matrix (20)
- # cursive (5)
- # datomic (140)
- # emacs (25)
- # figwheel (1)
- # hoplon (21)
- # jobs (4)
- # lein-figwheel (2)
- # luminus (10)
- # lumo (35)
- # off-topic (137)
- # om (31)
- # onyx (62)
- # pedestal (6)
- # reagent (25)
- # remote-jobs (1)
- # ring-swagger (11)
- # spacemacs (2)
- # test-check (17)
- # uncomplicate (10)
- # unrepl (1)
- # untangled (20)
- # vim (4)
- # yada (3)
is there a way to fill in a submatrix with a value?
I can easily fetch a submatrix but can't find the right function to generate a new matrix with submatrix filled with the value I want
(let [m (new-array :vectorz [3 3])] (fill! (submatrix m [[1 2] [1 2]]) 7) m) #vectorz/matrix [[0.0,0.0,0.0], [0.0,7.0,7.0], [0.0,7.0,7.0]]
(let [m (new-array :vectorz [3 3])] (set-selection m [1 2] [1 2] 7)) #vectorz/matrix [[0.0,0.0,0.0], [0.0,7.0,7.0], [0.0,7.0,7.0]]
seems to work in the same way also without the :vectorz @mikera
is that the default maybe?
set-selection would be good but it only returns the submatrix changed
not a whole new matrix with the content changed
ah no sorry my bad
yeah that seems perfect
I've been meaning to get something like specter
working with core.matrix, this would be a more general tool that would be very useful for examples like this
i may have asked this before but is there a way to get the vector of indices of the max element of a matrix ?