def get_dtype(matrix_type: int, precision: str='default'):
    """Reset the type if 'default' not selected"""
    if precision == 'single':
        if matrix_type in [1, 2]:
            dtype = 'float32'
        else:
            dtype = 'complex64'
    elif precision == 'double':
        if matrix_type in [1, 2]:
            dtype = 'float64'
        else:
            dtype = 'complex128'
    elif matrix_type == 1:
        dtype = 'float32'
    elif matrix_type == 2:
        dtype = 'float64'
    elif matrix_type == 3:
        dtype = 'complex64'
    else:
        dtype = 'complex128'
    return dtype
