Exemplo n.º 1
0
def test_shape(ary):
    return shape(ary)
Exemplo n.º 2
0
 def after(xs):
     return distribute(scalar_to_array(3, arr_t), shape(xs))
Exemplo n.º 3
0
 def up1(x2):
     return array_map(
         scalar_add, x2,
         distribute(scalar_to_array(1, typeof(x)), shape(x)))
Exemplo n.º 4
0
def test_prim_shape():
    v = np.empty((2, 3))
    assert shape(v) == (2, 3)