import numpy as np
a = np.array([1,2,3])
I know that a[3] will get IndexError Exception. Is there any way to implement such as a[3] = 'new_value'
by some magic method such as __call__
or other magic methods which may return the custom value or custom data struct.
Or how python implement the list object, and what will happen when access or call the index number of a list.
I'm not very familiar with numpy.