
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
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
AmitDiwan has Published 10744 Articles

AmitDiwan
2K+ Views
To return the length of a string array element-wise, use the numpy.char.str_len() method in Python Numpy. The method returns an output array of integers.StepsAt first, import the required library −import numpy as npCreate a One-Dimensional array of strings −arr = np.array(['Amy', 'Scarlett', 'Katie', 'Brad', 'Tom'])Displaying our array −print("Array...", arr)Get the ... Read More

AmitDiwan
139 Views
Return the highest index in the string where substring sub is found using the numpy.char.rindex() method in Python Numpy. The method returns the output array of ints. Raises ValueError if sub is not found. The first parameter is the input array. The second parameter is the substring to be searched. ... Read More

AmitDiwan
236 Views
To return the highest index in the string where substring sub is found, use the numpy.char.rfind() method in Python Numpy. The method returns the output array of ints. Returns -1 if sub is not found.The first parameter is the input array. The second parameter is the substring to be searched. ... Read More

AmitDiwan
112 Views
To return the highest index in the string where substring sub is found, use the numpy.char.rfind() method in Python Numpy. The method returns the output array of ints. Returns -1 if sub is not found. The first parameter is the input array. The second parameter is the substring to be ... Read More

AmitDiwan
432 Views
To return a boolean array which is True where the string element in array begins with prefix, use the numpy.char.startswith() method in Python Numpy. The method outputs an array of bools. The first parameter is the input array. The second parameter is the prefix. With optional start parameter, test beginning ... Read More

AmitDiwan
136 Views
To return the lowest index in the string where substring sub is found, use the numpy.char.find() method in Python Numpy. The method returns the output array of ints. Returns -1 if sub is not found. The first parameter is the input array. The second parameter is the substring to be ... Read More

AmitDiwan
179 Views
To return a boolean array which is True where the string element in array ends with suffix, use the numpy.char.endswith() method in Python Numpy. The method outputs an array of bools. The first parameter is the input array. The second parameter is the suffix. With optional start parameter, test beginning ... Read More

AmitDiwan
91 Views
To test whether similar int type of different sizes are subdtypes of integer class, use the numpy.issubdtype() method in Python Numpy. The parameters are the dtype or object coercible to one.StepsAt first, import the required library −import numpy as npUsing the issubdtype() method in Numpy. Checking for integer datatype with ... Read More

AmitDiwan
308 Views
The gradient is computed using second order accurate central differences in the interior points and either first or second order accurate one-sides (forward or backwards) differences at the boundaries. The returned gradient hence has the same shape as the input array. The 1st parameter, f is an Ndimensional array containing ... Read More

AmitDiwan
184 Views
To calculate the n-th discrete difference, use the numpy.diff() method. The first difference is given by out[i] = a[i+1] - a[i] along the given axis, higher differences are calculated by using diff recursively. The diff() method returns the n-th differences. The shape of the output is the same as a ... Read More