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