Notices


Reply
Thread Tools
Posts: 1,244 | Thanked: 3,807 times | Joined on May 2011 @ Brazil
#1
NumPy is a Python module for numerical calculations, using C/C++, Fortran, BLAS and LAPACK. Numpy contains a powerful N-dimensional array object, sophisticated (broadcasting) functions, tools for integrating C/C++ and Fortran code, and useful linear algebra, Fourier transform, and random number capabilities.

Many softwares use NumPy. For example, MatPlotLib is commonly employed with NumPy, and the PyLab mode is NumPy + MatPlotLib.

There are 2 versions of NumPy to choose to install on MeeGo Harmattan :
- NumPy 1.9.1 was released in 02/11/2014, and ported to MeeGo Harmattan in the same day;
- NumPy 1.4.1 (version released in 22/04/2010) provided by Nokia repositories.

Version history :
- NumPy 1.9.1 (02/11/2014) ported to MeeGo Harmattan in 02/11/2014;
- NumPy 1.9.0 (07/09/2014) ported to MeeGo Harmattan in 26/09/2014;
- NumPy 1.8.2 (08/09/2014) second release for MeeGo Harmattan (25/09/2014). NumPy is visible in MeeGo Harmattan Application Manager and is installed easier using Warehouse;
- NumPy 1.8.2 (08/09/2014) ported to MeeGo Harmattan in 18/09/2014, first release;
- NumPy 1.7.1 (07/04/2013) ported to MeeGo Harmattan in 05/06/2013;
- NumPy 1.7.0 (10/02/2013), and I've ported it to MeeGo Harmattan one day later.

So, install NumPy 1.9.1 only if NumPy 1.4.1 doesn't satisfy your needs. For example, MatPlotLib <= 1.2.0 works with NumPy 1.4.1, but Scipy >= 0.9 needs NumPy >= 1.5.0.

NumPy 1.9.1 Harmattan is based on Debian experimental version and NumPy 1.9.0 source code, but without Python 3 support, no documentation package, adapted dependencies to MeeGo Harmattan, etc.

Installing NumPy 1.9.1 on MeeGo Harmattan

NumPy has 2 repositories options, so it can be :
- easily installed by using Warehouse / OpenRepos.net. Install Warehouse (OpenRepos.net client) for MeeGo Harmattan, then open Warehouse, search for "NumPy", enable the repository and install;
- installed by using my Harmattan repository.

Warehouse showing NumPy 1.9.0 available to install :


The installation of NumPy 1.9.1 and its dependencies (libgfortran3, libblas3gf e liblapack3gf) takes 25 MB, while NumPy 1.4.1 takes 22 MB.

Using NumPy on MeeGo Harmattan

It is strongly suggested to also install IPython for MeeGo Harmattan, so the interactive use of NumPy becomes a lot easier
With the new IPython 0.13.2 Harmattan, there are 3 interfaces : IPython terminal, IPython Notebook and IPython Qt console.

A simple example (just type the text after the "In [n]:" lines) in IPython terminal :

Note that "help(np)" (np is an alias to numpy) shows a long help about NumPy.

Time to load NumPy : 0.4-0.5 s (v1.9.0), 0.6-0.7 s (v1.7.1, v1.8.2), 0.4-0.5 s (v1.4.1) by using 'from numpy import *' or 'import numpy'.

Documentation for NumPy

NumPy documentation is in the official NumPy site with NumPy User Guide and NumPy Reference Guide, both online as well as in PDF and other formats. NumPy help in interactive mode is available by typing :
- "help(numpy)" (after an "import numpy"), see the above screenshot;
- "help(pylab.np)", when using PyLab.

Python for MeeGo Harmattan

SciPy 0.14.0, which supplements NumPy 1.9.1, is also available for MeeGo Harmattan. See the SciPy for MeeGo Harmattan topic.

More Python packages are listed in the Python Harmattan Wiki. See also OpenRepos.net.
__________________
Python, C/C++, Qt and CAS developer. For Maemo/MeeGo/Sailfish :
Integral, Derivative, Limit - calculating mathematical integrals, derivatives and limits. SymPy - Computer Algebra System.
MatPlotLib - 2D & 3D plots in Python. IPython - Python interactive shell.
-- My blog about mobile & scientific computing ---
2 Jolla 1, Jolla C, Jolla Tablet. 2 Nokia N9. Nexus 4 with Sailfish. Nokia N900 & N810.

Last edited by HtheB; 2014-11-02 at 22:39.
 

The Following 10 Users Say Thank You to rcolistete For This Useful Post:
Posts: 1,244 | Thanked: 3,807 times | Joined on May 2011 @ Brazil
#2
Updated NumPy from version 1.7.0 to version 1.7.1 (an upstream bug fix version). See 1st post.
__________________
Python, C/C++, Qt and CAS developer. For Maemo/MeeGo/Sailfish :
Integral, Derivative, Limit - calculating mathematical integrals, derivatives and limits. SymPy - Computer Algebra System.
MatPlotLib - 2D & 3D plots in Python. IPython - Python interactive shell.
-- My blog about mobile & scientific computing ---
2 Jolla 1, Jolla C, Jolla Tablet. 2 Nokia N9. Nexus 4 with Sailfish. Nokia N900 & N810.

Last edited by rcolistete; 2013-06-06 at 01:25.
 

The Following 4 Users Say Thank You to rcolistete For This Useful Post:
Posts: 196 | Thanked: 140 times | Joined on Aug 2007
#3
I know this is resurrecting a dead thread but is there any chance you could compile numpy 1.7.2 for N9/harmattan?
 
Posts: 1,244 | Thanked: 3,807 times | Joined on May 2011 @ Brazil
#4
Originally Posted by jcharpak View Post
I know this is resurrecting a dead thread but is there any chance you could compile numpy 1.7.2 for N9/harmattan?
Any specific need of v1.7.2 ? Or can be v1.8.x or 1.9.0 ?
__________________
Python, C/C++, Qt and CAS developer. For Maemo/MeeGo/Sailfish :
Integral, Derivative, Limit - calculating mathematical integrals, derivatives and limits. SymPy - Computer Algebra System.
MatPlotLib - 2D & 3D plots in Python. IPython - Python interactive shell.
-- My blog about mobile & scientific computing ---
2 Jolla 1, Jolla C, Jolla Tablet. 2 Nokia N9. Nexus 4 with Sailfish. Nokia N900 & N810.
 

The Following User Says Thank You to rcolistete For This Useful Post:
Posts: 196 | Thanked: 140 times | Joined on Aug 2007
#5
Originally Posted by rcolistete View Post
Any specific need of v1.7.2 ? Or can be v1.8.x or 1.9.0 ?
It could be later. I assumed Harmattan was stuck on python 2.5 and 1.7.2 was the last version that didn't have python >= 2.6 as a dependency. I'm doing stuff with maskedarrays and looking in the bugfix report I was worried some of those bugs might effect my code.
 
Posts: 1,244 | Thanked: 3,807 times | Joined on May 2011 @ Brazil
#6
Originally Posted by jcharpak View Post
It could be later. I assumed Harmattan was stuck on python 2.5 and 1.7.2 was the last version that didn't have python >= 2.6 as a dependency. I'm doing stuff with maskedarrays and looking in the bugfix report I was worried some of those bugs might effect my code.
Maemo 5 has Python 2.5 so NumPy would be limited to v1.7.2 (but there is no active maintainer).

MeeGo Harmattan has Python 2.6, compatible with last version of NumPy, v1.9.0, and possibly some further versions.

I will soon try to package NumPy 1.7.2 and/or 1.8.2 and/or 1.9.0 for MeeGo Harmattan, depending on which is easier (with no extra dependencies).
__________________
Python, C/C++, Qt and CAS developer. For Maemo/MeeGo/Sailfish :
Integral, Derivative, Limit - calculating mathematical integrals, derivatives and limits. SymPy - Computer Algebra System.
MatPlotLib - 2D & 3D plots in Python. IPython - Python interactive shell.
-- My blog about mobile & scientific computing ---
2 Jolla 1, Jolla C, Jolla Tablet. 2 Nokia N9. Nexus 4 with Sailfish. Nokia N900 & N810.
 
Posts: 1,244 | Thanked: 3,807 times | Joined on May 2011 @ Brazil
#7
Updated NumPy from version 1.7.1 to version 1.8.2 (08/09/2014) for MeeGo Harmattan, a very stable and new version. The versions 1.8.x of NumPy have many new features.

The first post also cites Warehouse/OpenRepos.net installation.

By the way, NumPy v1.8.2 for MeeGo Harmattan was compiled and packaged in .deb using the Harmattan SDK on device (i.e., on Nokia N9, with chroot), it took 36m52s.
__________________
Python, C/C++, Qt and CAS developer. For Maemo/MeeGo/Sailfish :
Integral, Derivative, Limit - calculating mathematical integrals, derivatives and limits. SymPy - Computer Algebra System.
MatPlotLib - 2D & 3D plots in Python. IPython - Python interactive shell.
-- My blog about mobile & scientific computing ---
2 Jolla 1, Jolla C, Jolla Tablet. 2 Nokia N9. Nexus 4 with Sailfish. Nokia N900 & N810.

Last edited by rcolistete; 2014-09-19 at 00:19.
 

The Following 2 Users Say Thank You to rcolistete For This Useful Post:
irulestar's Avatar
Posts: 217 | Thanked: 88 times | Joined on Dec 2013 @ Indonesia, Banyuwangi
#8
[HELP]
How to use this one!?
I had tried install it via apt n From wherehouse too...
But I dont see the app icon launcher...
Need help
__________________
any Question? ask here and Follow first @irulestar
 
Posts: 1,244 | Thanked: 3,807 times | Joined on May 2011 @ Brazil
#9
Originally Posted by irulestar View Post
[HELP]
How to use this one!?
I had tried install it via apt n From wherehouse too...
But I dont see the app icon launcher...
Need help
NumPy is a Python module, to be used inside Python programs. So, there is no icon to launch.

After installation (via "apt-get install python-numpy" in Terminal as root), still in Terminal (as user), just type "ipython" and run the example in the screenshot (1st post). It's recommended to install IPython, as said in 1st post, because the "python" interpreter is more limited than 'ipython".
__________________
Python, C/C++, Qt and CAS developer. For Maemo/MeeGo/Sailfish :
Integral, Derivative, Limit - calculating mathematical integrals, derivatives and limits. SymPy - Computer Algebra System.
MatPlotLib - 2D & 3D plots in Python. IPython - Python interactive shell.
-- My blog about mobile & scientific computing ---
2 Jolla 1, Jolla C, Jolla Tablet. 2 Nokia N9. Nexus 4 with Sailfish. Nokia N900 & N810.
 
Posts: 196 | Thanked: 140 times | Joined on Aug 2007
#10
Originally Posted by rcolistete View Post
NumPy is a Python module, to be used inside Python programs. So, there is no icon to launch.

After installation (via "apt-get install python-numpy" in Terminal as root), still in Terminal (as user), just type "ipython" and run the example in the screenshot (1st post). It's recommended to install IPython, as said in 1st post, because the "python" interpreter is more limited than 'ipython".
Before doing that you may need to enable developer mode.
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 20:42.