Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Numpy has a lot of these shortcuts that are quite opaque. For example np.r_ and np.c_

This one can be explained as "equivalent to np.linspace(-1, 1, 5)", i.e 5 evenly spaced points between -1 and 1. Normally the step size is an integer but with a complex "step" it switches the meaning from step size to number of equidistant points.



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

Search: