Generate a linear lookup table.

    :param nbits: int
        Number of bits to represent a quantized weight value

    :param wp: numpy.array
        Weight blob to be quantized

    Returns
    -------
    lookup_table: numpy.array
        Lookup table of shape (2^nbits, )
    qw: numpy.array
        Decomposed bit stream as a list of 0/1s of length (len(arr) * 8)

def _get_linear_lookup_table_and_weight(nbits, wp):
    """
    Generate a linear lookup table.

    :param nbits: int
        Number of bits to represent a quantized weight value

    :param wp: numpy.array
        Weight blob to be quantized

    Returns
    -------
    lookup_table: numpy.array
        Lookup table of shape (2^nbits, )
    qw: numpy.array
        Decomposed bit stream as a list of 0/1s of length (len(arr) * 8)
    """
    w = wp.reshape(1, -1)
    qw, scales, biases = _quantize_channelwise_linear(w, nbits, axis=0)
    indices = _np.array(range(0, 2**nbits))
    lookup_table = indices * scales[0] + biases[0]
    return lookup_table, qw