This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import dask.array as da | |
import numpy as np | |
import argparse | |
from skimage.transform import resize, pyramids | |
import h5py | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--------------------------------------------------------------------------- | |
KeyError Traceback (most recent call last) | |
<ipython-input-289-233f4f2e1f24> in <module>() | |
3 dimg = da.from_array(img, chunks=chunkshape) | |
4 gray = dimg.map_blocks(lambda arr: arr.mean(axis=2), chunks=(256, 256)) | |
----> 5 grayimg = gray.compute() | |
/Users/venabled/anaconda/lib/python2.7/site-packages/dask/array/core.pyc in compute(self, **kwargs) | |
721 @wraps(compute) | |
722 def compute(self, **kwargs): |