Skip to content

Commit

Permalink
Fix overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
olemke committed Jul 4, 2024
1 parent 6bd4936 commit 5f835ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion typhon/plots/colors/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def cmap_from_act(file, name=None):
# Read binary file and determine number of colors
rgb = np.fromfile(file, dtype=np.uint8)
if rgb.shape[0] >= 770:
ncolors = rgb[768] * 2**8 + rgb[769]
ncolors = rgb[768].astype(int) * 2**8 + rgb[769]
else:
ncolors = 256

Expand Down

0 comments on commit 5f835ab

Please sign in to comment.