Numbers are an integral part of programming. Hence, programming languages support various datatypes to represent different kinds of numbers and provide various methods to work with them.Each of these datatypes comes with certain limitations on the range of numbers they can represent; while some can represent a small range of numbers, others support a very large range of numbers. Depending ...

Read More »Home »

## Python map() Function (Loop without a loop)

Have you been using for loops to perform repetitive tasks on a list of items in Python?Did you wish there existed a more efficient way to apply functions to every item in a Python list?If you answered yes, you are yet to discover an important and powerful tool in Python – the map() function. In this tutorial, we will uncover the capabilities of a ...

Read More »## 11 Amazing NumPy Shuffle Examples

Python’s NumPy package offers various methods that are used to perform operations involving randomness, such as the methods to randomly select one or more numbers from a given list of numbers, or to generate a random number in a given range, or to randomly generate a sample from a given distribution. All these methods are offered under the random module of ...

Read More »## The Unconventional Guide to Colors In Python

If you have been programming in Python, chances are high that you have encountered at least one library that offers functionalities dealing with representation and customization of colors.From image processing to data visualization to web application development, you will find the use of colors everywhere.In fact, most of the modern deep neural networks used for the state of the art ...

Read More »## NumPy Meshgrid From Zero To Hero

What is a meshgrid? The term meshgrid is made up of two words – ‘mesh’ and ‘grid’, both of which in generalrefer to ‘a network’ or ‘an interlaced structure’ or an ‘arrangement’ of equally spaced valuesThe Cartesian coordinate system is a classic example of this. As shown in the image, each position is referred to by an ordered pair of ...

Read More »## 3D plotting in Python using matplotlib

Data visualization is one such area where a large number of libraries have been developed in Python. Among these, Matplotlib is the most popular choice for data visualization. While initially developed for plotting 2-D charts like histograms, bar charts, scatter plots, line plots, etc., Matplotlib has extended its capabilities to offer 3D plotting modules as well. In this tutorial, we ...

Read More »## Dijkstra’s algorithm in Python (Find Shortest & Longest Path)

In a previous tutorial, we talked about the Depth First Search algorithm where we visit every point from A to B and that doesn’t mean that we will get the shortest path. In this tutorial, we will implement Dijkstra’s algorithm in Python to find the shortest and the longest path from a point to another. One major difference between Dijkstra’s ...

Read More »## Depth First Search Algorithm In Python (Multiple Examples)

Introduction Graphs and Trees are one of the most important data structures we use for various applications in Computer Science.They represent data in the form of nodes, which are connected to other nodes through ‘edges’. Like other data structures, traversing all the elements or searching for an element in a graph or a tree is one of the fundamental operations ...

Read More »## Python Correlation Matrix Tutorial

In this blog, we will go through an important descriptive statistic of multi-variable data called the correlation matrix. We will learn how to create, plot, and manipulate correlation matrices in Python. We will be looking at the following topics: What is the correlation matrix? A correlation matrix is a tabular data representing the ‘correlations’ between pairs of variables in a ...

Read More »