Numpy. Getbuffer (a) is written in python2, but not in python3. Where a is the numpy array
the following methods can be used instead: a.tobytes(), a.data.tobytes(), memoryview (a). Tobytes(), bytes (a.data), bytes (memoryview (a))
https://stackoverflow.com/questions/21821045/numpy-getbuffer-causes-attributeerror-module-object-has-no-attribute-getbuff