- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- 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 11360 Articles
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
119 Views
To shift the bits of an integer to the left, use the numpy.left_shift() method in Python Numpy. Bits are shifted to the left by appending x2 0s at the right of x1. Since the internal representation of numbers is in binary format, this operation is equivalent to multiplying x1 by ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
3K+ Views
To build a block of matrix, use the numpy.block() method in Python Numpy. Blocks in the innermost lists are concatenated along the last dimension (-1), then these are concatenated along the secondlast dimension (-2), and so on until the outermost list is reached.Blocks can be of any dimension, but will ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
507 Views
To pack the elements of a binary-valued array into bits in a uint8 array, use the numpy.packbits() method in Python Numpy. The result is padded to full bytes by inserting zero bits at the end.The axis is the dimension over which bit-packing is done. None implies packing the flattened array. ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
385 Views
To compare and return True if an array is less than another array, use the numpy.char.less() method in Python Numpy. The arr1 and arr2 are the two input string arrays of the same shape.Unlike numpy.greater, this comparison is performed by first stripping whitespace characters from the end of the string. ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
142 Views
To join a sequence of arrays, use the numpy.stack() method in Python Numpy. The axis parameter specifies the index of the new axis in the dimensions of the result. If axis=0 it will be the first dimension and if axis=-1 it will be the last dimension.The function returns the stacked ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
64 Views
To return a list of the lines in the element, breaking at line boundaries, use the numpy.char.splitlines() method in Python Numpy. The 1st parameter is the input array.The keepends parameter suggests that the Line breaks are not included in the resulting list unless keepends is given and true. The function ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
130 Views
To create a record array from a (flat) list of array, use the numpy.core.records.fromarrays() method in Python Numpy. The datatype is set using the "dtype" parameter.It returns the record array consisting of given arrayList columns. The first parameter is a List of arraylike objects (such as lists, tuples, and ndarrays). ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
1K+ Views
A new array from the set of choices is constructed using the numpy.ma.choose() method in Python Numpy. Given an array of integers and a list of n choice arrays, this method will create a new array that merges each of the choice arrays. Where a value in index is i, ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
84 Views
To AND every element of a masked array by a given scalar value, use the ma.MaskedArray.__iand__() method in Python Numpy. Returns self&=value. A masked array is the combination of a standard numpy.ndarray and a mask. A mask is either nomask, indicating that no value of the associated array is invalid, ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
151 Views
To expand the shape of an array, use the numpy.expand_dims() method. Insert a new axis that will appear at the axis position in the expanded array shape. The function returns the View of the input array with the number of dimensions increased.NumPy offers comprehensive mathematical functions, random number generators, linear ... Read More