Skip to content

Update numpy to v2 #615

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,9 @@ dmypy.json
# Pyre type checker
.pyre/

# PyCharm
# Editors / IDEs
.idea/
.vscode/

# Git mergetool backup
*.orig
Expand Down
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
Loading