magicmethods
magicmethods copied to clipboard
__array__ type conversion op for NumPy array
This magic method is specific to a third-party library, but it's one of the most popular libraries, and implementing the magic method is very useful for making other numeric code play nicely with NumPy.