BetterDocs
Home
Docs

NumPy | Installation

Installation

Assuming you have installed Python & pip or conda, go ahead and run the below command to install numpy:
D:\FolderName\NumPy> pip install numpy

Importing & Aliasing

Upon installing, proceed importing numpy and aliasing to np for easier usage:
import numpy as np

as: In Python, an alias is created to refer the same thing in an easier way.

Creating Array

Voila! You're all set to create your first np.ndarray:
import numpy as np
array = np.array(object=[1, 2, 3, 4, 5, 6, 7, 8, 9, 0])
print(array)
#Output: [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]

Logo

BetterDocs

Support

EmailDiscordForms

Documentations

Python

Company

AboutDocs

Policies

Terms of ServicePrivacy Policy