On Tue, Jun 27, 2017 at 2:54 AM, Larry Evans <cppljev...@suddenlink.net> wrote:
> a= > [[<class '__main__.ShortestNull'> 12.0] > [12.0 <0>]] > a[0]= > [<class '__main__.ShortestNull'> 12.0] > a[0][0]= > <class '__main__.ShortestNull'> > Traceback (most recent call last): > File "shortestPathABC.py", line 123, in <module> > a00mul=a[0][0].__mul__(a[0][0]) > TypeError: __mul__() missing 1 required positional argument: 'other' > Makefile:7: recipe for target 'all' failed > make: *** [all] Error 1 > --}--cut here-- > > I don't understand why. Apparently, a[0][0] is not a ShortestNull because otherwise, the .__mul__ would have the positional argument, > 'other' equal to a[0][0]. > > What am I missing? > a=np.array([[ShortestNull,ShortestPath(12)],[ShortestPath( 12),ShortestNull()]],dtype=object) You didn't instantiate ShortestNull but passed the class object instead. -- Robert Kern
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion