diff options
author | czgdp1807 <gdp.1807@gmail.com> | 2021-07-10 11:27:30 +0530 |
---|---|---|
committer | czgdp1807 <gdp.1807@gmail.com> | 2021-07-10 11:27:30 +0530 |
commit | 6e405d53a504d6f97c8b1227d7f4d3c3c1aa2834 (patch) | |
tree | ef75a6fe894e51ec1019d2db9ebca7eec2216d9a /numpy/linalg/umath_linalg.c.src | |
parent | 6ab34ef44aede6b09148ed6868c8ad2b0846e8e4 (diff) | |
download | numpy-6e405d53a504d6f97c8b1227d7f4d3c3c1aa2834.tar.gz |
removed redudancy in code
Diffstat (limited to 'numpy/linalg/umath_linalg.c.src')
-rw-r--r-- | numpy/linalg/umath_linalg.c.src | 38 |
1 files changed, 12 insertions, 26 deletions
diff --git a/numpy/linalg/umath_linalg.c.src b/numpy/linalg/umath_linalg.c.src index 27fe51732..a486e9e5b 100644 --- a/numpy/linalg/umath_linalg.c.src +++ b/numpy/linalg/umath_linalg.c.src @@ -3973,6 +3973,10 @@ static void *array_of_nulls[] = { CDOUBLE_ ## NAME \ } +/* The single precision functions are not used at all, + * due to input data being promoted to double precision + * in Python, so they are not implemented here. + */ #define GUFUNC_FUNC_ARRAY_QR(NAME) \ static PyUFuncGenericFunction \ FUNC_ARRAY_NAME(NAME)[] = { \ @@ -4285,7 +4289,7 @@ GUFUNC_DESCRIPTOR_t gufunc_descriptors [] = { "(m,n)->(m)", "Compute TAU vector for the last two dimensions \n"\ "and broadcast to the rest. For m <= n. \n", - 4, 1, 1, + 2, 1, 1, FUNC_ARRAY_NAME(qr_r_raw), qr_r_raw_types }, @@ -4294,43 +4298,25 @@ GUFUNC_DESCRIPTOR_t gufunc_descriptors [] = { "(m,n)->(n)", "Compute TAU vector for the last two dimensions \n"\ "and broadcast to the rest. For m > n. \n", - 4, 1, 1, + 2, 1, 1, FUNC_ARRAY_NAME(qr_r_raw), qr_r_raw_types }, { - "qr_reduced_m", - "(m,n),(m)->(m,m)", - "Compute Q matrix for the last two dimensions \n"\ - "and broadcast to the rest. For m <= n. \n", - 4, 2, 1, - FUNC_ARRAY_NAME(qr_reduced), - qr_reduced_types - }, - { - "qr_reduced_n", - "(m,n),(n)->(m,n)", + "qr_reduced", + "(m,n),(k)->(m,k)", "Compute Q matrix for the last two dimensions \n"\ - "and broadcast to the rest. For m > n. \n", - 4, 2, 1, + "and broadcast to the rest. \n", + 2, 2, 1, FUNC_ARRAY_NAME(qr_reduced), qr_reduced_types }, { - "qr_complete_m", - "(m,n),(m)->(m,m)", - "Compute Q matrix for the last two dimensions \n"\ - "and broadcast to the rest. For m <= n. \n", - 4, 2, 1, - FUNC_ARRAY_NAME(qr_complete), - qr_complete_types - }, - { - "qr_complete_n", + "qr_complete", "(m,n),(n)->(m,m)", "Compute Q matrix for the last two dimensions \n"\ "and broadcast to the rest. For m > n. \n", - 4, 2, 1, + 2, 2, 1, FUNC_ARRAY_NAME(qr_complete), qr_complete_types }, |