Skip to content

Instantly share code, notes, and snippets.

@drdavella
Created May 10, 2018 16:05
Show Gist options
  • Save drdavella/0fee101fe17bb7f457f5391f96e22449 to your computer and use it in GitHub Desktop.
Save drdavella/0fee101fe17bb7f457f5391f96e22449 to your computer and use it in GitHub Desktop.
Script to create an ASDF file useful for testing asdf-cpp implementation
#!/usr/bin/env python3
import asdf
import numpy as np
tree = dict()
tree['top'] = dict(foo=42, bar='hello', nums=np.array([x for x in range(100)]))
with asdf.AsdfFile(tree) as af:
af.write_to('test.asdf')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment