Single-precision floating-point number type, compatible with C float
.
meridian
.
backend
.
np_float_dtype
(
*
args
,
**
kwargs
)
: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.
Attributes
Please see ndarray.T
.
Please see ndarray.base
.
Methods
all
all
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.all
.
any
any
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.any
.
argmax
argmax
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.argmax
.
argmin
argmin
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.argmin
.
argsort
argsort
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.argsort
.
as_integer_ratio
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
astype
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.astype
.
byteswap
byteswap
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.byteswap
.
choose
choose
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.choose
.
clip
clip
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.clip
.
compress
compress
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.compress
.
conj
conj
()
conjugate
conjugate
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.conjugate
.
copy
copy
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.copy
.
cumprod
cumprod
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.cumprod
.
cumsum
cumsum
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.cumsum
.
diagonal
diagonal
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.diagonal
.
dump
dump
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.dump
.
dumps
dumps
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.dumps
.
fill
fill
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.fill
.
flatten
flatten
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.flatten
.
getfield
getfield
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.getfield
.
is_integer
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
item
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.item
.
max
max
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.max
.
mean
mean
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.mean
.
min
min
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.min
.
nonzero
nonzero
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.nonzero
.
prod
prod
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.prod
.
put
put
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.put
.
ravel
ravel
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.ravel
.
repeat
repeat
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.repeat
.
reshape
reshape
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.reshape
.
resize
resize
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.resize
.
round
round
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.round
.
searchsorted
searchsorted
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.searchsorted
.
setfield
setfield
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.setfield
.
setflags
setflags
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.setflags
.
sort
sort
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.sort
.
squeeze
squeeze
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.squeeze
.
std
std
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.std
.
sum
sum
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.sum
.
swapaxes
swapaxes
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.swapaxes
.
take
take
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.take
.
to_device
to_device
()
tobytes
tobytes
()
tofile
tofile
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.tofile
.
tolist
tolist
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.tolist
.
tostring
tostring
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.tostring
.
trace
trace
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.trace
.
transpose
transpose
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.transpose
.
var
var
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.var
.
view
view
()
Scalar method identical to the corresponding array attribute.
Please see ndarray.view
.
__abs__
__abs__
()
abs(self)
__add__
__add__
(
value
,
/
)
Return self+value.
__and__
__and__
(
value
,
/
)
Return self&value.
__array__
__array__
()
sc. array(dtype) return 0-dim array from scalar with specified dtype
__bool__
__bool__
()
True if self else False
__eq__
__eq__
(
value
,
/
)
Return self==value.
__floordiv__
__floordiv__
(
value
,
/
)
Return self//value.
__ge__
__ge__
(
value
,
/
)
Return self>=value.
__getitem__
__getitem__
(
key
,
/
)
Return self[key].
__gt__
__gt__
(
value
,
/
)
Return self>value.
__invert__
__invert__
()
~self
__le__
__le__
(
value
,
/
)
Return self<=value.
__lshift__
__lshift__
(
value
,
/
)
Return self<<value.
__lt__
__lt__
(
value
,
/
)
Return self<value.
__mod__
__mod__
(
value
,
/
)
Return self%value.
__mul__
__mul__
(
value
,
/
)
Return self*value.
__ne__
__ne__
(
value
,
/
)
Return self!=value.
__neg__
__neg__
()
-self
__or__
__or__
(
value
,
/
)
Return self|value.
__pos__
__pos__
()
+self
__pow__
__pow__
(
value
,
mod
,
/
)
Return pow(self, value, mod).
__radd__
__radd__
(
value
,
/
)
Return value+self.
__rand__
__rand__
(
value
,
/
)
Return value&self.
__rfloordiv__
__rfloordiv__
(
value
,
/
)
Return value//self.
__rlshift__
__rlshift__
(
value
,
/
)
Return value<<self.
__rmod__
__rmod__
(
value
,
/
)
Return value%self.
__rmul__
__rmul__
(
value
,
/
)
Return value*self.
__ror__
__ror__
(
value
,
/
)
Return value|self.
__rpow__
__rpow__
(
value
,
mod
,
/
)
Return pow(value, self, mod).
__rrshift__
__rrshift__
(
value
,
/
)
Return value>>self.
__rshift__
__rshift__
(
value
,
/
)
Return self>>value.
__rsub__
__rsub__
(
value
,
/
)
Return value-self.
__rtruediv__
__rtruediv__
(
value
,
/
)
Return value/self.
__rxor__
__rxor__
(
value
,
/
)
Return value^self.
__sub__
__sub__
(
value
,
/
)
Return self-value.
__truediv__
__truediv__
(
value
,
/
)
Return self/value.
__xor__
__xor__
(
value
,
/
)
Return self^value.


