From: serge-sans-paille Date: Tue, 19 Jul 2022 17:04:28 +0000 (+0200) Subject: [PATCH] Have get_index_dtype follow its documentation and return int32 or int64 X-Git-Tag: archive/raspbian/1.10.0-12+rpi1^2~11 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f2b3569cc5606ac867db770a52f77d85b15f35a6;p=scipy.git [PATCH] Have get_index_dtype follow its documentation and return int32 or int64 This also avoids np.intc which is a portability pain. Adjust group_sparse signature accordingly. This should also fix https://github.com/serge-sans-paille/pythran/issues/2002 Gbp-Pq: Name pythran_type_PR16646.patch --- diff --git a/scipy/optimize/_group_columns.py b/scipy/optimize/_group_columns.py index 99751d28..cc0412f0 100644 --- a/scipy/optimize/_group_columns.py +++ b/scipy/optimize/_group_columns.py @@ -52,10 +52,10 @@ def group_dense(m, n, A): return groups -#pythran export group_sparse(int, int, int32[], int32[]) -#pythran export group_sparse(int, int, int64[], int64[]) -#pythran export group_sparse(int, int, int32[::], int32[::]) -#pythran export group_sparse(int, int, int64[::], int64[::]) +# pythran export group_sparse(int, int, int32[] or int32[::], +# int32[] or int32[::]) +# pythran export group_sparse(int, int, int64[] or int64[::], +# int64[] or int64[::]) def group_sparse(m, n, indices, indptr): groups = -np.ones(n, dtype=np.intp) current_group = 0