mlx.core.array#
- class array#
一个 N 维数组对象。
方法
__init__
(self, val[, dtype])abs
(self, *[, stream])参见
abs()
。all
(self[, axis, keepdims, stream])参见
all()
。any
(self[, axis, keepdims, stream])参见
any()
。argmax
(self[, axis, keepdims, stream])参见
argmax()
。argmin
(self[, axis, keepdims, stream])参见
argmin()
。astype
(self, dtype[, stream])将数组转换为指定类型。
conj
(self, *[, stream])参见
conj()
。cos
(self, *[, stream])参见
cos()
。cummax
(self[, axis, reverse, inclusive, stream])参见
cummax()
。cummin
(self[, axis, reverse, inclusive, stream])参见
cummin()
。cumprod
(self[, axis, reverse, inclusive, stream])参见
cumprod()
。cumsum
(self[, axis, reverse, inclusive, stream])参见
cumsum()
。diag
(self[, k, stream])提取对角线或构造对角矩阵。
diagonal
(self[, offset, axis1, axis2, stream])参见
diagonal()
。exp
(self, *[, stream])参见
exp()
。flatten
(self[, start_axis, end_axis, stream])参见
flatten()
。item
(self)访问标量数组的值。
log
(self, *[, stream])参见
log()
。log10
(self, *[, stream])参见
log10()
。log1p
(self, *[, stream])参见
log1p()
。log2
(self, *[, stream])参见
log2()
。logcumsumexp
(self[, axis, reverse, ...])参见
logcumsumexp()
。logsumexp
(self[, axis, keepdims, stream])参见
logsumexp()
。max
(self[, axis, keepdims, stream])参见
max()
。mean
(self[, axis, keepdims, stream])参见
mean()
。min
(self[, axis, keepdims, stream])参见
min()
。moveaxis
(self, source, destination, *[, stream])参见
moveaxis()
。prod
(self[, axis, keepdims, stream])参见
prod()
。reciprocal
(self, *[, stream])参见
reciprocal()
。reshape
(self, *shape[, stream])round
(self[, decimals, stream])参见
round()
。rsqrt
(self, *[, stream])参见
rsqrt()
。sin
(self, *[, stream])参见
sin()
。split
(self, indices_or_sections[, axis, stream])参见
split()
。sqrt
(self, *[, stream])参见
sqrt()
。square
(self, *[, stream])参见
square()
。squeeze
(self[, axis, stream])参见
squeeze()
。std
(self[, axis, keepdims, ddof, stream])参见
std()
。sum
(self[, axis, keepdims, stream])参见
sum()
。swapaxes
(self, axis1, axis2, *[, stream])参见
swapaxes()
。tolist
(self)将数组转换为 Python
list
。transpose
(self, *axes[, stream])相当于
transpose()
,但轴可以作为 tuple 或单独的参数传递。var
(self[, axis, keepdims, ddof, stream])参见
var()
。view
(self, dtype, *[, stream])参见
view()
。属性