0% found this document useful (0 votes)
11 views2 pages

Numpy

NumPy is a core library for scientific computing in Python, primarily working with homogeneous multidimensional array objects. It allows for the creation of arrays using methods like 'array' and 'arange', enabling users to manipulate numerical data efficiently. However, NumPy arrays do not support adding or removing elements once created.

Uploaded by

ffplayerpt6
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views2 pages

Numpy

NumPy is a core library for scientific computing in Python, primarily working with homogeneous multidimensional array objects. It allows for the creation of arrays using methods like 'array' and 'arange', enabling users to manipulate numerical data efficiently. However, NumPy arrays do not support adding or removing elements once created.

Uploaded by

ffplayerpt6
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

NUMPY -ARRAY

NumPy stands for Numerical [Link] is the core library for scientific
computing in Python.
Numpy Array works on homogeneous types
numpy. Array does not support adding and removing of elements
It consist of multidimensional array objects, and tools for working with
these arrays.

Creation of array
numpy array from array method

One dimension array can be created using array method with list object
with one dimensional elements.
e.g.

import numpy as np
a=[Link]([500,200,300]) #Createa1DArray
print(type(a)) #Prints"<class '[Link]'>"
print(a[0],a[1],a[2]) #Prints 500 200 300
a[0]=150 #Change an element of the array
print(a)

numpy array from range

[Link](start,stop,step)

#program1
import numpy as np
x=[Link](5)
print(x) #print [01234]

#program2
import numpy as np
x=[Link](10,20,2)
print(x) #print[10 12 14 16 18]

You might also like