I have a dictinary in python like this:
mydic = {
'x1': list_of_numpy_array,
'x2': a numpy_array,
'x3': a list_of_numpy_array,
'x4': a list_of_numpy_array
}
I want to send this dictionary from flask-api to the client which calss this api.
When I use this code:
class GetRepresentationResource(Resource):
url = 'representation'
def get(self):
# previous lines of my code which generates mydic
return {
'data': mydict,
'err': ''
}
I get the erro: Is not serializeable