pylas/point/packing.py
def unpack(source_array, mask, dtype=np.uint8):
    """ Unpack sub field using its mask

    Parameters:
    ----------
    source_array : numpy.ndarray
        The source array
    mask : mask (ie: 0b00001111)
        Mask of the sub field to be extracted from the source array
    Returns
    -------
    numpy.ndarray
        The sub field array
    """
    lsb = least_significant_bit(mask)
    return ((source_array & mask) >> lsb).astype(dtype)
def unpack(source_array, mask, dtype=np.uint8):
    lsb = least_significant_bit(mask)
    return ((source_array & mask) >> lsb).astype(dtype)
def unpack ( source_array , mask , dtype = np . uint8 ) : lsb = least_significant_bit ( mask ) return ( ( source_array & mask ) >> lsb ) . astype ( dtype )
Unpack sub field using its mask

    Parameters:
    ----------
    source_array : numpy.ndarray
        The source array
    mask : mask (ie: 0b00001111)
        Mask of the sub field to be extracted from the source array
    Returns
    -------
    numpy.ndarray
        The sub field array
Unpack sub field using its mask