From 8507b09332f770d7cdec5469eb46580ddb3acaff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ne=C4=8Dada?= Date: Mon, 1 Oct 2018 17:03:56 +0300 Subject: [PATCH] Fix fatal typo in translations.c Former-commit-id: 54d8ff3b8cd8f443584bd567e8ba068539e5656f --- qpms/tmatrices.py | 2 +- qpms/translations.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qpms/tmatrices.py b/qpms/tmatrices.py index 859563d..1265526 100644 --- a/qpms/tmatrices.py +++ b/qpms/tmatrices.py @@ -229,7 +229,7 @@ def apply_ndmatrix_right(tensor, matrix, axes): Multiplies a tensor with a 2N-dimensional matrix, conserving the axis order. """ N = len(axes) - matrix = np.tensordot(tensor, matrix, axes = (range(N), axes)) + matrix = np.tensordot(tensor, matrix, axes = (axes, range(N))) matrix = np.moveaxis(matrix, [-N+axn for axn in range(N)], axes) return matrix diff --git a/qpms/translations.c b/qpms/translations.c index 69f52b7..d4ea508 100644 --- a/qpms/translations.c +++ b/qpms/translations.c @@ -1241,7 +1241,7 @@ int qpms_trans_calculator_get_AB_arrays_e32_both_points_and_shift(const qpms_tra for(qpms_l_t q = 0; q <= qmax; ++q) { const qpms_l_t p_ = n + nu - 2*q + 1; const qpms_y_t y_sc = qpms_mn2y_sc(mu_m, p_); - const complex double multiplier = c->A_multipliers[i][q-BQ_OFFSET]; + const complex double multiplier = c->B_multipliers[i][q-BQ_OFFSET]; complex double sigma = sigmas_total[y_sc]; ckahanadd(&Bsum, &Bsumc, multiplier * sigma); if (Berr) kahanadd(&Bsumerr, &Bsumerrc, multiplier * serr_total[y_sc]);