numpy.routines

Standard library module View source
function array
array(a, dtype: type = NoneType, copy: bool = True, order: str = "K", ndmin: Literal[int] = 0)
function asarray
asarray(a, dtype: type = NoneType, order: str = "K")
function asanyarray
asanyarray(a, dtype: type = NoneType, order: str = "K")
function asarray_chkfinite
asarray_chkfinite(a, dtype: type = NoneType, order: str = "K")
function empty
empty(shape, dtype: type = float, order: str = "C")
function empty_like
empty_like(prototype, dtype: type = NoneType, order: str = "K", shape = None)
function zeros
zeros(shape, dtype: type = float, order: str = "C")
function zeros_like
zeros_like(prototype, dtype: type = NoneType, order: str = "K")
function ones
ones(shape, dtype: type = float, order: str = "C")
function ones_like
ones_like(prototype, dtype: type = NoneType, order: str = "K")
function identity
identity(n: int, dtype: type = float)
function eye
eye(N: int, M: Optional[int] = None, k: int = 0, dtype: type = float, order: str = "C")
function diag
diag(v, k: int = 0)
function diagflat
diagflat(v, k: int = 0)
function tri
tri(N: int, M: Optional[int] = None, k: int = 0, dtype: type = float)
function triu
triu(x, k: int = 0)
function tril
tril(x, k: int = 0)
function vander
vander(x, N: Optional[int] = None, increasing: bool = False)
function arange
arange(start: float, stop: float, step: float, dtype: type = float)
@overload
arange(stop: float, step: float, dtype: type = float)
@overload
arange(start: float, stop: float, dtype: type = float)
@overload
arange(stop: float, dtype: type = float)
@overload
arange(start: int, stop: int, step: int, dtype: type = int)
@overload
arange(stop: int, step: int, dtype: type = int)
@overload
arange(start: int, stop: int, dtype: type = int)
@overload
arange(stop: int, dtype: type = int)
@overload
arange(start: datetime64, stop, step = None, dtype: type = NoneType)
@overload
arange(start: timedelta64, stop, step, dtype: type = NoneType)
@overload
arange(start: timedelta64, stop, dtype: type = NoneType)
@overload
arange(stop: timedelta64, dtype: type = NoneType)
@overload
arange(start: str, stop, step = None, dtype: type = datetime64[("D", 1)])
function linspace
linspace(start: float, stop: float, num: int = 50, endpoint: bool = True, retstep: Literal[bool] = False, dtype: type = float)
linspace(start: float, stop: float, num: int = 50, endpoint: bool = True, retstep: Literal[bool] = False, dtype: type = float)
function logspace
logspace(start: float, stop: float, num: int = 50, endpoint: bool = True, base: float = 10.0, retstep: Literal[bool] = False, dtype: type = float)
function geomspace
geomspace(start: float, stop: float, num: int = 50, endpoint: bool = True, dtype: type = float)
function fromfunction
fromfunction(function, shape, dtype: type = float, **kwargs)
function fromiter
fromiter(iterable, dtype: type, count: int = -1)
function frombuffer
frombuffer(buffer: str, dtype: type = float, count: int = -1, offset: int = 0)
function broadcast_shapes
broadcast_shapes(*args)
function broadcast_to
broadcast_to(x, shape)
function broadcast_arrays
broadcast_arrays(*args)
function meshgrid
meshgrid(*xi, copy: bool = True, sparse: Literal[bool] = False, indexing: Literal[str] = "xy")
function broadcast
broadcast(*args)
function full
full(shape, fill_value, dtype: type = NoneType, order: str = "C")
function full_like
full_like(prototype, fill_value, dtype: type = NoneType, order: str = "K")
function copyto
copyto(dst: ndarray, src, where = True)
function ndim
ndim(a)
function size
size(a, axis: Optional[int] = None)
function shape
shape(a)
function reshape
reshape(a, newshape, order: str = "C")
function transpose
transpose(a, axes = None)
function ravel
ravel(a, order: str = "C")
function ascontiguousarray
ascontiguousarray(a, dtype: type = NoneType)
function asfortranarray
asfortranarray(a, dtype: type = NoneType)
function asfarray
asfarray(a, dtype: type = float)
function moveaxis
moveaxis(a, source, destination)
function swapaxes
swapaxes(a, axis1: int, axis2: int)
function atleast_1d
atleast_1d(*arys)
function atleast_2d
atleast_2d(*arys)
function atleast_3d
atleast_3d(*arys)
function require
require(a, dtype: type = NoneType, requirements = None)
function concatenate
concatenate(arrays, axis = 0, out = None, dtype: type = NoneType)
function expand_dims
expand_dims(a, axis)
function stack
stack(arrays, axis: int = 0, out = None, dtype: type = NoneType)
function vstack
vstack(tup, dtype: type = NoneType)
function hstack
hstack(tup, dtype: type = NoneType)
function dstack
dstack(tup)
variable row_stack
row_stack = vstack
function column_stack
column_stack(tup)
function repeat
repeat(a, repeats, axis = None)
function delete
delete(arr, obj, axis = None)
function append
append(arr, values, axis = None)
function insert
insert(arr, obj, values, axis = None)
function array_split
array_split(ary, indices_or_sections, axis: int = 0)
function split
split(ary, indices_or_sections, axis: int = 0)
function vsplit
vsplit(ary, indices_or_sections)
function hsplit
hsplit(ary, indices_or_sections)
function dsplit
dsplit(ary, indices_or_sections)
function trim_zeros
trim_zeros(filt, trim: str = "fb")
function flip
flip(m, axis = None)
function fliplr
fliplr(m)
function flipud
flipud(m)
function rot90
rot90(m, k: int = 1, axes: Tuple[int, int] = (0, 1))
function resize
resize(a, new_shape)
function tile
tile(A, reps)
function roll
roll(a, shift, axis = None)
function block
block(arrays)
function isclose
isclose(a, b, rtol: float = 1e-05, atol: float = 1e-08, equal_nan: bool = False)
function allclose
allclose(a, b, rtol: float = 1e-05, atol: float = 1e-08, equal_nan: bool = False)
function array_equal
array_equal(a1, a2, equal_nan: bool = False)
function array_equiv
array_equiv(a1, a2)
function squeeze
squeeze(a, axis = None)
function pad
pad(array, pad_width, mode = "constant", **kwargs)
function nonzero
nonzero(a)
function flatnonzero
flatnonzero(a)
function argwhere
argwhere(a)
function where
where(condition, x, y)
@overload
where(condition)
function extract
extract(condition, arr)
function searchsorted
searchsorted(a, v, side: str = "left", sorter = None)
function take
take(a, indices, axis = None, out = None, mode: str = "raise")
function indices
indices(dimensions, dtype: type = int, sparse: Literal[bool] = False)
function ix_
ix_(*args)
function ravel_multi_index
ravel_multi_index(multi_index, dims, mode: str = "raise", order: str = "C")
function unravel_index
unravel_index(indices, shape, order: str = "C")
function diag_indices
diag_indices(n: int, ndim: int)
@overload
diag_indices(n: int, ndim: Literal[int] = 2)
function diag_indices_from
diag_indices_from(arr)
function mask_indices
mask_indices(n: int, mask_func, k = 0)
function tril_indices
tril_indices(n: int, k: int = 0, m: Optional[int] = None)
function tril_indices_from
tril_indices_from(arr, k: int = 0)
function triu_indices
triu_indices(n: int, k: int = 0, m: Optional[int] = None)
function triu_indices_from
triu_indices_from(arr, k: int = 0)
function take_along_axis
take_along_axis(arr, indices, axis)
function choose
choose(a, choices, out = None, mode: str = "raise")
function compress
compress(condition, a, axis = None, out = None)
function diagonal
diagonal(a, offset: int = 0, axis1: int = 0, axis2: int = 1)
function select
select(condlist: List, choicelist: List, default = 0)
function place
place(arr: ndarray, mask, vals)
function put
put(a: ndarray, ind, v, mode: str = "raise")
function put_along_axis
put_along_axis(arr: ndarray, indices, values, axis)
function putmask
putmask(a: ndarray, mask, values)
function fill_diagonal
fill_diagonal(a: ndarray, val, wrap: bool = False)
function round
round(a, decimals: int = 0, out = None)
variable around
around = round
function clip
clip(a, a_min, a_max, out = None)
function ndenumerate
ndenumerate(arr)
function ndindex
ndindex(*shape)
function iterable
iterable(y)
function packbits
packbits(a, axis = None, bitorder: str = "big")
function unpackbits
unpackbits(a, axis = None, count = None, bitorder: str = "big")
function isposinf
isposinf(x, out = None)
function isneginf
isneginf(x, out = None)
function iscomplex
iscomplex(x)
function iscomplexobj
iscomplexobj(x)
function isreal
isreal(x)
function isrealobj
isrealobj(x)
function isfortran
isfortran(a: ndarray)
function isscalar
isscalar(element)
function real
real(val)
function imag
imag(val)
class ndarray
@extend
class ndarray[dtype, ndim]
Properties 2
real
@property
real(self)
imag
@property
imag(self)
Methods 16
take
take(self, indices, axis = None, out = None, mode: str = "raise")
squeeze
squeeze(self, axis = None)
nonzero
nonzero(self)
searchsorted
searchsorted(self, v, side: str = "left", sorter = None)
repeat
repeat(self, repeats, axis = None)
compress
compress(self, condition, axis = None, out = None)
choose
choose(self, choices, out = None, mode: str = "raise")
diagonal
diagonal(self, offset: int = 0, axis1: int = 0, axis2: int = 1)
put
put(self, ind, v, mode: str = "raise")
round
round(self, decimals: int = 0, out = None)
clip
clip(self, min = None, max = None, out = None)
real
real(self, val)
imag
imag(self, val)
conj
conj(self)
conjugate
conjugate(self)
flat
flat(self, val)
function busday_offset
busday_offset(dates, offsets, roll: str = "raise", weekmask = None, holidays = None, busdaycal = None, out = None)
function busday_count
busday_count(begindates, enddates, weekmask = None, holidays = None, busdaycal = None, out = None)
function is_busday
is_busday(dates, weekmask = None, holidays = None, busdaycal = None, out = None)
function datetime_data
datetime_data(dtype: type)
function datetime_as_string
datetime_as_string(arr, unit = None, timezone: str = "naive")