Adds a new parameter to FitnessStatsCSVProbe and AttributesCSVProbe which when True (default) prints numpy arrays as the single line json of their python list representation. This allows any numpy array variables to be restored fairly easily with json.loads.
Of possible note with this solution is that it may result in two different list formats existing in the csv output: python lists printed with the default and numpy lists printed with json. In some limited testing (not unit tests) the default print for nested float lists is json compliant, but this may not be universally true for all types and structures.
Fixes #250
Adds a new parameter to FitnessStatsCSVProbe and AttributesCSVProbe which when True (default) prints numpy arrays as the single line json of their python list representation. This allows any numpy array variables to be restored fairly easily with
json.loads
.Of possible note with this solution is that it may result in two different list formats existing in the csv output: python lists printed with the default and numpy lists printed with json. In some limited testing (not unit tests) the default print for nested float lists is json compliant, but this may not be universally true for all types and structures.