From 0dbfe279242ceb0933aa641d0daf90b03ff1feff 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..4406461 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)) + hh = numpy.ones((tt.size,)) qq = nodes[None, 0] * hh 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] + hh /= kk * udiv * weights[kk - 1] + hh[:, None] + qq *= 1.0 - hh[:, None] + qq += hh[:, None] * nodes[None, kk] return qq