Difference between Python float and numpy float32

0 votes
What is the difference between the built in float and numpy.float32?

For example, here is a code:

a = 58682.7578125
print type(a)
print a
print type(numpy.float32(a))
print numpy.float32(a)
 

The output will be :

<type 'float'>
58682.7578125
<type 'numpy.float32'>
58682.8

What is the built in float format?
Mar 4 in Python by ana1504.k
• 7,350 points
61 views

1 answer to this question.

0 votes
Python's standard float type is a C double.

NumPy's standard numpy.float is the same, and is also the same as numpy.float64
answered Mar 4 by SDeb
• 12,120 points

Related Questions In Python

0 votes
1 answer

What is the difference between Python and IPython?

There are few differences between Python and ...READ MORE

answered Jul 26, 2018 in Python by Priyaj
• 56,160 points
192 views
+1 vote
1 answer

What is the difference between range and xrange functions in Python 2.X?

xrange only stores the range params and ...READ MORE

answered Aug 22, 2018 in Python by Priyaj
• 56,160 points
130 views
+1 vote
1 answer

What's the difference between eval, exec, and compile in Python?

exec is not an expression: a statement ...READ MORE

answered Aug 28, 2018 in Python by Priyaj
• 56,160 points
372 views
0 votes
1 answer

In Python, what is difference between Array and List?

Lists and arrays are used in Python ...READ MORE

answered Mar 15 in Python by Taj
• 840 points

edited Mar 18 by Omkar 532 views
+1 vote
2 answers

View onto a numpy array?

 just index it as you normally would. ...READ MORE

answered Oct 18, 2018 in Python by roberto
42 views
0 votes
1 answer
0 votes
1 answer

Printing a large numpy array

numpy.set_printoptions(threshold='nan') READ MORE

answered Jul 20, 2018 in Python by Nietzsche's daemon
• 4,260 points
82 views
0 votes
1 answer

Difference between module and Package in Python

A module is basically a single file ...READ MORE

answered Nov 13, 2018 in Python by SDeb
• 12,120 points
91 views
0 votes
2 answers

difference between class and instance attributes

Apart from the performance, there is a ...READ MORE

answered Sep 17, 2018 in Python by SDeb
• 12,120 points
25 views