atrcopy/atrcopy/utils.py
Rob McMullen 3f40a914ea Split monolithic atrcopy.py into multiple files in the atrcopy package
* fixed setup.py to work with package format
2016-02-12 20:36:33 -08:00

12 lines
256 B
Python
Executable File

import types
import numpy as np
def to_numpy(value):
if type(value) is np.ndarray:
return value
elif type(value) is types.StringType:
return np.fromstring(value, dtype=np.uint8)
raise TypeError("Can't convert to numpy data")