any_io

wield.iirrational.file_io.any_io

Some notes about writing/reading a common dictionary format across these files: Some of the issues can only be resolved by code-side normalization functions.

Only dictionaries and arrays of numbers should be supported
  • hdf5 cannot have heterogeneous lists of objects (others can)

  • matlab array squeezing can truncate 1x1 arrays to single elements. Only code-side normalization can fix this

  • json/yaml must split complex numbers into dicts with real/imag parts. This could/should be reversed on load, but currently requires code normalization to reverse

Functions

cull_None(obj)

fix_complex(obj)

fix_ndarray(obj)

load_any(fname, ftype)

normalize_ndarray(obj)

write_any(fname, ftype, fdict)

Details

cull_None(obj)[source][github]
fix_complex(obj)[source][github]
fix_ndarray(obj)[source][github]
load_any(fname, ftype)[source][github]
normalize_ndarray(obj)[source][github]
write_any(fname, ftype, fdict)[source][github]