def merge_explicit(matadd):
 groups = sift(matadd.args, (lambda arg: isinstance(arg, MatrixBase)))
 if (len(groups[True]) > 1):
  return MatAdd(*(groups[False] + [reduce(add, groups[True])]))
 else:
  return matadd

def merge_explicit ( matadd ) : groups = sift ( matadd . args , ( lambda arg : isinstance ( arg , MatrixBase ) ) ) if ( len ( groups [ True ] ) > 1 ) : return MatAdd ( * ( groups [ False ] + [ reduce ( add , groups [ True ] ) ] ) ) else : return matadd
merge explicit matrixbase arguments .