Open zbeekman opened 7 years ago
I don't think this is a viable solution for me because I have to set this before the module is imported. I.e., disabling quantities will disable them globally, but I want to be able to output a dictionary containing natu quantities as floats. Unless I'm missing something your suggestion will globally disable natu.
I'm trying to output a dictionary containing natu quantities as a JSON file. I'm having trouble because I can't directly call
json.dumps(dict,fp)
because json doesn't know how to serialize quantity objects.Is there an easy way to convert all quantities to floats?