cillian64 / thegrid

The·Grid - Interactive polychromatic lighting array
http://www.thegrid.fish/
2 stars 6 forks source link

numpy grid should have uint8 datatype (not int) #20

Closed adamgreig closed 8 years ago

cillian64 commented 8 years ago

f4f2dea22e40225d8f1c2309cf75bcb11b326736

cillian64 commented 8 years ago

Nothing in control really cares whether the grid states it receives are uint8 or int or any other integer datatype. We could add this check but it's not very python-esque. I've modified all existing patterns to return uint8. Diffusion still uses int internally to give it a bit more wiggle room, then truncates its output to uint8.

adamgreig commented 8 years ago

I anticipate sinks relying on the data format and thus otherwise having to convert it, which is wasteful and possibly surprising for people writing/testing sinks.