Re:ELI – A System for Programming with Arrays
by yummyfajitas on Tuesday December 16, 2014 @08:45AM
(#8757058)
Not all APL-like languages do the conciseness thing. Numpy doesn't. Recently a colleague had some imperative code for computing a specific random variable (average revenue given a certain product selection process). Roughly speaking, the for-loop you expect. In code review I changed it to:
Net result - this draws NUM_SAMPLES dirichlet vectors, dots them with the rev_by_category vector, and generates a list of NUM_SAMPLES of the corresponding random variable.
From what I understand, this is definitely idiomatic J translated to Python. In general, idiomatic numpy code will always be array oriented since that's (until recently) the only way to shell out to C.
So from what I can tell, APL isn't dead. It's just spelled out in easy to read executable pseudocode.
Or:
From what I understand, this is definitely idiomatic J translated to Python. In general, idiomatic numpy code will always be array oriented since that's (until recently) the only way to shell out to C.So from what I can tell, APL isn't dead. It's just spelled out in easy to read executable pseudocode.