Output to stderr instead of emitting a warning
Fixed the numpy array -> bytes encoding in py2