def _np_dtype(bit_res, discrete):
    """
    Given the bit resolution of a signal, return the minimum numpy dtype
    used to store it.

    Parameters
    ----------
    bit_res : int
        The bit resolution.
    discrete : bool
        Whether the dtype is to be int or float.

    Returns
    -------
    dtype : str
        String numpy dtype used to store the signal of the given
        resolution

    """
    bit_res = min(bit_res, 64)

    for np_res in [8, 16, 32, 64]:
        if bit_res <= np_res:
            break

    if discrete is True:
        return 'int' + str(np_res)
    else:
        # No float8 dtype
        return 'float' + str(max(np_res, 16))
def _np_dtype ( bit_res , discrete ) : bit_res = min ( bit_res , 64 ) for np_res in [ 8 , 16 , 32 , 64 ] : if bit_res <= np_res : break if discrete is True : return 'int' + str ( np_res ) else : return 'float' + str ( max ( np_res , 16 ) )
Given the bit resolution of a signal, return the minimum numpy dtype
    used to store it.

    Parameters
    ----------
    bit_res : int
        The bit resolution.
    discrete : bool
        Whether the dtype is to be int or float.

    Returns
    -------
    dtype : str
        String numpy dtype used to store the signal of the given
        resolution