Created
May 27, 2018 21:26
-
-
Save davefernig/e0361aac497c9735682f9b4007693eff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def __numpy_to_string(A): | |
return A.tostring().hex() | |
def __string_to_numpy(S): | |
return np.frombuffer(bytes.fromhex(S), dtype=np.float32) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for share!