Python numerical computing — arrays, indexing, slicing, random and ufuncs — written by Aivasu Tech Institute's mentors. Free to read, structured to actually help you learn.
NumPy notes by Aivasu Tech Institute cover 44 topics — from numpy home to ufunc set operations — each explained with short definitions, syntax and runnable code examples. They are 100% free, need no signup, and work as quick revision for college exams, NumPy interviews and Aivasu Tech Institute's mentor-led NumPy course in Pitampura, Delhi.
No notes found. Try a different search term, or browse all NumPy notes.
We have created 43 tutorial pages for you to learn more about NumPy.
NumPy is a Python library used for working with arrays.
If you have Python and PIP already installed on a system, then installation of NumPy is very easy.
NumPy is used to work with arrays. The array object in NumPy is called ndarray .
Array indexing is the same as accessing an array element.
Slicing in python means taking elements from one given index to another given index.
- strings - used to represent text data, the text is given under quote marks. e.g. "ABCD"
The main difference between a copy and a view of an array is that the copy is a new array, and the view is just a view of the original array.
The shape of an array is the number of elements in each dimension.
Reshaping means changing the shape of an array.
Iterating means going through elements one by one.
Joining means putting contents of two or more arrays in a single array.
Splitting is reverse operation of Joining.
You can search an array for a certain value, and return the indexes that get a match.
Sorting means putting elements in an ordered sequence.
Getting some elements out of an existing array and creating a new array out of them is called filtering.
Random number does NOT mean a different number every time. Random means something that can not be predicted logically.
Data Distribution is a list of all possible values, and how often each value occurs.
A permutation refers to an arrangement of elements. e.g. 3, 2, 1 is a permutation of 1, 2, 3 and vice-versa.
Seaborn is a library that uses Matplotlib underneath to plot graphs. It will be used to visualize random distributions.
The Normal Distribution is one of the most important distributions.
Binomial Distribution is a Discrete Distribution.
Poisson Distribution is a Discrete Distribution.
Used to describe probability where every event has equal chances of occuring.
Logistic Distribution is used to describe growth.
Multinomial distribution is a generalization of binomial distribution.
Exponential distribution is used for describing time till next event e.g. failure/success etc.
Chi Square distribution is used as a basis to verify the hypothesis.
Rayleigh distribution is used in signal processing.
A distribution following Pareto's law i.e. 80-20 distribution (20% factors cause 80% outcome).
Zipf distributions are used to sample data based on zipf's law.
ufuncs stands for "Universal Functions" and they are NumPy functions that operate on the ndarray object.
To create your own ufunc, you have to define a function, like you do with normal functions in Python, then you add it to your NumPy ufunc library with the from
You could use arithmetic operators + - / directly between NumPy arrays, but this section discusses an extension of the same where we have functions th
There are primarily five ways of rounding off decimals in NumPy:
NumPy provides functions to perform log at the base 2, e and 10.
What is the difference between summation and addition?
To find the product of the elements in an array, use the prod() function.
A discrete difference means subtracting two successive elements.
The Lowest Common Multiple is the smallest number that is a common multiple of two numbers.
The GCD (Greatest Common Divisor), also known as HCF (Highest Common Factor) is the biggest number that is a common factor of both of the numbers.
NumPy provides the ufuncs sin() , cos() and tan() that take values in radians and produce the corresponding sin, cos and tan values.
NumPy provides the ufuncs sinh() , cosh() and tanh() that take values in radians and produce the corresponding sinh, cosh and tanh values..
A set in mathematics is a collection of unique elements.
Join Aivasu Tech Institute's NumPy course — live mentorship, hands-on projects, and 100% placement support in Delhi NCR.
Enroll Now — Free Demo Available✳ Common questions
What students search before reading NumPy notes.