Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do I have Numpy 32 bit or 64 bit?

How do I check if my installed numpy version is 32bit or 64bit?

Bonus Points for a solution which works inside a script and is system independent.

like image 784
D Adams Avatar asked Nov 05 '15 19:11

D Adams


People also ask

How do you check a number is 32bit or 64bit?

Click Start, type system in the search box, and then click System in the Control Panel list. The operating system is displayed as follows: For a 64-bit version operating system: 64-bit Operating System appears for the System type under System.

Can I install both 32 bit and 64-bit Python?

You can generally install multiple Python Version side by side.

What is the difference between 32 bit and 64-bit Python?

32-bit Python, and 32-bit apps generally, can access only 4GB of memory at a time. 64-bit applications don't have this limit, hence many data analysis and machine learning tools for Python work best in 64-bit incarnations. Some are available only in 64-bit versions.

Are Python floats 32 or 64?

Python's floating-point numbers are usually 64-bit floating-point numbers, nearly equivalent to np.


1 Answers

In [65]: import numpy.distutils.system_info as sysinfo

In [69]: sysinfo.platform_bits
Out[69]: 64

This is based on the value returned by platform.architecture():

In [71]: import platform
In [72]: platform.architecture()
Out[74]: ('64bit', 'ELF')
like image 97
unutbu Avatar answered Oct 05 '22 17:10

unutbu