#NEWLINE# def merge_explicit( matadd ) : #NEWLINE# #INDENT# " Merge explicit MatrixBase arguments\n\n    >>> from sympy import MatrixSymbol, eye, Matrix, MatAdd, pprint\n    >>> from sympy.matrices.expressions.matadd import merge_explicit\n    >>> A = MatrixSymbol('A', 2, 2)\n    >>> B = eye(2)\n    >>> C = Matrix([[1, 2], [3, 4]])\n    >>> X = MatAdd(A, B, C)\n    >>> pprint(X)\n    A + [1  0] + [1  2]\n        [    ]   [    ]\n        [0  1]   [3  4]\n    >>> pprint(merge_explicit(X))\n    A + [2  2]\n        [    ]\n        [3  5]\n    " #NEWLINE# groups = sift ( matadd . args , ( lambda arg : isinstance ( arg , MatrixBase ) ) ) #NEWLINE# if ( len ( groups [ True ] ) > 1 ) : #NEWLINE# #INDENT# return MatAdd ( * ( groups [ False ] + [ reduce ( add , groups [ True ] ) ] ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return matadd