raiseValueError('Shape mismatch: "out" should have shape starting with %s (plus %i extra dimensions), but the value produced by "perform" has shape %s'\
%(shape,self.ndim_added,rval.shape))
raiseValueError(
'Shape mismatch: "out" should have shape %s, but the'
' value produced by "perform" has shape %s'
%(shape,rval.shape))
elif(self.ndim_added>0and
shape!=rval.shape[:-self.ndim_added]):
raiseValueError(
'Shape mismatch: "out" should have shape starting with'
' %s (plus %i extra dimensions), but the value produced'