Skip to content
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

Simple fix to swap numpy.float type out in favour of float #2815

Merged
merged 2 commits into from Nov 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion src_py/surfarray.py
Expand Up @@ -49,9 +49,11 @@

# float96 not available on all numpy versions.
numpy_floats = []
for type_name in "float float32 float64 float96".split():
for type_name in "float32 float64 float96".split():
if hasattr(numpy, type_name):
numpy_floats.append(getattr(numpy, type_name))
# Added below due to deprecation of numpy.float. See issue #2814
numpy_floats.append(float)

# Pixel sizes corresponding to NumPy supported integer sizes, and therefore
# permissible for 2D reference arrays.
Expand Down