From 7abbb6bffb5a017dde22a986224a2f55c42368d7 Mon Sep 17 00:00:00 2001 From: Jared Miller Date: Thu, 12 Feb 2026 21:08:33 -0500 Subject: [PATCH] Vectorize UV initialization with numpy broadcasting --- playscii/art.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/playscii/art.py b/playscii/art.py index e221e76..9120e98 100644 --- a/playscii/art.py +++ b/playscii/art.py @@ -535,11 +535,7 @@ class Art: shape = (layers, self.height, self.width, UV_STRIDE) array = np.zeros(shape, dtype=np.float32) # default new layer of UVs to "normal" transform - uvs = uv_types[UV_NORMAL] - for layer in range(layers): - for y in range(self.height): - for x in range(self.width): - array[layer][y][x] = uvs + array[:] = uv_types[UV_NORMAL] return array def is_tile_inside(self, x, y):