From c3534beb3ff60799455fb9f57537aebc6f66eb6b Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Tue, 25 Feb 2025 21:23:41 -0800 Subject: [PATCH] [utils.curves.bezier] be more explicit about broadcast axes --- masque/utils/curves.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/masque/utils/curves.py b/masque/utils/curves.py index b17b015..276c0ed 100644 --- a/masque/utils/curves.py +++ b/masque/utils/curves.py @@ -32,13 +32,13 @@ def bezier( umul[~t_half0] = 1 udiv[t_half0] = 1 - hh = numpy.ones((tt.size, 1)) - qq = nodes[None, 0] * hh + hh = numpy.ones((tt.size,)) + qq = nodes[None, 0] * hh[:, None] for kk in range(1, nn): hh *= umul * (nn + 1 - kk) * weights[kk] hh /= kk * udiv * weights[kk - 1] + hh - qq *= 1.0 - hh - qq += hh * nodes[None, kk] + qq *= 1.0 - hh[:, None] + qq += hh[:, None] * nodes[None, kk] return qq