def _unify_type(self, t): if self._ret_type is None: self._ret_type = t else: r = unify_types_limited(self._ret_type, t) if not r: raise TypeError( "'then' expressions must have same type, found '{}' and '{}'" .format(self._ret_type, t))
def _unify_type(self, t): if self._ret_type is None: self._ret_type = t else: r = unify_types_limited(self._ret_type, t) if not r: raise TypeError("'then' expressions must have same type, found '{}' and '{}'".format( self._ret_type, t ))
def __init__(self, start, end, includes_start=True, includes_end=False, point_type=None): if point_type is None: from hail.expr.expressions import impute_type, unify_types_limited start_type = impute_type(start) end_type = impute_type(end) point_type = unify_types_limited(start_type, end_type) if point_type is None: raise TypeError("'start' and 'end' have incompatible types: '{}', '{}'.".format(start_type, end_type)) self._point_type = point_type self._start = start self._end = end self._includes_start = includes_start self._includes_end = includes_end
def __init__(self, start, end, includes_start=True, includes_end=False): from hail.expr.expressions import impute_type, unify_types_limited start_type = impute_type(start) end_type = impute_type(end) point_type = unify_types_limited(start_type, end_type) if point_type is None: raise TypeError("'start' and 'end' have incompatible types: '{}', '{}'.".format(start_type, end_type)) self._point_type = point_type self._start = start self._end = end self._includes_start = includes_start self._includes_end = includes_end self._jrep = scala_object(Env.hail().utils, 'Interval').apply( point_type._convert_to_j(start), point_type._convert_to_j(end), includes_start, includes_end)
def __init__(self, start, end, includes_start=True, includes_end=False): from hail.expr.expressions import impute_type, unify_types_limited start_type = impute_type(start) end_type = impute_type(end) point_type = unify_types_limited(start_type, end_type) if point_type is None: raise TypeError("'start' and 'end' have incompatible types: '{}', '{}'.".format(start_type, end_type)) self._point_type = point_type self._start = start self._end = end self._includes_start = includes_start self._includes_end = includes_end self._jrep = scala_object(Env.hail().utils, 'Interval').apply( point_type._convert_to_j(start), point_type._convert_to_j(end), includes_start, includes_end)
def __init__(self, start, end, includes_start=True, includes_end=False, point_type=None): if point_type is None: from hail.expr.expressions import impute_type, unify_types_limited start_type = impute_type(start) end_type = impute_type(end) point_type = unify_types_limited(start_type, end_type) if point_type is None: raise TypeError( "'start' and 'end' have incompatible types: '{}', '{}'.". format(start_type, end_type)) self._point_type = point_type self._start = start self._end = end self._includes_start = includes_start self._includes_end = includes_end