Python Numpy Question and Python Version Question

Question:

I want to use Numpy with Python 3.2 and it won’t work; it says I need 3.1. Does anyone know how to get around this issue, other than using 3.1? What do I have to import in order to make this work in a python program?

I want to represent a matrix in python, as well as get the norm of the matrix. How would I go about doing this with Numpy? Is that inside Numpy or Python? What about Matrix multiplication? Also, this matrix is actually a vector with x and y as its variables.

The final question. Some members on here feel that using Python 3.2 is not the best way to create a professional product, even though on Python.org, they specifically state that using 3.2 or 2.7 are the most stable versions available today. Am I wrong here? If I am, what version of Python should I use? Thanks in advance.

Also, I don’t have enough rep to post three individual questions, so If you can answer a part, it would be appreciated.

Asked By: TheChes44

||

Answers:

NumPy 1.6.0 released on 5/14/2011 supports Python 3.2. The prior version (1.5.1) was released prior to Python 3.2. So what version of NumPy are you using? If it’s 1.6.0 and it’s not working on 3.2 it might be a bug with NumPy and you should report it to NumPy.

Regarding basic use of numpy, use this tutorial. I can see that it covers array creation and multiplication fairly early on. Regarding norms, see this reference page.

Regarding whether to use Python 2.7 or 3.2, there’s a page at python.org that discusses this in detail.

Answered By: Steven Rumbalski

You should consider looking at the numpy documentation and the tutorials to familiarize yourself with how it works:

http://docs.scipy.org/doc/

Link

The documentation includes a lot of examples on a per function basis, so for example if you wanted to find how to take the norm, take a look at

http://docs.scipy.org/doc/numpy/reference/generated/numpy.linalg.norm.html

Answered By: JoshAdel