def cast(self, expr, t):
    if expr.type == t:
      return expr
    assert isinstance(t, ScalarT), \
        "Can't cast %s : %s to non-scalar type %s" % (expr, expr.type, t)
    return self.assign_name(Cast(expr, type = t), "cast_%s" % t)
dataset/ETHPy150Open iskandr/parakeet/parakeet/builder/core_builder.py/CoreBuilder.cast/original