Home>
What are the differences in how numpy's twodimensional array is implemented?
a1 = np.arange (9) .reshape (3, 3)
a1 = np.arange (9) .reshape (3, 3)
I would like to tell you the difference between the two. Is it necessary to write these separately?

Answer # 1
Related articles
 python  difference between pandas dataframeplotbar and dataframeplot (kind = bar)
 python 3x  difference between your own code and the correct code
 python  what is the difference between the two jupyter kernels generated by conda?
 what is the difference between environment variables in python and environment variables that can be seen in system> system
 ruby on rails 5  i don't understand the difference between model and controller methods
 unity  difference between camera coordinates and visible position
 [python] i want to draw the error between two graphs and cos (x)
 python  i want to store a 3d array in an array using numpy
 java  i want to find the time difference between two values of timestamp type
 difference between lowlevel i/o function and highlevel i/o function
 python  i want to collate and extract dates between two tables with sqlite
 windows  about the difference between the disk image file size of hyperv and the drive capacity size in the vm
 i don't understand the difference between = and === in javascript
 c:about the difference between% d and% f
 what is the difference between array segment and memory in c #?
 typescript  i don't know the difference between the types'subject ' and'number'
 python  numpy import
 reactjs  difference between gatsby's habit and react
 difference between export gopath = $home/go and export gopath = $home/go
 html5  difference between h tag and header tag
Related questions
 python : Implementing SVM from scratch using pytorch
 python : Attempt to get argmax of an Empty Sequence ARGMAX value remains empty and can not be executed.
 python : How to add to the matrix column numbers
 python : How to create a random twodimensional array NUMPY?
 python : How to find out the coefficients of a piecewise line function during the approximation of the sample?
 Using the symbolic variables matrix in Python
 python : NUMPY column names
 Python, NUMPY How to implement this algorithm?
 python : VWAP calculation, ends with RAM, the code is performed too long
 python : Summation by Vector NUMPY Indexes
The former is an unacceptable calling method in the specification and should be written as reshape (3, 1).
Source:: numpy.reshape — NumPy v1.17 ManualBoldis the quote
After answering the question, read it a little.
Main topicA question about the difference between the two.
Speaking only the results,neither will change.
The former goes through an extra process to determine an undetermined value, but there is almost no difference in the measurement.
Execution resultpaiza.io
Wouldn't it be better to use one that you think is easy to understand?
Why does reshape (3, 3) work?Because the implementation uses dimensions [i]<0 instead of dimensions [i] == 1
numpy/shape.c at v1.17.4 · numpy/numpy · GitHub