Skip to main content

numpy.ndarray

Standard library Module View source
variable newaxis
newaxis = None
class flagsobj
@tuple
class flagsobj
Constructors 2
__new__
__new__(f: int)
__new__
__new__(ccontig: bool, fcontig: bool)
Properties 8
num
@property
num(self: Self)
c_contiguous
@property
c_contiguous(self: Self)
f_contiguous
@property
f_contiguous(self: Self)
contiguous
@property
contiguous(self: Self)
owndata
@property
owndata(self: Self)
writeable
@property
writeable(self: Self)
aligned
@property
aligned(self: Self)
writebackifcopy
@property
writebackifcopy(self: Self)
Special methods 1
__str__
__str__(self: Self)
class flatiter
class flatiter[A]
Fields 3
base A
index int
A type
Constructors 1
__init__
__init__(self: Self, base: A)
Properties 1
coords
@property
coords(self: Self)
Methods 1
copy
copy(self: Self)
Special methods 3
__iter__
__iter__(self: Self)
__getitem__
__getitem__(self: Self, index: int)
__getitem__(self: Self, s: slice)
__setitem__
__setitem__(self: Self, index: int, value)
__setitem__(self: Self, s: slice, value)
class ndarray
@tuple
class ndarray[dtype, ndim]
Fields 2
dtype type
ndim Literal[int]
Constructors 2
__new__
__new__(shape: Tuple[(ndim, int)], strides: Tuple[(ndim, int)], data: Ptr[dtype]) -> ndarray[(dtype, ndim)]
__new__
__new__(shape: Tuple[(ndim, int)], data: Ptr[dtype], fcontig: bool = False)
Properties 9
shape
@property
shape(self: Self)
strides
@property
strides(self: Self)
flags
@property
flags(self: Self)
data
@property
data(self: Self)
size
@property
size(self: Self)
itemsize
@property
itemsize(self: Self)
nbytes
@property
nbytes(self: Self)
T
@property
T(self: Self)
flat
@property
flat(self: Self)
Methods 15
item
item(self: Self, *args)
transpose
transpose(self: Self, *axes)
transpose(self: Self, axes: List[int])
swapaxes
swapaxes(self: Self, axis1: int, axis2: int)
reshape
reshape(self: Self, *shape, order: str = "C")
tobytes
tobytes(self: Self, order: str = "C")
ravel
ravel(self: Self, order: str = "C")
flatten
flatten(self: Self, order: str = "C")
flat
flat(self: Self, value)
tolist
tolist(self: Self)
astype
astype[dtype: type](self: Self, order: str = "K", copy: bool = True)
copy
copy(self: Self, order: str = "C")
map
map[inplace: Literal[bool] = False](self: Self, fn)
fill
fill(self: Self, value)
view
view[dtype: type](self: Self)
byteswap
byteswap(self: Self, inplace: bool = False)
Special methods 7
__len__
__len__(self: Self)
__iter__
__iter__(self: Self)
__copy__
__copy__(self: Self)
__int__
__int__(self: Self)
__float__
__float__(self: Self)
__complex__
__complex__(self: Self)
__bool__
__bool__(self: Self)