mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 06:47:13 +08:00
a708e36225
* switch to CMake completely ... * cleanup * Run C tests, update installation instructions.
19 lines
523 B
Python
19 lines
523 B
Python
from __future__ import absolute_import
|
|
from __future__ import division
|
|
from __future__ import print_function
|
|
|
|
import numpy as np
|
|
import ray.experimental.array.remote as ra
|
|
import ray
|
|
|
|
from .core import *
|
|
|
|
@ray.remote
|
|
def normal(shape):
|
|
num_blocks = DistArray.compute_num_blocks(shape)
|
|
objectids = np.empty(num_blocks, dtype=object)
|
|
for index in np.ndindex(*num_blocks):
|
|
objectids[index] = ra.random.normal.remote(DistArray.compute_block_shape(index, shape))
|
|
result = DistArray(shape, objectids)
|
|
return result
|