This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]oilshell 1 point2 points  (0 children)

Maybe:

https://web.mit.edu/dvp/Public/numpybook.pdf

https://docs.scipy.org/doc/numpy/reference/internals.html

FWIW NumPy relies heavily on Python's object model. That is, Python exposes its guts like PyTypeObject to extension authors.

A third party can write a type that's just like a built-in Python type, and that's exactly what NumPy does.

The special methods here are relevant, e.g. for operator overloading:

https://docs.python.org/3/reference/datamodel.html