The array created using the Numpy library can be converted into an image using the PIL or opencv libraries in python programming language. Let’s see about each library one by one. Python Image Library PIL is abbreviated as Python Image Library, which is an image processing libraries in python. It is a light weight and easy to use library to perform the image processing tasks like reading, writing, resizing and cropping the images. This library performs all the basic image processing tasks but don’t have any advanced features required for computer vision applications. We have a function in ... Read More
The Numpy is the library in the python programming language which is abbreviated as Numerical Python. It is used to do the mathematical, scientific and statistical calculations within less time. The output of the numpy functions will be an array. An array created by the numpy functions can be stored in the CSV file using a function namely, savetxt(). Numpy array into a .csv file CSV is abbreviated as Comma Separated Values. This is the file format most widely used in the Data Science. This stores the data in a tabular format where the column holds the data fields and ... Read More
Array is one of the data structures which allows us to store the same data type elements in a contiguous block of memory. Arrays can be in one dimension or two dimension or three dimension up to 32 dimensions. In python, there are different ways to create arrays. One way is by using the built-in module array which allows us to create the array with different data types like integers and floats. The other way is by using the Numpy library, which provides most powerful and flexible functions to implement the arrays. Creating array using array module The built in ... Read More
Weighted average is a type of average in which each array element will be multiplied by a weight factor before calculating the mean of the data elements. The weight of each data point determines its contribution to all its overall average. Calculating weighted average This is used to calculate the average price of a stock in a portfolio value. The mathematical formula of the weighted average is given as follows. weighted_average = (w1 * x1 + w2 * x2 + ... + wn * xn) / (w1 + w2 + ... + wn) Where, x1, x2, ….., ... Read More
The reciprocal of a number is defined as the multiplicative inverse of that number, when we have a non-zero number ‘a’ then the reciprocal of ‘a’ will be ‘b’, Hence, a * b = 1. In other words, reciprocal of ‘a’ is given as ‘1/a’. The reciprocal() function We can calculate the reciprocal of an array using the reciprocal() function of the Numpy library. This function accepts an array as a parameter and returns the reciprocal of the elements of the given array. The within the same shape and size of the original array. Syntax Following is the syntax for ... Read More
A number is said to be a Strong number if the factorials of its individual digits are found and then added together and the total sum calculated is equal to the number itself. Here, in this Python article, using three different examples, the different methods of finding the Strong numbers if present in a list are given. In the Example 1, a list that contains the precalculated factorials of numbers are used for calculating the sum of factorials of all the present digits in a number while checking whether the selected number is strong or not. In example 2, the ... Read More
In a digital electronic system, binary storage and registers are most elementary components employed for storage and manipulation of binary data and information. Binary storage refers to the technique for storing data and information in binary format, i.e. in the form of 0s and 1s. Register is a most basic storage unit in a digital system that can store binary data and information. In this tutorial, we will explore binary storage and registers along with their importance in the field of digital electronics. Let’s begin with the basic introduction of binary storage. What is Binary Storage? A storage technique in ... Read More
Digital electronics systems use binary numbers to understand and process data and instructions. The representation of data and information in binary number system is referred to as binary representation. It is a crucial concept in digital electronics that allows for the implementation and operation of digital devices and systems like computers, smartphones, data communication systems, and more. In this article, we will explore different types of binary representations along with their basic description. But before that let’s have look into the basics of binary number system. What is Binary Number System? Binary number system is a base-2 number system which ... Read More
In digital electronic devices and systems, binary registers are one of the crucial components that play a vital role in data storage and manipulation. Binary registers are the fundamental building blocks in memory unit of a digital system or device. In this article, we will explore basics of binary registers and binary register data. So, let’s start with the basic introduction of binary registers. What are Binary Registers? In digital systems, a binary register is considered the base of a data storage unit. It is a group of flip-flops connected together to store data and information in the form of ... Read More
Let's start this article with an overview of Binary Coded Decimal (BCD) codes before moving on to discuss BCD addition. What is BCD? BCD or Binary Coded Decimal is a coding scheme used to represent decimal number (0 to 9) in the form of binary digits of a group of 4-bits. Binary coded decimal is the simplest form to convert decimal numbers into their equivalent binary format. Although, binary coded decimal or BCD is not the same as the normal binary representation. In binary coded decimal (BCD) coding scheme, each decimal digit is represented as a group of 4-bit binary ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP