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, 2019 in Python by ana1504.k
• 7,890 points
522 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, 2019 by SDeb
• 13,230 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
• 57,530 points
904 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
• 57,530 points
550 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
• 57,530 points
959 views
0 votes
2 answers

In Python, what is difference between Array and List?

Python does not have native array data ...READ MORE

answered Mar 19 in Python by chirag
• 180 points
34,535 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
69 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
211 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
• 13,230 points
302 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
• 13,230 points
56 views