Changed type from int to long

For Python 3.5 compatibility.
This commit is contained in:
Kevin Kellner 2017-01-06 19:40:29 +01:00
parent 063889b23b
commit b23bbc4d22

View File

@ -81,7 +81,7 @@ def _update_pi():
"""
global pixels, _prev_pixels
# Truncate values and cast to integer
pixels = np.clip(pixels, 0, 255).astype(long)
pixels = np.clip(pixels, 0, 255).astype(int)
# Optional gamma correction
p = _gamma[pixels] if config.SOFTWARE_GAMMA_CORRECTION else np.copy(pixels)
# Encode 24-bit LED values in 32 bit integers
@ -105,7 +105,7 @@ def _update_blinkstick():
global pixels
# Truncate values and cast to integer
pixels = np.clip(pixels, 0, 255).astype(long)
pixels = np.clip(pixels, 0, 255).astype(int)
# Optional gamma correction
p = _gamma[pixels] if config.SOFTWARE_GAMMA_CORRECTION else np.copy(pixels)
# Read the rgb values