numpy.zeros_like (array, dtype = None, order = & # 39; K & # 39 ;, subok = True): return an array of the given shape and type as a given array with zeros,
Parameters:
array: array_like input subok: [optional, boolean] If true, then newly created array will be subclass of array; otherwise, a baseclass array order: C_contiguous or F_contiguous Ccontiguous order in memory (last index varies the fastest) C order means that operating rowrise on the array will be slightly quicker FORTRANcontiguous order in memory (first index varies the fastest). F order means that columnwise operations will be faster. dtype: [optional, float (byDeafult)] Data type of returned array.
Returns :
ndarray of zeros having given shape, order and datatype.
Code 1 :

Exit:
Original array: [[0 1] [2 3] [4 5] [6 7] [8 9]] Matrix b: [[0. 0.] [0. 0.] [0. 0.] [0. 0.] [0. 0.]] Matrix c: [0 0 0 0 0 0 0 0]
Code 2:

Output:
Original array: [[0 1] [2 3] [4 5] [6 7] [8 9]] Matrix: [[0. 0.] [ 0. 0.]] Matrix: [0. 0. 0. 0. 0. 0. 0. 0.]
Links:
https://docs.scipy.org/doc/numpydev/reference/generated/ numpy.zeros_like.html # numpy.zeros_like
Notes:
Also, these codes will not work for online IDs. Please run them on your systems to see how they work
This article is courtesy of Mohit Gupta_OMG
As information protection continues to be a growing concern for businesses today, IT security certifications have become highly desirable, even as the number of certifications has grown. Now you can s...
12/08/2021
Learning to code is tremendous fun as you can get instant results, no matter how much more you have to learn. In fact, it’s such fun creating games and programs that it feels effortless once you’r...
23/09/2020
I have developed this book to investigate Mesosbased cluster development and integration. I found that data center operating system (DCOS; and it’s commandline interface [CLI]) was a natural progr...
10/07/2020
Mastering regular expressions by Jeffrey Friedl, 3rd edition. Regular expressions are an extremely powerful tool for manipulating text and data. They are standard features today in a variety of pop...
05/09/2021