This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-05-21
Channels
- # announcements (4)
- # beginners (47)
- # cider (7)
- # clj-kondo (9)
- # cljs-dev (16)
- # clojure (8)
- # clojure-dev (33)
- # clojure-europe (39)
- # clojure-germany (2)
- # clojure-my (1)
- # clojure-nl (1)
- # clojure-norway (18)
- # clojure-uk (6)
- # clojuredesign-podcast (8)
- # clojurescript (12)
- # cursive (9)
- # datomic (24)
- # docker (3)
- # fulcro (23)
- # hoplon (7)
- # hyperfiddle (2)
- # java (5)
- # jvm (3)
- # leiningen (9)
- # lsp (6)
- # off-topic (75)
- # pathom (17)
- # polylith (21)
- # reitit (1)
- # rewrite-clj (11)
- # scittle (2)
- # shadow-cljs (57)
- # uncomplicate (6)
- # yamlscript (27)
Does Neanderthal support higher-dimensional arrays? For example, can I create this 2 × 3 × 4 array using Neanderthal?
[[[1 2 3 4]
[2 3 4 5]
[3 4 5 6]]
[[1 3 5 7]
[2 4 6 8]
[3 5 7 9]]]
I only need this for storage and convenience, since I want every entry to be indexable by three numbers, i, j and k. I don’t need tensor math, though—my plan is to slice regular matrices out of it (e.g., all entries with k = 2) and then do the math, so regular matrix multiplication is good enough for me.Not neanderthal as such.
There is deep-diamond
which supports tensors of any dimension:
https://github.com/uncomplicate/deep-diamond
So for math, you would indeed need to "slide" off and go back to naenderthal. Documentation is mainly as tests (or in the book): https://github.com/uncomplicate/deep-diamond/blob/master/test/uncomplicate/diamond/tensor_test.clj
Thank you. It seems that deep-diamond
doesn’t have any functions for indexing or slicing 3D tensors (e.g., to get a specific entry or a 2D matrix), so it might not suit my use case.
Have you tried this:
https://cnuernber.github.io/dtype-next/tech.v3.tensor.html
This has funtiocn mget
to (mget tens x y z & args)
and select
/ slicing
which looks like slicing
Thank you. I’ve actually tried both dtype-next
and core.matrix
, and am using the latter. I was hoping to speed up my matrix math and thought neanderthal
would be a good way to do it, but if I have to convert between neanderthal
matrices and dtype-next
tensors then that might negate any performance benefit.