Skip to content

module numpy.reductions

Source: stdlib/numpy/reductions.codon


newaxis = None


SumRedux[T]

Fields

total: T

T: type

Magic methods

__init__(self, **kwargs)

Methods

create(T: type, **kwargs)

accept(self, item, index: int)

result(self, count: int)

empty(**kwargs)

done(self)

gradual_init(self, **kwargs)

gradual_accept(self, curr, item, index: int, **kwargs)

loop(self, a: Ptr[S], n: int, stride: int, partial: Literal[bool], S: type)


NanSumRedux[T]

Fields

total: T

T: type

Magic methods

__init__(self, **kwargs)

Methods

create(T: type, **kwargs)

accept(self, item, index: int)

result(self, count: int)

empty(**kwargs)

done(self)

gradual_init(self, **kwargs)

gradual_accept(self, curr, item, index: int, **kwargs)

loop(self, a: Ptr[S], n: int, stride: int, partial: Literal[bool], S: type)


ProdRedux[T]

Fields

total: T

T: type

Magic methods

__init__(self, **kwargs)

Methods

create(T: type, **kwargs)

accept(self, item, index: int)

result(self, count: int)

empty(**kwargs)

done(self)

gradual_init(self, **kwargs)

gradual_accept(self, curr, item, index: int, **kwargs)

loop(self, a: Ptr[S], n: int, stride: int, partial: Literal[bool], S: type)


NanProdRedux[T]

Fields

total: T

T: type

Magic methods

__init__(self, **kwargs)

Methods

create(T: type, **kwargs)

accept(self, item, index: int)

result(self, count: int)

empty(**kwargs)

done(self)

gradual_init(self, **kwargs)

gradual_accept(self, curr, item, index: int, **kwargs)

loop(self, a: Ptr[S], n: int, stride: int, partial: Literal[bool], S: type)


MeanRedux[T]

Fields

total: T

T: type

Magic methods

__init__(self, **kwargs)

Methods

create(T: type, **kwargs)

accept(self, item: T, index: int)

result(self, count: int)

empty(**kwargs)

done(self)

gradual_init(self, **kwargs)

gradual_accept(self, curr, item, index: int, **kwargs)

gradual_result(self, curr, count: int)

loop(self, a: Ptr[S], n: int, stride: int, partial: Literal[bool], S: type)


NanMeanRedux[T]

Fields

total: T

T: type

nan_count: int

Magic methods

__init__(self, **kwargs)

Methods

create(T: type, **kwargs)

accept(self, item: T, index: int)

result(self, count: int)

empty(**kwargs)

done(self)

loop(self, a: Ptr[S], n: int, stride: int, partial: Literal[bool], S: type)


MinRedux[T]

Fields

m: Optional[T]

T: type

Magic methods

__init__(self, **kwargs)

Methods

create(T: type, **kwargs)

accept(self, item: T, index: int)

result(self, count: int)

empty(**kwargs)

done(self)

gradual_init(self, **kwargs)

gradual_accept(self, curr, item, index: int, **kwargs)

loop(self, a: Ptr[S], n: int, stride: int, partial: Literal[bool], S: type)


MaxRedux[T]

Fields

m: Optional[T]

T: type

Magic methods

__init__(self, **kwargs)

Methods

create(T: type, **kwargs)

accept(self, item: T, index: int)

result(self, count: int)

empty(**kwargs)

done(self)

gradual_init(self, **kwargs)

gradual_accept(self, curr, item, index: int, **kwargs)

loop(self, a: Ptr[S], n: int, stride: int, partial: Literal[bool], S: type)


PTPRedux[T]

Fields

hi: Optional[T]

lo: Optional[T]

T: type

Magic methods

__init__(self, **kwargs)

Methods

create(T: type, **kwargs)

accept(self, item: T, index: int)

result(self, count: int)

empty(**kwargs)

done(self)

loop(self, a: Ptr[S], n: int, stride: int, partial: Literal[bool], S: type)


ArgMinRedux[T]

Fields

m: Optional[T]

i: int

T: type

Magic methods

__init__(self, **kwargs)

Methods

create(T: type, **kwargs)

accept(self, item: T, index: int)

result(self, count: int)

empty(**kwargs)

done(self)


ArgMaxRedux[T]

Fields

m: Optional[T]

i: int

T: type

Magic methods

__init__(self, **kwargs)

Methods

create(T: type, **kwargs)

accept(self, item: T, index: int)

result(self, count: int)

empty(**kwargs)

done(self)


AnyRedux[T]

Fields

a: bool

T: type

Magic methods

__init__(self, **kwargs)

Methods

create(T: type, **kwargs)

accept(self, item: T, index: int)

result(self, count: int)

empty(**kwargs)

done(self)


AllRedux[T]

Fields

a: bool

T: type

Magic methods

__init__(self, **kwargs)

Methods

create(T: type, **kwargs)

accept(self, item: T, index: int)

result(self, count: int)

empty(**kwargs)

done(self)


NonZeroRedux[T]

Fields

nonzero: int

T: type

Magic methods

__init__(self, **kwargs)

Methods

create(T: type, **kwargs)

accept(self, item: T, index: int)

result(self, count: int)

empty(**kwargs)

done(self)

gradual_init(self, **kwargs)

gradual_accept(self, curr, item, index: int, **kwargs)


sum(a, axis = None, dtype: type = NoneType, out = None, keepdims: Literal[bool] = False, initial = 0, where = util._NoValue())


nansum(a, axis = None, dtype: type = NoneType, out = None, keepdims: Literal[bool] = False, initial = 0, where = util._NoValue())


prod(a, axis = None, dtype: type = NoneType, out = None, keepdims: Literal[bool] = False, initial = 1, where = util._NoValue())


nanprod(a, axis = None, dtype: type = NoneType, out = None, keepdims: Literal[bool] = False, initial = 1, where = util._NoValue())


mean(a, axis = None, dtype: type = NoneType, out = None, keepdims: Literal[bool] = False, where = util._NoValue())


nanmean(a, axis = None, dtype: type = NoneType, out = None, keepdims: Literal[bool] = False, where = util._NoValue())


var(a, axis = None, dtype: type = NoneType, out = None, ddof: int = 0, keepdims: Literal[bool] = False, where = util._NoValue())


nanvar(a, axis = None, dtype: type = NoneType, out = None, ddof: int = 0, keepdims: Literal[bool] = False, where = util._NoValue())


std(a, axis = None, dtype: type = NoneType, out = None, ddof: int = 0, keepdims: Literal[bool] = False, where = util._NoValue())


nanstd(a, axis = None, dtype: type = NoneType, out = None, ddof: int = 0, keepdims: Literal[bool] = False, where = util._NoValue())


min(a, axis = None, dtype: type = NoneType, out = None, ddof: int = 0, keepdims: Literal[bool] = False, initial = util._NoValue(), where = util._NoValue())


max(a, axis = None, dtype: type = NoneType, out = None, ddof: int = 0, keepdims: Literal[bool] = False, initial = util._NoValue(), where = util._NoValue())


ptp(a, axis = None, out = None, keepdims: Literal[bool] = False)


argmin(a, axis = None, out = None, keepdims: Literal[bool] = False)


argmax(a, axis = None, out = None, keepdims: Literal[bool] = False)


any(a, axis = None, out = None, keepdims: Literal[bool] = False, where = util._NoValue())


all(a, axis = None, out = None, keepdims: Literal[bool] = False, where = util._NoValue())


count_nonzero(a, axis = None, keepdims: Literal[bool] = False)


median(a, axis = None, out = None, overwrite_input: bool = False, keepdims: Literal[bool] = False)


nanmedian(a, axis = None, out = None, overwrite_input: bool = False, keepdims: Literal[bool] = False)


quantile(a, q, axis = None, out = None, overwrite_input: bool = False, method: str = "linear", keepdims: Literal[bool] = False, interpolation = None)


nanquantile(a, q, axis = None, out = None, overwrite_input: bool = False, method: str = "linear", keepdims: Literal[bool] = False, interpolation = None)


percentile(a, q, axis = None, out = None, overwrite_input: bool = False, method: str = "linear", keepdims: Literal[bool] = False, interpolation = None)


nanpercentile(a, q, axis = None, out = None, overwrite_input: bool = False, method: str = "linear", keepdims: Literal[bool] = False, interpolation = None)


ndarray[dtype,ndim] @extend Class is extended to add given methods

Methods

sum(self, axis = None, dtype: type = NoneType, out = None, keepdims: Literal[bool] = False, initial = 0, where = util._NoValue())

prod(self, axis = None, dtype: type = NoneType, out = None, keepdims: Literal[bool] = False, initial = 1, where = util._NoValue())

mean(self, axis = None, dtype: type = NoneType, out = None, keepdims: Literal[bool] = False, where = util._NoValue())

nanmean(self, axis = None, dtype: type = NoneType, out = None, keepdims: Literal[bool] = False, where = util._NoValue())

var(self, axis = None, dtype: type = NoneType, out = None, ddof: int = 0, keepdims: Literal[bool] = False, where = util._NoValue())

nanvar(self, axis = None, dtype: type = NoneType, out = None, ddof: int = 0, keepdims: Literal[bool] = False, where = util._NoValue())

std(self, axis = None, dtype: type = NoneType, out = None, ddof: int = 0, keepdims: Literal[bool] = False, where = util._NoValue())

nanstd(self, axis = None, dtype: type = NoneType, out = None, ddof: int = 0, keepdims: Literal[bool] = False, where = util._NoValue())

min(self, axis = None, dtype: type = NoneType, out = None, ddof: int = 0, keepdims: Literal[bool] = False, initial = util._NoValue(), where = util._NoValue())

ptp(self, axis = None, out = None, keepdims: Literal[bool] = False)

max(self, axis = None, dtype: type = NoneType, out = None, ddof: int = 0, keepdims: Literal[bool] = False, initial = util._NoValue(), where = util._NoValue())

argmin(self, axis = None, out = None, keepdims: Literal[bool] = False)

argmax(self, axis = None, out = None, keepdims: Literal[bool] = False)

any(self, axis = None, out = None, keepdims: Literal[bool] = False, where = util._NoValue())

all(self, axis = None, out = None, keepdims: Literal[bool] = False, where = util._NoValue())