raiseValueError('shape mismatch in StructuredDot.perform',(a.shape,b.shape))
ifb.shape[0]==1:
raiseNotImplementedError('ERROR: scipy.csc_matrix dot has bug with singleton dimensions')
result=a.dot(b)
...
...
@@ -699,6 +697,12 @@ class StructuredDot(gof.Op):
assertresult.ndim==2
ifresult.shape!=(a.shape[0],b.shape[1]):
ifb.shape[0]==1:
raiseException("a.shape=%s, b.shape=%s, result.shape=%s ??? This is probably because scipy.csc_matrix dot has a bug with singleton dimensions (i.e. b.shape[0]=1), for scipy 0.6. Use scipy 0.7"%(a.shape,b.shape,result.shape))
else:
raiseException("a.shape=%s, b.shape=%s, result.shape=%s ??? I have no idea why")
## Commenting this out because result should be a numpy.ndarray since the assert above
## (JB 20090109)
#out[0] = numpy.asarray(result) #TODO: fix this really bad implementation