The default behaviour of yaml.safe_dump is to sort the keys in the dictionary, but chances are that is not the default behaviour we want here. It should be change such that the order in which data is written is the same than in the header dictionary.
The default behaviour of
yaml.safe_dump
is to sort the keys in the dictionary, but chances are that is not the default behaviour we want here. It should be change such that the order in which data is written is the same than in the header dictionary.