numpy

Package — Data SciencePython 3.9+Intermediate

N-dimensional arrays, vectorized math, linear algebra, FFT

Quick Info

Documentation
Official Docs
Python Version
3.9+
Dependencies
None (C extension, self-contained)
Install
pip install numpy

Learn by Difficulty

Quick Example

python
import numpy as np

arr = np.array([1, 2, 3, 4, 5])
print(f"Array: {arr}")
print(f"Mean: {np.mean(arr)}")
print(f"Sum: {np.sum(arr)}")
print(f"Shape: {arr.shape}")

matrix = np.array([[1, 2], [3, 4]])
print(f"\nMatrix:\n{matrix}")
print(f"Transpose:\n{matrix.T}")

numpy is a third-party package. N-dimensional arrays, vectorized math, linear algebra, FFT. Install with: pip install numpy

Try in Playground

Tags

packagedata-sciencenumericarraydatatypelinear-algebra

Related Items