mirror of
https://github.com/robmcmullen/atrcopy.git
synced 2024-06-03 07:29:43 +00:00
3f40a914ea
* fixed setup.py to work with package format
12 lines
256 B
Python
Executable File
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")
|