This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-07-02
Channels
- # aleph (1)
- # architecture (4)
- # beginners (39)
- # boot (12)
- # cider (25)
- # cljs-dev (3)
- # cljsrn (5)
- # clojure (175)
- # clojure-dusseldorf (1)
- # clojure-italy (13)
- # clojure-nl (4)
- # clojure-russia (1)
- # clojure-spec (52)
- # clojure-uk (110)
- # clojurescript (35)
- # data-science (2)
- # datomic (61)
- # editors (8)
- # emacs (2)
- # fulcro (7)
- # graphql (15)
- # hoplon (1)
- # hyperfiddle (3)
- # jobs (4)
- # jobs-discuss (12)
- # juxt (2)
- # lein-figwheel (6)
- # leiningen (35)
- # off-topic (4)
- # onyx (5)
- # parinfer (1)
- # pedestal (63)
- # re-frame (38)
- # reitit (7)
- # ring-swagger (7)
- # rum (2)
- # shadow-cljs (27)
- # tools-deps (10)
- # uncomplicate (16)
I'm probably misunderstanding what the values of the :order
keyword mean.
(def A (dge 3 2 [1 2 3 4 5 6] {:order :column}))
(def B (dge 3 2 [1 2 3 4 5 6] {:order :row}))
(= A B) => true
despite the :order
option being differently specified, A and B are the same? The doc string for ge
says that the "internal structure can be specified with a map of options: :layout (:column or :row)." How can they be equivalent if the internal structure is different?@aaelony:order was renamed to :layout several versions ago. Is there any place in the documentation or tutorials that I forgot to update?
BTW even when you specify that with :layout, neanderthal checks for equality of all elements, taking layout into account. Matrices with same elements should be equal.
perhaps also https://neanderthal.uncomplicate.org/codox/uncomplicate.neanderthal.core.html#var-ge
Please open issue if you see :order in the wild, so I can update the blog posts too.
understood. e.g. https://dragan.rocks/articles/17/Clojure-Numerics-1-Use-Matrices-Efficiently
This created a dense 3×2 column-oriented matrix. Notice how the 1-d Clojure sequence that we used as data source has been read column-by-column.
The other option is row orientation:
(dge 3 2 [1 2 3 4 5 6] {:order :row})
#RealGEMatrix[double, mxn:3x2, layout:column, offset:0]
▥ ↓ ↓ ┓
→ 1.00 4.00
→ 2.00 5.00
→ 3.00 6.00
┗ ┛
@aaelony Thank you. Please report any issues or improvement ideas that you might have.
@blueberry Will do. Thank-you for such an excellent library!