Hacker News new | ask | show | jobs
by DNF2 760 days ago
I didn't even mention the dot operator syntax (.*,.^,./) used in Matlab, while numpy uses only implicit broadcasting. On the other hand, numpy can partially leverage map, filter, comprehension (though with performance loss). Julia has both much expanded dot-syntax and (multidimensional) comprehensions/map/filter with full performance.

What else? Matlab indexes with end, while numpy just leaves it open (e.g. 3:). Numpy allows negative indices, not Matlab. n:m is both a standalone range and an indexing expression in Matlab, not in numpy. Also numpy uses open ranges, Matlab closed ranges. And A[2:2:10] has dramatically different meaning in Matlab and numpy.