Blog

python tutorials and learn python

Created with Sketch.

NumPy split()

NumPy split()   Summary: in this tutorial, you’ll learn how to use the NumPy split() function to split an array into multiple sub-arrays. Introduction to the NumPy split() function The split() funciton splits an array into multiple sub-arrays as views. The syntax of the split() function is as follows: numpy.split(ary, indices_or_sections, axis=0)   In this…
Read more

NumPy hstack()

NumPy hstack() Summary: in this tutorial, you’ll learn how to use the NumPy hstack() function to join two or more arrays horizontally. Introduction to the NumPy hstack() function The hstack() function joins elements of two or more arrays into a single array horizontally (column-wise). The following shows the syntax of the hstack() function: numpy.hstack((a1,a2,…))  …
Read more

NumPy vstack()

NumPy vstack() Summary: in this tutorial, you’ll learn how to use the NumPy vstack() function to vertically join elements of two or more arrays into a single array. Introduction to the NumPy vstack() function The vstack() function joins elements of two or more arrays into a single array vertically (row-wise). Here’s the syntax of the…
Read more

NumPy stack()

NumPy stack() Summary: in this tutorial, you’ll learn how to use the NumPy stack() function to join two or more arrays into a single array. Introduction to the NumPy stack() function The stack() function two or more arrays into a single array. Unlike the concatenate() function, the stack() function joins 1D arrays to be one…
Read more

NumPy concatenate()

NumPy concatenate() Summary: in this tutorial, you’ll learn how to use the NumPy concatenate() function to join elements of two or more arrays into a single array. Introduction to the NumPy concatenate() function The concatenate() function allows you to join two or more arrays into a single array. Here’s the basic syntax of the concatenate()…
Read more

NumPy Broadcasting

NumPy Broadcasting Summary: in this tutorial, you’ll learn about NumPy broadcasting and understand how it works. Introduction to the NumPy broadcasting In previous tutorials, you learned how to perform arithmetic operations on equal-sized arrays using the add(), subtract(), multiply(), and divide() functions or as +, -, *, and / operators. To perform arithmetic operations on…
Read more

NumPy divide()

NumPy divide() Summary: in this tutorial, you’ll learn how to use the numpy divide() function or the / operator to find the quotient of two equal-sized arrays, element-wise. Introduction to the Numpy subtract function The / operator or divide() function returns the quotient of two equal-sized arrays by performing element-wise division. Let’s take some examples…
Read more

NumPy multiply()

NumPy multiply() Summary: in this tutorial, you’ll learn how to use the numpy multiply() function or the * operator to return the product of two equal-sized arrays, element-wise. Introduction to the Numpy subtract function The * operator or multiply() function returns the product of two equal-sized arrays by performing element-wise multiplication. Let’s take some examples…
Read more

NumPy subtract()

NumPy subtract() Summary: in this tutorial, you’ll learn how to use the numpy subtract() function or the – operator to find the difference between two equal-sized arrays. Introduction to the Numpy subtract function The – or subtract() function returns the difference between two equal-sized arrays by performing element-wise subtractions. Let’s take some examples of using…
Read more

NumPy add()

NumPy add()   Summary: in this tutorial, you’ll learn how to use the numpy add() function or the + operator to add two equal-sized arrays. Introduction to the Numpy add() function The + or add() function of two equal-sized arrays perform element-wise additions. It returns the sum of two arrays, element-wise. Let’s take some examples…
Read more