In order to persist some data, I use mysql as my database. I needed to store arrays of floats, and I didn't manage to do it properly, so I decided to store them as strings, thinking I'll just restore them to be a float array once I read them from the database.
So, two questions: 1. is there a better way to store those? 2. how do I convert a string array such as:
Outp = '[0.0, 0.22532551050405566, 0.32132351221384514, 8.329281012428868e-18, 0.012183960426492089, 0.14915942181052608, 0.0, 0.2920075950450811]'
I tried multiple manipulations with numpy objects, lists and floats. With no success, they all seem to address the variable as a single item and not as a list.
looking for a good way either to save it into the DB in a way that it is float when I read it from the DB or, a way to convert it to float.