numpy.record#

class numpy.record(length_or_data, /, dtype=None)[source]#

一种数据类型标量,允许将字段访问作为属性查找。

属性:
T

ndarray.T 相同的标量属性。

base

基对象

data

指向数据的起始位置。

device
dtype

dtype 对象

flags

标志的整数值

flat

标量的1-D视图。

imag

标量的虚部。

itemsize

一个元素的长度(以字节为单位)。

nbytes
ndim

数组的维度数。

real

标量的实部。

shape

数组的维度元组。

size

gentype 中的元素数量。

strides

每个维度中的字节步长元组。

方法

all(/[, axis, out, keepdims, where])

ndarray.all 相同的标量方法。

any(/[, axis, out, keepdims, where])

ndarray.any 相同的标量方法。

argmax(/[, axis, out, keepdims])

标量方法与 ndarray.argmax 相同。

argmin(/[, axis, out, keepdims])

ndarray.argmin 相同的标量方法。

argsort(/[, axis, kind, order, stable])

ndarray.argsort 相同的标量方法。

astype(/, dtype[, order, casting, subok, copy])

标量方法与 ndarray.astype 相同。

byteswap(/[, inplace])

ndarray.byteswap 相同的标量方法。

choose(/, choices[, out, mode])

ndarray.choose 相同的标量方法。

clip(/[, min, max, out])

ndarray.clip相同的标量方法。

compress(/, condition[, axis, out])

ndarray.compress 相同的标量方法。

conj(/)

标量方法,与 ndarray.conj 相同。

conjugate(/)

标量方法与 ndarray.conjugate 相同。

copy(/[, order])

ndarray.copy 相同的标量方法。

cumprod(/[, axis, dtype, out])

ndarray.cumprod相同的标量方法。

cumsum(/[, axis, dtype, out])

ndarray.cumsum 相同的标量方法。

diagonal(/[, offset, axis1, axis2])

标量方法,与 ndarray.diagonal 相同。

dump(/, file)

ndarray.dump 相同的标量方法。

dumps(/)

ndarray.dumps 相同的标量方法。

fill(/, value)

标量方法,与 ndarray.fill 相同。

flatten(/[, order])

ndarray.flatten 相同的标量方法。

getfield

标量方法,与 ndarray.getfield 相同。

item(*args)

标量方法,与 ndarray.item 相同。

max(/[, axis, out])

标量方法,与 ndarray.max 相同。

mean(/[, axis, dtype, out])

标量方法,与 ndarray.mean 相同。

min(/[, axis, out])

ndarray.min 相同的标量方法。

nonzero(/)

标量方法与 ndarray.nonzero 相同。

pprint()

漂亮地打印所有字段。

prod(/[, axis, dtype, out])

ndarray.prod 相同的标量方法。

put(indices, values, /[, mode])

标量方法,与 ndarray.put 相同。

ravel(/[, order])

ndarray.ravel 相同的标量方法。

repeat(repeats, /[, axis])

ndarray.repeat相同的标量方法。

reshape(*shape[, order, copy])

标量方法与 ndarray.reshape 相同。

resize(*new_shape[, refcheck])

标量方法与 ndarray.resize 相同。

round(/[, decimals, out])

ndarray.round 相同的标量方法。

searchsorted(v, /[, side, sorter])

ndarray.searchsorted相同的标量方法。

setfield

标量方法,与 ndarray.setfield 相同。

setflags(*[, write, align, uic])

标量方法,与 ndarray.setflags 相同。

sort(/[, axis, kind, order, stable])

ndarray.sort相同的标量方法。

squeeze(/[, axis])

标量方法,与 ndarray.squeeze 相同。

std(/[, axis, dtype, out, ddof])

标量方法,与 ndarray.std 相同。

sum(/[, axis, dtype, out])

ndarray.sum 相同的标量方法。

swapaxes(axis1, axis2, /)

ndarray.swapaxes相同的标量方法。

take(indices, /[, axis, out, mode])

ndarray.take 相同的标量方法。

to_device(device, *[, stream])

标量方法与 ndarray.to_device 相同。

tobytes(/[, order])

ndarray.tobytes 相同的标量方法。

tofile(fid, /[, sep, format])

标量方法与 ndarray.tofile 相同。

tolist(/)

ndarray.tolist 相同的标量方法。

trace(/[, offset, axis1, axis2, dtype, out])

标量方法,与 ndarray.trace 相同。

transpose(*axes)

标量方法,与 ndarray.transpose 相同。

var(/[, axis, dtype, out, ddof])

ndarray.var相同的标量方法。

view(*args, **kwargs)

标量方法与 ndarray.view 相同。