numpy.generic¶
-
class
numpy.generic[source]¶ Base class for numpy scalar types.
Class from which most (all?) numpy scalar types are derived. For consistency, exposes the same API as
ndarray, despite many consequent attributes being either “get-only,” or completely irrelevant. This is the class from which it is strongly suggested users should derive custom scalar types.- Attributes
TScalar attribute identical to the corresponding array attribute.
baseScalar attribute identical to the corresponding array attribute.
dataPointer to start of data.
dtypeGet array data-descriptor.
flagsThe integer value of flags.
flatA 1-D view of the scalar.
imagThe imaginary part of the scalar.
itemsizeThe length of one element in bytes.
nbytesThe length of the scalar in bytes.
ndimThe number of array dimensions.
realThe real part of the scalar.
shapeTuple of array dimensions.
sizeThe number of elements in the gentype.
stridesTuple of bytes steps in each dimension.
Methods
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
newbyteorder([new_order])Return a new
dtypewith a different byte order.Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
Scalar method identical to the corresponding array attribute.
conj
tobytes