How to build a shape Matrix with Numpy
This article introduces the knowledge of "how to build a shape matrix with Numpy". Many people will encounter this dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Construct a matrix whose shape is (6, 7, 8), and find the index value of the 100th element.
Import numpy as np
Z = np.unravel_index (100,6 and 7) print (z)
Print the results:
(1, 5, 4) this is the end of "how to build a shape Matrix with Numpy". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!