Array-like classes that duck-type the numpy.ndarray interface expect some methods to be also callable as instance-methods; e.g. numpy.reshape and numpy.ndarray.reshape.
As the interface is the same, implementation just calls the dispatcher multimethod. Code duplication can be saved if we automatically implement this with a mixin.
Array-like classes that duck-type the
numpy.ndarray
interface expect some methods to be also callable as instance-methods; e.g.numpy.reshape
andnumpy.ndarray.reshape
.As the interface is the same, implementation just calls the dispatcher
multimethod
. Code duplication can be saved if we automatically implement this with a mixin.