convert_numpy_types_to_h5py

s100py.s1xx.convert_numpy_types_to_h5py(vals, dtypes=None, names=None)

change numpy arrays with “U” into array using the h5py special string_dtype that translates to utf-8 in the file.

Parameters:
  • vals – a list or array

  • dtypes – optional list of dtypes to use with the record array – note: dtype specifies the names and types so no need for names parameter

  • names – optional list of names to use with the record array

Return type:

A new numpy array which will have h5py special types embedded for the strings