Fork me on GitHub

what's the best, idiomatic way to create a matrix of ones using Neanderthal?


@blueberry: question.... what's the best, idiomatic way to create a matrix of ones using Neanderthal?


@aaelony On the CPU, (entry! m 1.0), on the GPU (transfer! m gpu-m)


@blueberry, thank-you. hadn't found it. Any recommendations on a good resource to learn more?


But it is something that depends on your use case. There are other ways. If you already have such matrice, you can copy it to another with (copy! m1 m1-copy) etc...


In this case I want to create a large matrix of ones


On the CPU? entry! is the simplest way


cpu... something similar to

in R


cool. will try entry!


I try to cover as much as i can in api docs + tests + tutorials. I believe I mentioned that, but could be wrong.


I am reading through them, but hadn't come to it yet. link?

blueberry19:10:26 Then there are links to tutorials, and in the top bar, there is a link to the API documentation with examples. For tests, see the source.


cool. doing that.


nice! I was looking for the codox api actually. perfect


lastly, I'm about to try a fresh install on a centos server without atlas etc.. any recommendations on making this as painless as possible?


I recommend to follow the atlas compilation tutorial carefully simple_smile I used Arch Linux, and the process worked as advertized. I just had to configure a few documented options, tested with existing atlas test scripts, add the binary to the path, and was ready to go. Today I am installing NixOS and it seems that it is even more streamlined in it, since the Nix package script seems to do that for me (not tried it yet). Regarding neanderthal itself, it works out of the box on linux if atlas is properly connected with the OS.


@aaleony Would you write some notes on your installing process please? That would help other users a lot since native libs are a huge scare off for many Java people.


sure, if/when I get it working would be happy to do that. I did notice that from the link the (from the Clojars) link is slightly wrong. should be I believe


thanks for reporting. will you please open an issue, so I do not forget to fix it when I install and configure my new OS


question... wouldn't a ones function be handy? There is a zero already...


zero is different. It is for the cases when you need a new instance to hold the results. + it is created instantly, while all those 1s need to be written in memory somehow.


you can create (defn ones [x] (entry! (raw x) 1.0)) if you need it, but I try to keep the API as simple as possible


cool. thanks