def _update_from_dict(self, in_dict): """ Update wavefront from dictionary. Used for loading wavefront to HDF5 file. :param in_dict: input dictionary :type in_dict: dict """ for (key, value) in in_dict.iteritems(): if key in self._wf_fields: self._wf_fields[key].value = value else: utils.update_dict_slash_string(self.custom_fields, key, value)
def _update_from_dict(self, in_dict): """ Update wavefront from dictionary. Used for loading wavefront to HDF5 file. :param in_dict: input dictionary :type in_dict: dict """ for (key, value) in in_dict.items(): # python3 hack if isinstance(key, bytes): key = key.decode('utf-8') if key in self._wf_fields: self._wf_fields[key].value = value else: utils.update_dict_slash_string(self.custom_fields, key, value)