Re:What Learning APL Taught Me About Python
by RojerGS on Thursday August 17, 2023 @05:33AM
(#37159265)
Yes, this is VERY close to the APL way: +/ages>17
OP here; maybe I'll add a comment to the article to make the comparison between NumPy and APL for this expression. Thanks!
Re:What Learning APL Taught Me About Python
by leprechaun1066 on Thursday August 17, 2023 @07:28AM
(#37160006)
APL (along with Matlab, K, Mathematica, etc.) was one of the influences for NumPy anyway.
np.sum(age>17)
(Assumes age is a np.array)