python中ndim是什么_numpy中ndarray的“ ndim,形状,大小,.. etc”的标识是什么

`Attributes----------T:ndarrayTransposeof the array.data:bufferThearray's elements, in memory.

dtype : dtype object

Describes the format of the elements in the array.

flags : dict

Dictionary containing information related to memory use, e.g.,

'C_CONTIGUOUS', 'OWNDATA', 'WRITEABLE', etc.

flat : numpy.flatiter object

Flattened version of the array as an iterator. The iterator

allows assignments, e.g., ``x.flat = 3`` (See `ndarray.flat` for

assignment examples; TODO).

imag : ndarray

Imaginary part of the array.

real : ndarray

Real part of the array.

size : int

Number of elements in the array.

itemsize : int

The memory use of each array element in bytes.

nbytes : int

The total number of bytes required to store the array data,

i.e., ``itemsize * size``.

ndim : int

The array's number of dimensions.shape:tuple of intsShapeof the array.strides:tuple of intsThestep-size required to movefromone element to the nextinmemory.Forexample,a contiguous``(3,4)``array of type``int16``inC-order has strides``(8,2)``.Thisimplies that

to movefromelement to elementinmemory requires jumps of2bytes.Tomovefromrow-to-row,one needs to jump8bytes at a time(``2*4``).ctypes:ctypes objectClasscontaining properties of the array neededforinteractionwithctypes.base:ndarrayIfthe arrayisa view into another array,that arrayisits`base`(unless that arrayisalso a view).The`base`arrayiswhere the

array dataisactually stored.

你可能感兴趣的:(python中ndim是什么)