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

Python For Data Science Cheat Sheet

The document provides a list of NumPy functions for creating and manipulating arrays. It includes functions for generating arrays filled with zeros, ones, and specified values, as well as performing element-wise mathematical operations like addition, subtraction, and multiplication. Additionally, it covers functions for generating identity matrices and handling array values within specified ranges.

Uploaded by

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

Python For Data Science Cheat Sheet

The document provides a list of NumPy functions for creating and manipulating arrays. It includes functions for generating arrays filled with zeros, ones, and specified values, as well as performing element-wise mathematical operations like addition, subtraction, and multiplication. Additionally, it covers functions for generating identity matrices and handling array values within specified ranges.

Uploaded by

priyayadav199521
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Tajamul Khan

@Tajamulkhann
np.array(): Creates an array from
a list or tuple.
np.zeros(): Generates an array
filled with zeros.
np.ones(): Generates an array
filled with ones.
np.arange(start, stop, step):
Creates an array with evenly
spaced values within a range.
np.linspace(start, stop, num):
Generates an array with evenly
spaced numbers between two values.
np.eye(n): Creates an identity
matrix.
np.full(shape, fill_value):
Creates an array filled with a
specified value.
np.empty(): Allocates an array
without initializing its values.

@Tajamulkhann
np.add(a, b): Element-wise
addition of arrays.
np.subtract(a, b): Element-wise
subtraction of arrays.
np.multiply(a, b): Element-wise
multiplication.
np.divide(a, b): Element-wise
division.
np.sqrt(a): Computes the square
root of each element.
np.power(a, b): Raises each
element of a to the power of b.
np.mod(a, b): Element-wise modulus
operation.
np.clip(a, min, max): Limits
values in an array to a specified
range.

@Tajamulkhann

You might also like