hi all, I have created a class MyClass and defined methods like __add__, __mul__, __pow__, __radd__, __rmul__ etc. Also, they are defined to work with numbers, Python lists and numpy.arrays.
Both Python lists and numpy arrays have their own methods __add__, __mul__, __pow__, __radd__, __rmul__ etc. If I involve myPythonList * myClassInstance it returns just result of my __rmul__; but when I invoke nuumpy_arr*myClassInstance it returns another numpy array with elements [nuumpy_arr[0]*myClassInstance, nuumpy_arr[1]*myClassInstance, ...]. Can I somehow prevent numpy array of using it __mul__ etc methods? (and use only my __rmul__, __radd__, etc instead)? Thank you in advance, D. -- http://mail.python.org/mailman/listinfo/python-list