Python NumPy Package Installation

Source: Internet
Author: User

1, download Python

: https://www.python.org/downloads/windows/

2. Configure Python environment variables

Add the Python installation path in the system variable path of the system properties of the computer, as in path; F:\Python34; F:\Python34\Scripts;

3. Install the NumPy package using PIP instructions

3.1 Open DOS command input pip install NumPy will be installed automatically

A long time, successful installation will have the following tips

3.2 You can also use the PIP command to search for packages in the Python repository, which you need to install.

If we can search for packages related to CRF (conditional random field)

This makes it possible to use the NumPy package for scientific calculations.

4, test of NumPy package

Code: Use the NumPy package to implement a matrix transpose, multiply.

__author__='Xianweizheng' fromNumPyImport*randarrays= Random.rand (bis)Print("Rand arrays:\n", randarrays) Randmat= Mat (Random.rand (bis))#Use the mat () function to convert an array to matrixPrint("Rand matrix:\n", Randmat) Invrandmat= Randmat.i#use. I implement the transpose of the MatrixPrint("Inverse Rand matrix:\n", Invrandmat)

Operation Result:

Python NumPy Package Installation

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.