NumPy array is not JSON serializable
import json
import numpy
l = numpy.array([[1,2,3], [4,5,6], [7,8,9]])
# 格式化
a = json.dumps(l.tolist())
# 还原
b = numpy.asarray(json.loads(a))
NumPy array is not JSON serializable
import json
import numpy
l = numpy.array([[1,2,3], [4,5,6], [7,8,9]])
# 格式化
a = json.dumps(l.tolist())
# 还原
b = numpy.asarray(json.loads(a))