×
Home
Jobs
Tools
Coding Ground
Current Affairs
UPSC Notes
Online Tutors
Whiteboard
Tutorix
Login
Categories
Java
JSP
iOS
HTML
Android
Python
C Programming
C++ Programming
C#
PHP
CSS
Javascript
jQuery
SAP
SAP HANA
Data Structure
RDBMS
MySQL
Mathematics
8085 Microprocessor
Operating System
Digital Electronics
Analysis of Algorithms
Mobile Development
Front End
Web Development
Selenium
MongoDB
Computer Network
General Topics
Q/A
Library
eBooks
Courses
Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Selected Reading
UPSC IAS Exams Notes
Developer's Best Practices
Questions and Answers
Effective Resume Writing
HR Interview Questions
Computer Glossary
Who is Who
Prasad Naik
has Published
80
Answers
How to sort a Pandas Series?
Python
Pandas
Server Side Programming
Programming
Prasad Naik
Published on 16-Mar-2021 10:39:16
In this problem we have to sort a Pandas series. We will define an unsorted pandas series and will sort it using the sort_values() function in the Pandas library.AlgorithmStep 1: Define Pandas series. Step 2: Sort the series using sort_values() function. Step 3: Print the sorted series.Example Codeimport pandas as ...
Read More
Python program to reverse a Numpy array?
Python
Numpy
Server Side Programming
Programming
Prasad Naik
Published on 16-Mar-2021 10:38:13
This is a simple program wherein we have to reverse a numpy array. We will use numpy.flip() function for the same.AlgorithmStep 1: Import numpy. Step 2: Define a numpy array using numpy.array(). Step 3: Reverse the array using numpy.flip() function. Step 4: Print the array.Example Codeimport numpy as np ...
Read More
How to print array elements within a given range using Numpy?
Python
Numpy
Server Side Programming
Programming
Prasad Naik
Published on 16-Mar-2021 10:34:06
In this program, we have to print elements of a numpy array in a given range. The different numpy functions used are numpy.where() and numpy.logical_and().AlgorithmStep 1: Define a numpy array. Step 2: Use np.where() and np.logical_and() to find the numbers within the given range. Step 3: Print the result.Example Codeimport ...
Read More
How to find set difference between two Numpy arrays?
Python
Numpy
Server Side Programming
Programming
Prasad Naik
Published on 16-Mar-2021 10:33:23
In this program, we will find the set difference of two numpy arrays. We will use the setdiff1d() function in the numpy library. This function takes two parameters: array1 and array2 and returns the unique values in array1 that are not in array2.AlgorithmStep 1: Import numpy. Step 2: Define two ...
Read More
How to find intersection between two Numpy arrays?
Python
Numpy
Server Side Programming
Programming
Prasad Naik
Published on 16-Mar-2021 10:32:13
In this problem, we will find the intersection between two numpy arrays. Intersection of two arrays is an array with elements common in both the original arraysAlgorithmStep 1: Import numpy. Step 2: Define two numpy arrays. Step 3: Find intersection between the arrays using the numpy.intersect1d() function. Step 4: Print ...
Read More
How to add a vector to a given Numpy array?
Python
Numpy
Server Side Programming
Programming
Prasad Naik
Published on 16-Mar-2021 10:28:17
In this problem, we have to add a vector/array to a numpy array. We will define the numpy array as well as the vector and add them to get the result arrayAlgorithmStep 1: Define a numpy array. Step 2: Define a vector. Step 3: Create a result array same as ...
Read More
How to find the sum of rows and columns of a given matrix using Numpy?
Python
Numpy
Server Side Programming
Programming
Prasad Naik
Published on 16-Mar-2021 10:27:17
In this problem, we will find the sum of all the rows and all the columns separately. We will use the sum() function for obtaining the sum.AlgorithmStep 1: Import numpy. Step 2: Create a numpy matrix of mxn dimension. Step 3: Obtain the sum of all the rows. Step 4: ...
Read More
How to find the sum of all elements of a given matrix using Numpy?
Python
Numpy
Server Side Programming
Programming
Prasad Naik
Published on 16-Mar-2021 10:26:28
In this program, we will add all the terms of a numpy matrix using the sum() function in the numpy library. We will first create a random numpy matrix and then, we will obtain the sum of all the elements.AlgorithmStep 1: Import numpy. Step 2: Create a random m×n matrix ...
Read More
Finding the number of rows and columns in a given matrix using Numpy
Python
Numpy
Programming
Server Side Programming
Prasad Naik
Published on 16-Mar-2021 10:02:33
We will first create a numpy matrix and then find out the number of rows and columns in that matrixAlgorithmStep 1: Create a numpy matrix of random numbers. Step 2: Find the rows and columns of the matrix using numpy.shape function. Step 3: Print the number of rows and columns.Example ...
Read More
How to create an identity matrix using Numpy?
Python
Numpy
Server Side Programming
Programming
Prasad Naik
Published on 16-Mar-2021 10:01:56
In this program, we will print an identity matrix of size nxn where n will be taken as an input from the user. We shall use the identity() function in the numpy library which takes in the dimension and the data type of the elements as parametersAlgorithmStep 1: Import numpy. ...
Read More
Previous
1
2
3
4
5
6
7
8
Next
Advertisements
Print
Add Notes
Bookmark this page
Report Error
Suggestions
Save
Close
Dashboard
Logout