How do I read numpy source? How do I read numpy source? numpy numpy

How do I read numpy source?


  • np.array is not a class itself, just a convenience function to create an np.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 in array_getarray()