(n, **options)
Get the version of eye and tensor_product for a given format.
Get the version of eye and tensor_product for a given format.
Get the version of eye and tensor_product for a given format .
def matrix_eye(n, **options):
    """Get the version of eye and tensor_product for a given format."""
    format = options.get('format', 'sympy')
    if format == 'sympy':
        return eye(n)
    elif format == 'numpy':
        return _numpy_eye(n)
    elif format == 'scipy.sparse':
        return _scipy_sparse_eye(n)
    raise NotImplementedError('Invalid format: %r' % format)
def matrix_eye ( n , * * options ) : format = options . get ( 'format' , 'sympy' ) if format == 'sympy' : return eye ( n ) elif format == 'numpy' : return _numpy_eye ( n ) elif format == 'scipy.sparse' : return _scipy_sparse_eye ( n ) raise NotImplementedError ( 'Invalid format: %r' % format )