Skip to content

Commit

Permalink
Update numpy to v2
Browse files Browse the repository at this point in the history
  • Loading branch information
hchargois committed Dec 9, 2024
1 parent 84de562 commit 6fbfc53
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion library/lcd/lcd_comm_rev_a.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def imageToRGB565LE(image: Image):
rgb565 = (r << 11) | (g << 5) | b

# serialize to little-endian
return rgb565.newbyteorder('<').tobytes()
return rgb565.astype('<u2').tobytes()

def DisplayPILImage(
self,
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ uptime~=3.0.1 # For System Uptime

# Efficient image serialization
numpy~=1.24.4; python_version < "3.9" # For Python 3.8 max.
numpy~=1.26.4; python_version >= "3.9" # For Python 3.9+
numpy~=2.0.0; python_version == "3.9" # For Python 3.9, only numpy 2.0.x is supported as 2.1 only supports Python >=3.10
numpy~=2.0; python_version >= "3.10" # For Python >=3.10, any numpy 2.x is fine

# For Nvidia GPU on all platforms
GPUtil~=1.4.0; python_version < "3.12"
Expand Down

0 comments on commit 6fbfc53

Please sign in to comment.