Hacker News new | past | comments | ask | show | jobs | submit login

This Python code is "as expressive" as the Julia code because it's not written in idiomatic Python. Por ejemplo:

    for i in range(n):
        solution[i] = y[i]

when one could simply

     solution[:n] = y[:n]

Don't mean to bikeshed, but this is one of many cases.



FWIW, benchmarks indicated that the former was faster than the latter. Remember, this is Cython, so the goal is to write code that is easily compiled into efficient C code, not to write idiomatic Python.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: