tf.experimental.numpy.float32

Single-precision floating-point number type, compatible with C float.

Inherits From: inexact

:Character code: 'f' :Canonical name: numpy.single :Alias on this platform (Linux x86_64): numpy.float32: 32-bit-precision floating-point number type: sign bit, 8 bits exponent, 23 bits mantissa.

T Scalar attribute identical to ndarray.T.
base Scalar attribute identical to ndarray.base.
data Pointer to start of data.
device

dtype Get array data-descriptor.
flags The integer value of flags.
flat A 1-D view of the scalar.
imag The imaginary part of the scalar.
itemsize The length of one element in bytes.
nbytes

ndim The number of array dimensions.
real The real part of the scalar.
shape Tuple of array dimensions.
size The number of elements in the gentype.
strides Tuple of bytes steps in each dimension.

Methods

all

Scalar method identical to ndarray.all.

any

Scalar method identical to ndarray.any.

argmax

Scalar method identical to ndarray.argmax.

argmin

Scalar method identical to ndarray.argmin.

argsort

Scalar method identical to ndarray.argsort.

as_integer_ratio

single.as_integer_ratio() -> (int, int)

Return a pair of integers, whose ratio is exactly equal to the original floating point number, and with a positive denominator. Raise OverflowError on infinities and a ValueError on NaNs.

np.single(10.0).as_integer_ratio()
(10, 1)
np.single(0.0).as_integer_ratio()
(0, 1)
np.single(-.25).as_integer_ratio()
(-1, 4)

astype

Scalar method identical to ndarray.astype.

byteswap

Scalar method identical to ndarray.byteswap.

choose

Scalar method identical to ndarray.choose.

clip

Scalar method identical to ndarray.clip.

compress

Scalar method identical to ndarray.compress.

conj

Scalar method identical to ndarray.conj.

conjugate

Scalar method identical to ndarray.conjugate.

copy

Scalar method identical to ndarray.copy.

cumprod

Scalar method identical to ndarray.cumprod.

cumsum

Scalar method identical to ndarray.cumsum.

diagonal

Scalar method identical to ndarray.diagonal.

dump

Scalar method identical to ndarray.dump.

dumps

Scalar method identical to ndarray.dumps.

fill

Scalar method identical to ndarray.fill.

flatten

Scalar method identical to ndarray.flatten.

getfield

Scalar method identical to ndarray.getfield.

is_integer

single.is_integer() -> bool

Return True if the floating point number is finite with integral value, and False otherwise.

.. versionadded:: 1.22

Examples

>>> np.single(-2.0).is_integer()
True
>>> np.single(3.2).is_integer()
False

item

Scalar method identical to ndarray.item.

max

Scalar method identical to ndarray.max.

mean

Scalar method identical to ndarray.mean.

min

Scalar method identical to ndarray.min.

nonzero

Scalar method identical to ndarray.nonzero.

prod

Scalar method identical to ndarray.prod.

put

Scalar method identical to ndarray.put.

ravel

Scalar method identical to ndarray.ravel.

repeat

Scalar method identical to ndarray.repeat.

reshape

Scalar method identical to ndarray.reshape.

resize

Scalar method identical to ndarray.resize.

round

Scalar method identical to ndarray.round.

searchsorted

Scalar method identical to ndarray.searchsorted.

setfield

Scalar method identical to ndarray.setfield.

setflags

Scalar method identical to ndarray.setflags.

sort

Scalar method identical to ndarray.sort.

squeeze

Scalar method identical to ndarray.squeeze.

std

Scalar method identical to ndarray.std.

sum

Scalar method identical to ndarray.sum.

swapaxes

Scalar method identical to ndarray.swapaxes.

take

Scalar method identical to ndarray.take.

to_device

Scalar method identical to ndarray.to_device.

tobytes

Scalar method identical to ndarray.tobytes.

tofile

Scalar method identical to ndarray.tofile.

tolist

Scalar method identical to ndarray.tolist.

trace

Scalar method identical to ndarray.trace.

transpose

Scalar method identical to ndarray.transpose.

var

Scalar method identical to ndarray.var.

view

Scalar method identical to ndarray.view.

__abs__

abs(self)

__add__

Return self+value.

__and__

Return self&value.

__array__

sc.array(dtype) return 0-dim array from scalar with specified dtype

__bool__

True if self else False

__eq__

Return self==value.

__floordiv__

Return self//value.

__ge__

Return self>=value.

__getitem__

Return self[key].

__gt__

Return self>value.

__invert__

~self

__le__

Return self<=value.

__lshift__

Return self<<value.

__lt__

Return self<value.

__mod__

Return self%value.

__mul__

Return self*value.

__ne__

Return self!=value.

__neg__

-self

__or__

Return self|value.

__pos__

+self

__pow__

Return pow(self, value, mod).

__radd__

Return value+self.

__rand__

Return value&self.

__rfloordiv__

Return value//self.

__rlshift__

Return value<<self.

__rmod__

Return value%self.

__rmul__

Return value*self.

__ror__

Return value|self.

__rpow__

Return pow(value, self, mod).

__rrshift__

Return value>>self.

__rshift__

Return self>>value.

__rsub__

Return value-self.

__rtruediv__

Return value/self.

__rxor__

Return value^self.

__sub__

Return self-value.

__truediv__

Return self/value.

__xor__

Return self^value.