def __check_input(input, offset, dim1, dim2):
    check_dtype(input.dtype, 'Input', ['int32', 'int64', 'float16', 'float32', 'float64'], 'diag_embed')
    input_shape = list(input.shape)
    assert (len(input_shape) >= 1), ("Input must be at least 1-dimensional, But received Input's dimensional: %s.\n" % len(input_shape))
    assert (np.abs(dim1) <= len(input_shape)), ('Dim1 is out of range (expected to be in range of [%d, %d], but got %d).\n' % ((- (len(input_shape) + 1)), len(input_shape), dim1))
    assert (np.abs(dim2) <= len(input_shape)), ('Dim2 is out of range (expected to be in range of [%d, %d], but got %d).\n' % ((- (len(input_shape) + 1)), len(input_shape), dim2))
    dim1_ = (dim1 if (dim1 >= 0) else ((len(input_shape) + dim1) + 1))
    dim2_ = (dim2 if (dim2 >= 0) else ((len(input_shape) + dim2) + 1))
    assert (dim1_ != dim2_), ('dim1 and dim2 cannot be the same dimension.But received dim1 = %d, dim2 = %d\n' % (dim1, dim2))
def __check_input(input, offset, dim1, dim2):
    check_dtype(input.dtype, 'Input', ['int32', 'int64', 'float16', 'float32', 'float64'], 'diag_embed')
    input_shape = list(input.shape)
    assert (len(input_shape) >= 1), ("Input must be at least 1-dimensional, But received Input's dimensional: %s.\n" % len(input_shape))
    assert (np.abs(dim1) <= len(input_shape)), ('Dim1 is out of range (expected to be in range of [%d, %d], but got %d).\n' % ((- (len(input_shape) + 1)), len(input_shape), dim1))
    assert (np.abs(dim2) <= len(input_shape)), ('Dim2 is out of range (expected to be in range of [%d, %d], but got %d).\n' % ((- (len(input_shape) + 1)), len(input_shape), dim2))
    dim1_ = (dim1 if (dim1 >= 0) else ((len(input_shape) + dim1) + 1))
    dim2_ = (dim2 if (dim2 >= 0) else ((len(input_shape) + dim2) + 1))
    assert (dim1_ != dim2_), ('dim1 and dim2 cannot be the same dimension.But received dim1 = %d, dim2 = %d\n' % (dim1, dim2))