<div dir="ltr">On Tue, Jun 27, 2017 at 2:54 AM, Larry Evans <<a href="mailto:cppljevans@suddenlink.net">cppljevans@suddenlink.net</a>> wrote:<br><br>> a=<br>> [[<class '__main__.ShortestNull'> 12.0]<br>>  [12.0 <0>]]<br>> a[0]=<br>> [<class '__main__.ShortestNull'> 12.0]<br>> a[0][0]=<br>> <class '__main__.ShortestNull'><br>> Traceback (most recent call last):<br>>   File "shortestPathABC.py", line 123, in <module><br>>     a00mul=a[0][0].__mul__(a[0][0])<br>> TypeError: __mul__() missing 1 required positional argument: 'other'<br>> Makefile:7: recipe for target 'all' failed<br>> make: *** [all] Error 1<br>> --}--cut here--<br>><br>> I don't understand why.  Apparently, a[0][0] is not a ShortestNull because otherwise, the .__mul__ would have the positional argument,<br>> 'other' equal to a[0][0].<br>><br>> What am I missing?<br><br><span style="font-size:12.8px">> a=np.array([[ShortestNull,Shor</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">testPath(12)],[ShortestPath(</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">12),ShortestNull()]],dtype=</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">object)</span><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">You didn't instantiate ShortestNull but passed the class object instead.</span></div><div><span style="font-size:12.8px"><br></span>--<br>Robert Kern</div></div>