Category: New Python tutorial

python tutorials and learn python

Created with Sketch.

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

NumPy ravel()

NumPy ravel() Summary: in this tutorial, you’ll learn how to use the NumPy ravel() to return a contiguous flattened array. Introduction to the NumPy ravel() function The ravel() function accepts an array and returns a 1-D array containing the elements of the input array: numpy.ravel(a, order=’C’)   In this syntax: a is a numpy array.…
Read more

NumPy flatten()

NumPy flatten() Summary: in this tutorial, you’ll learn how to use the numpy flatten() method to return a copy of an array collapsed into one dimension. Introduction to the NumPy flatten() method The flatten() is a method of the ndarray class. The flatten() method returns a copy of an array collapsed into one dimension. The…
Read more

NumPy sort()

NumPy sort() Summary: in this tutorial, you’ll learn how to use the numpy sort() function to sort elements of an array. Introduction to the NumPy sort() function The sort() function returns a sorted copy of an array. Here’s the syntax of the sort() function: numpy.sort(a, axis=- 1, kind=None, order=None)   In this syntax: a is…
Read more

NumPy transpose()

NumPy transpose() Summary: in this tutorial, you’ll learn how to use the numpy transpose() function to reverse the axes of an array. Introduction to the numpy transpose() function The numpy transpose() function reverses the axes of an array. Here’s the syntax of the transpose() function: numpy.transpose(a, axes=None) Code language: Python (python) In this syntax: a…
Read more