0% found this document useful (0 votes)
39 views

functions of numpy

numpy

Uploaded by

ansuljoshi8456
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)
39 views

functions of numpy

numpy

Uploaded by

ansuljoshi8456
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
You are on page 1/ 2

Functions of NumPy

Array Creation:

 numpy.array(): Create array from list/tuple

 numpy.zeros(): Array filled with zeros

 numpy.ones(): Array filled with ones

 numpy.empty(): Uninitialized array

 numpy.arange(): Array with a range of values

 numpy.linspace(): Array with evenly spaced values

 numpy.eye(): Identity matrix

Array Manipulation:

 numpy.reshape(): Change shape of array

 numpy.flatten(): Convert to 1D array

 numpy.concatenate(): Join arrays along an axis

 numpy.split(): Split array into sub-arrays

 numpy.transpose(): Swap axes of array

Mathematical Operations:

 numpy.add(): Element-wise addition

 numpy.subtract(): Element-wise subtraction

 numpy.multiply(): Element-wise multiplication

 numpy.divide(): Element-wise division

 numpy.power(): Element-wise exponentiation

 numpy.sqrt(): Square root of elements

 numpy.exp(): Exponential of elements

 numpy.log(): Natural logarithm of elements

Statistical Functions:

 numpy.mean(): Average of array elements

 numpy.median(): Median of array elements

 numpy.std(): Standard deviation

 numpy.var(): Variance

 numpy.min(): Minimum value

 numpy.max(): Maximum value


Functions of NumPy
Linear Algebra:

 numpy.dot(): Dot product (matrix multiplication)

 numpy.linalg.inv(): Inverse of matrix

 numpy.linalg.det(): Determinant of matrix

 numpy.linalg.eig(): Eigenvalues and eigenvectors

Random Number Generation:

 numpy.random.rand(): Random numbers uniformly distributed

 numpy.random.randn(): Random numbers from normal distribution

 numpy.random.randint(): Random integers within a range

Array Operations:

 numpy.where(): Select elements based on condition

 numpy.clip(): Limit values to a range

 numpy.unique(): Find unique elements

You might also like