def transform_Array(self, expr):
    array_t = expr.type
    assert isinstance(array_t, ArrayT), "Expected array but got %s" % array_t
    elt_t = array_t.elt_type
    assert isinstance(elt_t, ScalarT), "Expected array to have scalar elements but got %s" % elt_t

    elts = self.transform_expr_list(expr.elts)
    n = len(elts)

    ptr_t = ptr_type(elt_t)
    alloc = Alloc(elt_t, const_int(n), type = ptr_t)
    ptr_var = self.assign_name(alloc, "data")
    array = self.array_view(ptr_var, 
                            shape = const_tuple(n), 
                            strides = const_tuple(1), 
                            offset = zero_i64,
                            nelts = const_int(n))
    for (i, elt) in enumerate(elts):
      self.setidx(array, const_int(i), elt)
    return array
Array literal
dataset/ETHPy150Open iskandr/parakeet/parakeet/transforms/lower_array_operators.py/LowerArrayOperators.transform_Array