Skip to content

module numpy.ndarray

Source: stdlib/numpy/ndarray.codon


newaxis = None


flagsobj @tuple Class is named tuple (cannot write fields)

Properties

num @property Method is a class property

c_contiguous @property Method is a class property

f_contiguous @property Method is a class property

contiguous @property Method is a class property

owndata @property Method is a class property

writeable @property Method is a class property

aligned @property Method is a class property

writebackifcopy @property Method is a class property

Magic methods

__new__(f: int)

__new__(ccontig: bool, fcontig: bool)

__str__(self)


flatiter[A]

Fields

base: A

index: int

A: type

Properties

coords @property Method is a class property

Magic methods

__init__(self, base: A)

__iter__(self)

__getitem__(self, index: int)

__getitem__(self, s: slice)

__setitem__(self, index: int, value)

__setitem__(self, s: slice, value)

Methods

copy(self)


ndarray[dtype,ndim] @tuple Class is named tuple (cannot write fields)

Fields

dtype: type

ndim: Literal[int]

Properties

_contig @property Method is a class property

_is_contig @property Method is a class property

shape @property Method is a class property

strides @property Method is a class property

flags @property Method is a class property

data @property Method is a class property

size @property Method is a class property

itemsize @property Method is a class property

nbytes @property Method is a class property

T @property Method is a class property

flat @property Method is a class property

Magic methods

__new__(shape: Tuple[ndim, int], strides: Tuple[ndim, int], data: Ptr[dtype])

__new__(shape: Tuple[ndim, int], data: Ptr[dtype], fcontig: bool = False)

__len__(self)

__iter__(self)

__copy__(self)

__int__(self)

__float__(self)

__complex__(self)

__bool__(self)

Methods

item(self, *args)

transpose(self, *axes)

transpose(self, axes: List[int])

swapaxes(self, axis1: int, axis2: int)

reshape(self, *shape, order: str = "C")

tobytes(self, order: str = "C")

ravel(self, order: str = "C")

flatten(self, order: str = "C")

flat(self, value)

tolist(self)

astype(self, dtype: type, order: str = "K", copy: bool = True)

copy(self, order: str = "C")

map(self, fn, inplace: Literal[bool] = False)

fill(self, value)

view(self, dtype: type)

byteswap(self, inplace: bool = False)