• Brendan Murphy's avatar
    Preserve numpy < 2.0 Unique inverse output shape · 4c8c8b6e
    Brendan Murphy 提交于
    In numpy 2.0, if axis=None, then np.unique
    does not flatten the inverse indices returned
    if return_inverse=True
    
    A helper function has been added to npy_2_compat.py
    to mimic the output of `np.unique` from version of
    numpy before 2.0
    4c8c8b6e
npy_2_compat.py 10.7 KB