@@ -209,10 +209,10 @@ def process(self, input_filename, output_filename, rows,
209209 # It's formed just like valid strip data (with header, per-pixel
210210 # start markers and footer), with colors all '0' to start...these
211211 # will be filled later.
212- dotstar_buffer = ulab .array ([0 ] * 4 +
212+ dotstar_buffer = ulab .numpy . array ([0 ] * 4 +
213213 [255 , 0 , 0 , 0 ] * self .num_pixels +
214214 [255 ] * ((self .num_pixels + 15 ) // 16 ),
215- dtype = ulab .uint8 )
215+ dtype = ulab .numpy . uint8 )
216216 dotstar_row_size = len (dotstar_buffer )
217217
218218 # Output rows are held in RAM and periodically written,
@@ -251,8 +251,8 @@ def process(self, input_filename, output_filename, rows,
251251
252252 # Each output row is interpolated from two BMP rows,
253253 # we'll call them 'a' and 'b' here.
254- row_a_data = ulab .zeros (row_bytes , dtype = ulab .uint8 )
255- row_b_data = ulab .zeros (row_bytes , dtype = ulab .uint8 )
254+ row_a_data = ulab .numpy . zeros (row_bytes , dtype = ulab . numpy .uint8 )
255+ row_b_data = ulab .numpy . zeros (row_bytes , dtype = ulab . numpy .uint8 )
256256 prev_row_a_index , prev_row_b_index = None , None
257257
258258 with open (output_filename , 'wb' ) as led_file :
@@ -323,7 +323,7 @@ def process(self, input_filename, output_filename, rows,
323323 # operations. First, the 'want' values are quantized
324324 # to uint8's -- so these will always be slightly
325325 # dimmer (v. occasionally equal) to the 'want' vals.
326- got = ulab .array (want , dtype = ulab .uint8 )
326+ got = ulab .numpy . array (want , dtype = ulab . numpy .uint8 )
327327 # Note: naive 'foo = foo + bar' syntax used in this
328328 # next section is intentional. ndarrays don't seem
329329 # to always play well with '+=' syntax.
@@ -335,7 +335,7 @@ def process(self, input_filename, output_filename, rows,
335335 # Accumulated error vals will all now be 0.0 to <2.0.
336336 # Quantizing err into a new uint8 ndarray, all values
337337 # will be 0 or 1.
338- err_bits = ulab .array (err , dtype = ulab .uint8 )
338+ err_bits = ulab .numpy . array (err , dtype = ulab . numpy .uint8 )
339339 # Add the 1's back into 'got', increasing the
340340 # brightness of certain pixels by 1. Because the max
341341 # value in 'got' is 254 (not 255), no clipping need
0 commit comments