How do I read numpy source?
np.array
is not a class itself, just a convenience function to create annp.ndarray
ndarray
is just aliased to multiarray, which is implemented in C code (I think in an .so i.e. shared object, compiled code)- You can start looking at the ndarray interfaces here in numeric.py.
- Most of the meat of the implementation is in C code, here in multiarray.
array()
is implemented in core/src/multiarray/methods.c inarray_getarray()