Skip to content

Instantly share code, notes, and snippets.

@athas
Created October 5, 2020 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save athas/b6d96299b5f01acee958f79bc9d436fa to your computer and use it in GitHub Desktop.
Save athas/b6d96299b5f01acee958f79bc9d436fa to your computer and use it in GitHub Desktop.
import futhark_data
import numpy as np
import sys
buf = sys.stdin.buffer.read()
arr = np.frombuffer(buf, dtype=np.uint8)
futhark_data.dump(arr, sys.stdout.buffer, binary=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment