Skip to content

Instantly share code, notes, and snippets.

@nbren12
Created July 10, 2015 20:00
Show Gist options
  • Save nbren12/aedcb73c6a71e1b91a91 to your computer and use it in GitHub Desktop.
Save nbren12/aedcb73c6a71e1b91a91 to your computer and use it in GitHub Desktop.
Snakemake and dask incompatibility
import numpy as np
import dask.array as da
rule all:
output: "out.hdf5"
run:
n = 1000
s = 1001
X = np.random.rand(s, n)
X -= X.mean(axis=0)[None,:]
da.from_array(X, chunks = (100,100))\
.to_hdf5(output[0], "/out")
import numpy as np
import dask.array as da
n = 1000
s = 1001
X = np.random.rand(s, n)
X -= X.mean(axis=0)[None,:]
da.from_array(X, chunks = (100,100))\
.to_hdf5("out.hdf5", "/out")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment