change directory structure, rename array libraries (#87)

This commit is contained in:
Philipp Moritz
2016-06-05 21:57:37 -07:00
parent 80774955c3
commit 9dfe7c625e
14 changed files with 125 additions and 125 deletions
@@ -0,0 +1,17 @@
from typing import List
import numpy as np
import halo.arrays.remote as ra
import halo
from core import *
@halo.remote([List[int]], [DistArray])
def normal(shape):
num_blocks = DistArray.compute_num_blocks(shape)
objrefs = np.empty(num_blocks, dtype=object)
for index in np.ndindex(*num_blocks):
objrefs[index] = ra.random.normal(DistArray.compute_block_shape(index, shape))
result = DistArray()
result.construct(shape, objrefs)
return result