learn-python/contrib/numpy/introduction.md

1.1 KiB

Introduction

What is NumPy?

NumPy is a powerful array-processing library in Python, essential for scientific computing. It provides efficient data structures and tools for working with multidimensional arrays.

Key Features

  1. Efficient Arrays: NumPy offers high-performance N-dimensional array objects for swift data manipulation.
  2. Broadcasting: Advanced broadcasting enables seamless element-wise operations on arrays of varying shapes.
  3. Interoperability: NumPy seamlessly integrates with C, C++, and Fortran, enhancing performance and versatility.
  4. Mathematical Tools: Comprehensive support for linear algebra, Fourier transforms, and random number generation.

Installation

Ensure Python is installed in your system. If not you can install it from here(official Python website),then install NumPy via:

pip install numpy

Importing NumPy

To access NumPy functions, import it with the alias np.

import numpy as np

Using np as an alias enhances code readability and is a widely adopted convention.