Fix some numpy deprecation warnings

This commit is contained in:
kris 2023-01-17 12:26:25 +00:00
parent d603445862
commit 4f6d7a796a
3 changed files with 5 additions and 5 deletions

View File

@ -58,7 +58,7 @@ def compute_diff_matrix(pal: Type[palette.BasePalette]):
Specifically CIE2000 delta values for this palette.
"""
dm = np.ndarray(shape=(16, 16), dtype=np.int)
dm = np.ndarray(shape=(16, 16), dtype=np.int32)
for colour1, a in pal.RGB.items():
alab = colormath.color_conversions.convert_color(

View File

@ -39,7 +39,7 @@ X_Y_TO_PAGE = np.zeros((192, 40), dtype=np.uint8)
X_Y_TO_OFFSET = np.zeros((192, 40), dtype=np.uint8)
# Mask of which (page, offset) bytes represent screen holes
SCREEN_HOLES = np.full((32, 256), True, dtype=np.bool)
SCREEN_HOLES = np.full((32, 256), True, dtype=np.bool8)
# Dict mapping memory address to (page, y, x_byte) tuple
ADDR_TO_COORDS = {}
@ -417,7 +417,7 @@ class Bitmap:
this content byte.
"""
diff = np.ndarray((32, 256), dtype=np.int)
diff = np.ndarray((32, 256), dtype=np.int32)
offsets = self._byte_offsets(is_aux)

View File

@ -53,9 +53,9 @@ class Video:
)
# Accumulates pending edit weights across frames
self.update_priority = np.zeros((32, 256), dtype=np.int)
self.update_priority = np.zeros((32, 256), dtype=np.int32)
if self.mode == mode.DHGR:
self.aux_update_priority = np.zeros((32, 256), dtype=np.int)
self.aux_update_priority = np.zeros((32, 256), dtype=np.int32)
def tick(self, ticks: int) -> bool:
"""Keep track of when it is time for a new image frame."""