Answers for "how to convert a matrix string back to a matrix python"

0

how to convert a matrix string back to a matrix python

from ast import literal_eval as safe_eval

string = '[[396, 555], [326, 337], [467, 332]]'
print(safe_eval(string))

# will return: [[396, 555], [326, 337], [467, 332]]
Posted by: Guest on September-02-2020

Code answers related to "how to convert a matrix string back to a matrix python"

Python Answers by Framework

Browse Popular Code Answers by Language