Was ist der Unterschied zwischen den eingebauten float
und numpy.float32
?Unterschied zwischen Python float und numpy float32
Beispiel
a = 58682.7578125
print type(a)
print a
print type(numpy.float32(a))
print numpy.float32(a)
Ausgang:
<type 'float'>
58682.7578125
<type 'numpy.float32'>
58682.8
Ich habe festgestellt, dass herenumpy.float32
ist:
float32 einfache Genauigkeit float: Vorzeichenbit, 8 Bit Exponent, 23 Bits Mantisse
nicht gefunden, was das eingebaute float
Format ist.
In Ihrem Beispiel 'float_32 = np.float32 (a); drucken (float_32 == a)' druckt True - ?? –