(context, builder, ty, pyval)
return series._getvalue()
Create a constant Series.

    See @unbox(SeriesType)
Create a constant Series.
Create a constant Series .
def constant_Series(context, builder, ty, pyval):
    """
    Create a constant Series.

    See @unbox(SeriesType)
    """
    series = cgutils.create_struct_proxy(ty)(context, builder)
    series.data = _constant_Series_data(context, builder, ty, pyval)

    # TODO: index and name (this only handles PositionalIndexType(False)
    # and repeats unboxing, need to refactor to support all indexes)
    native_range_index = cgutils.create_struct_proxy(RangeIndexDataType)(context, builder)
    native_range_index.start = context.get_constant(types.int64, pyval.index.start)
    native_range_index.stop = context.get_constant(types.int64, pyval.index.stop)
    native_range_index.step = context.get_constant(types.int64, pyval.index.step)

    range_index = cgutils.create_struct_proxy(ty.index.data)(context, builder)
    range_index.data = native_range_index._getvalue()

    positional_index = cgutils.create_struct_proxy(PositionalIndexType(False))(context, builder)
    positional_index.data = range_index._getvalue()

    series.index = positional_index._getvalue()
    return series._getvalue()
def constant_Series ( context , builder , ty , pyval ) : series = cgutils . create_struct_proxy ( ty ) ( context , builder ) series . data = _constant_Series_data ( context , builder , ty , pyval ) # TODO: index and name (this only handles PositionalIndexType(False) # and repeats unboxing, need to refactor to support all indexes) native_range_index = cgutils . create_struct_proxy ( RangeIndexDataType ) ( context , builder ) native_range_index . start = context . get_constant ( types . int64 , pyval . index . start ) native_range_index . stop = context . get_constant ( types . int64 , pyval . index . stop ) native_range_index . step = context . get_constant ( types . int64 , pyval . index . step ) range_index = cgutils . create_struct_proxy ( ty . index . data ) ( context , builder ) range_index . data = native_range_index . _getvalue ( ) positional_index = cgutils . create_struct_proxy ( PositionalIndexType ( False ) ) ( context , builder ) positional_index . data = range_index . _getvalue ( ) series . index = positional_index . _getvalue ( ) return series . _getvalue ( )