←back to thread

132 points zfnmxt | 1 comments | | HN request time: 0s | source
Show context
eigenspace ◴[] No.40713949[source]
I’d strongly suggest not going the Numpy route, and instead reading about broadcast in julia [1]. In many contexts, it’s very important to distinguish between the element-wise application of a function, and a function that is applied to an entire array. A classic example would be the matrix exponential[2], versus the element-wise exponential of a matrix.

In julia the former is `exp(M)`, and the latter is `exp.(M)`

[1] https://julialang.org/blog/2017/01/moredots/

[2] https://en.m.wikipedia.org/wiki/Matrix_exponential

replies(4): >>40714080 #>>40714083 #>>40714427 #>>40715920 #
lalaithion ◴[] No.40714080[source]
Futhark is a statically typed language, so it can’t have the same ambiguity.
replies(1): >>40714241 #
1. eigenspace ◴[] No.40714241[source]
What ambiguity?