Preserve numpy < 2.0 Unique inverse output shape
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
正在显示
请
注册
或者
登录
后发表评论