reshape python

Solutions on MaxInterview for reshape python by the best coders in the world

showing results for - "reshape python"
Dario
14 Mar 2016
1>>> np.reshape(a, (2, 3)) # C-like index ordering
2array([[0, 1, 2],
3       [3, 4, 5]])
4>>> np.reshape(np.ravel(a), (2, 3)) # equivalent to C ravel then C reshape
5array([[0, 1, 2],
6       [3, 4, 5]])
7>>> np.reshape(a, (2, 3), order='F') # Fortran-like index ordering
8array([[0, 4, 3],
9       [2, 1, 5]])
10>>> np.reshape(np.ravel(a, order='F'), (2, 3), order='F')
11array([[0, 4, 3],
12       [2, 1, 5]])
13
Sara
22 Apr 2016
1np.reshape(a, (2, 3)) # C-like index ordering
2array([[0, 1, 2],
3       [3, 4, 5]])
4np.reshape(np.ravel(a), (2, 3)) # equivalent to C ravel then C reshape
5array([[0, 1, 2],
6       [3, 4, 5]])
7np.reshape(a, (2, 3), order='F') # Fortran-like index ordering
8array([[0, 4, 3],
9       [2, 1, 5]])
10np.reshape(np.ravel(a, order='F'), (2, 3), order='F')
11array([[0, 4, 3],
12       [2, 1, 5]])
Cece
10 Aug 2017
1>>> np.reshape(a, (3,-1))       # the unspecified value is inferred to be 2
2array([[1, 2],
3       [3, 4],
4       [5, 6]])
5
Liam
23 Aug 2018
1>>> a = np.arange(6).reshape((3, 2))
2>>> a
3array([[0, 1],
4       [2, 3],
5       [4, 5]])
6
Sophia
02 Aug 2017
1numpy.reshape(a, newshape, order='C')
queries leading to this page
cv reshapehow to reshape numpy matrixreshape 28 1 2c 1 29array reshape 281 2c 1 29 pythonhow to reshape an array in pythonreshape 28 1 1 29 sklearnpython array reshape 28 29reshape 281 2c 29reshape a vector pythonlibrary reshapearray reshape 28 1 1 29reshape 281 1 29array reshape numpypython array reshape 28 28 29 29reshape 28 1 2c3 29numpy matrix reshape possible reshape 28 1 2c 1 29numpy reshape orderreshape 28 29 function in numpy array python isreshape 28 1 2f1 29reshape numpy documentationhow does np reshape workknumpy reshape 28 1 2c 1 2c 2 29np reshape usagefunction reshapenumpy reshape cannot reshape array of sizereshape in np arraynumpy how to reshape matrix pythonchange shape of array pythonpython reshape modulereshape image numpy arrayhow to use reshae numpynumpy x reshapehow to reshape image in numpynumpy reshape inplacewhat does 1 in reshape does in pyhtonpythin reshape numpy reshape 1 whatdoes it doarray reshaping in pythonnumpy reshape vectornumnpy reshapenumpy reshape 28 27 29reshape 28 29 in pythonnumpy inplace reshapepython array change shapepython reshape array to tupple with none reshape pythonreshape np array of arrays to tensorfnumpy reshape 22 1 22 meaninghow to reshape numpy arraynp reshape 1in numpy reshaping arrays mean 3fhow does python reshape workarray reshape pythonreshape 28 1 1 29 pythonreshape data reshapereshape 28 1 29 pythonreshaping a numpy listimage reshapereshape numpy ndarray examplepython reshape array of size 1numpy reshape argumentsreshape pythonwhat does values reshape do in pythonnp reshape in pythonpython reshape numpy ndarray 27python ndarray reshape reshape 28 1 1 29 in pythonim reshapebox labels 3d np asarray 28box labels 29 reshape 28df cm shape 5b0 5d 2cdf cm shape 5b1 5d 29what does reshape doesreshape function in python examplepython reshape 28 1 29reshape 28 29 modulex reshape in pythonlist reshape reshape a matrix in pythonwhy do we use reshape 28 1 2c1 29np reshape examplemodified dataset 3d np reshape 28dataset 1 5b 27samples 27 5d 2c 2850000 2c784 29 29numpy array reshape reshape 28 29reshjape numpy arrayreshape function in pythonnumpy reshape variable number of columnsnumpy resha 5behow to reshape pythonnp array reshape to none 2a 50np reshape 28 29reshape 28 1 2c1 29rearrange shape of arraypython reshape 1correct syntax of the reshape 28 29 function in numpy array python is return type of reshape in numpyhow does numpy reshape workcreate an empty array python reshapenumpy view reshapenp reshape arraya 3d a reshape 281 2c 1 29reshape the matrix pythonnumpy reshape 28 1 2c1 29reshape function in numpyreshape array numpynumpy rehapepython numpy reshape 1nummpy reshape reshape 28 1 2c 1 29np reshape with 1function reshape pythontorch reshapecorrect syntax of the reshape 28 29 function in numpy array python isreshape python pandas numpy reshape by axisnumpy reshape rulesnump reshape arraypython np reshape reshape 28 1 2c1 29 what does it do reshape java numpynumpy reshapereshape 28 1 2c224 2c224 2c3 29how to use reshape pythonreshaape python reshape pandasreshape array in python using numpynumpy reshape functionpython reshape 28reshape array with 1rehaping numpy ndarrayreshape image pythonx reshape pythoneval numpy array pythonnupy reshapereshape python listnumpy reshape change orderhow to reshape nompy arrayconvert a matrix to a specific diemnsion pythonnumpy matrix reshapereshape 28 1 2c 1 29np array reshape trckreshaping arrays in pythonpython numpy reshapenumpy respahepreshape numpy 3dreshape python numpy arraynp reshape in numpycorrect syntax of the reshape 28 29 function in numpy array in python iswhat does reshape 28 1 1 29 how to reshape arrayreshape array to matrix pythonreshape np ndarraynp reshape 28image 2c 28 1 2c1 29 29numpy reshape and fillimport reshape pythonnumpy array reshape 1 1np reshape 281 2c 1 29reshape a numpy aarraynp array reshapenp array reshape reshape in sklearnnumpy reshape manualreshape 28 29 function in numpy array pythonreshape python 1reshape matrix to vector numpynp reshape 28 1 2c1 29reshape 28 1 2creshape 281 1 29 in numpynumpy reshape methodreshape array pythohwhat is reshape 281 2c 1 29 reshape 28 1 1 29 pythonnumpy change array to matrixwhat is reshape 28 1 1 29 2bpythonreshape array python 0what is reshape 281 2c 1 29 in pythonnumpy reshape variable dimensionreshaping a matrix to a vector in pythonnp array 28x 29 reshapepandas reshape ndarraynumpy array and reshapenp arry reshapeimage reshape in numpynp reshape in placedoes np reshape returnnp reshape 28 1 2 29numpy sreshapereshape sympy reshape y to be a rank 2 matrix using y reshape 28 29reshape parameters in python 3fnp reshape 28 1 2c 1 29numpy array change dimensionnp array reshape 28 1 1 29reshape array pythonvalues reshaperavel reshape pythonpython3 reshape 28 29library 28reshape2 29reshape an np array fr reshape 286 2c 29numpy reshape pythonresize e reshape numpyreshape 1 python reshape 281 1 29numpy reshape 1 2c1reshape list reshape 281 2c 1 29python reshape arrayhwo ot reshape an arrayreshapearray pythonnumpy rehape pythonnp array reshape 28 1 2c1 29python arrayproxy reshapedata reshapedefine reshapereshape 281 2c 1 29numpy reshape arrayreshape 28 1 29 in pythonpython reshparepython numpy array reshapereshape npreshape pyhtnp reshape orderuse of reshape in python np reshape 28 a 2cm 2an 2c order 3d 27f 27 29np reshape 1drange and reshape in numpycorrect syntax of reshape in pythonpython numpy array convert shape 281 2c 29 into 281 2c1 29python reshapewhat reshape 28 1 2c1 29 does24 element matrix reshape in numpypython values reshape 28 1 1 29is reshape a numpy functionnumpy reshape image 22np reshape 22array reshape 281 2c 1 29numpy change dimensionnumpy reshape 2d to 1dreshape arguments pythonreshape method in numpypython array reshape purereshape python 1 1reshape methodreshape python imagereshape list in array pythonresize and reshape in numpyreshape 28 1 29 3freshape method in pythonpython array reshapereshaping an array in pythonreshape in pythonhow reshape works in pythonreshape 28 1 2c 1 29 3freshape 28 1 2c 1 29 vs reshape 281 2c 1 29numpy reshape 281 2c 1 29reshape pythomreshape 28a 2c 29 to 28a 2c1 29 nppandas reshapenumpy reshape and resizearr reshapereshape 28 28 1 2c1 2c2 29 29ndarray reshapenp reshapenp reshape 1reshape function 1reshape python 1 1reshape 1d numpy arraynp reshape whataray reshapereshape an array numpy in placenp reshape numpyuhow to write a function for numpy array to reshape arrayreshape 28 1 29 meansreshape function in python numpyreshaping a numpy arrayreshape 28a 2c 29 to 28a 2c1 29numpy reshapeuse of reshape 28 1 2c1 29python arrays using reshapereshape in python docsreshape and resize in numpy reshapereshape 281 2c 1 29python values reshapenp reshaereshape 28 1reshape sympy matrixnp reshape 28 1 29numpy reshape np arrayhow to reshape a numpy ndarrayhow to custom reshape pythonnp reshape 28 1change shape of a np arrayreshape data pythonmatrix reshape pythonnp array reshapenp reshape documentationreshape ndarrayreshape function in python matplotlibnumpy reshape with typenumpy re arraypython array reshape 281 2c 1 29rehsaping an np arrayemprego pythonnp reshape 28 1 2c 1 29reshape pyhtonnp reshape 1reshape 28 1 2c1 29 in python what does it meana1d array to 3d array pythonreshaping an array numpy 5b 3a 2c 3a 2c 3a3 5d python reshapereshape 28 2c 1reshape python datasethow to reshape arraysarray reshape in pythonreshappe python matrixreshape with treason of reshape function in numpynumpy 2c reshapereshape matrix to array python reshape in pythonreshape 28 5b2 2c3 5d 29reshape 281 2c 1 29 numpyhow to reshape list in pythonpython reshape 28 1 1 29reshape pyhton numpynumpy reshape 281 2c 1 29numpy reshaoewhich function is used for reshape a numpy array in python 3freshape sklearnreshape 28 1 2c 29python resha 5benumpy reshape if possiblehow to rehsape an arraynumpy reshape 3breshape a np arrayhow to reshape a numpy array within a numpy arraya reshapenp reshape apiarray reshape in numpynp reshape 28 29 pythonnumpy reset shapenumpy reshape in placepython resharpreshape a tensor into a vector in numpynumpy reshapre arrayreshape an np arraymatplotlib reshapereshape to a variable length matrix numpyreshape in pandasreshape 28a 27 2c1 2c 5b 5d 29array to 2d array pythonnumpy reshape explainedhow does reshaping array in pythonpython array reshape 28 1 2c 1inplace reshape numpyreshape imagen nympy arrayreshape data 28 1 2c1 29how do the reshape function workds in pythonreshape python arraynumpy reshpe 28 29python reshape 28 29 reshape 281 1 29 pythonnp reshape vs array reshapenumpy reshape 28n 29 to 28n 1 29reshaping large matrice pythonreshape of list pythonnumby reshapereshape numpy examplenp reshape does not have the orderpython change array shape reshape 28 2c5 29 in pythonpython reshape methodwhat does reshape 28 1 1 29 dopandas reshape pythonnumpy reshape 22 1 22reshape 28 1 2c224 2c224 2c3 29 orreshape an array pythonwhat does reshape 28 1 2c 1 29 reshape 281 2c 2 29what is reshape 281 2c 1 29 pythonhow to reshape the data in pythonresize reshape numpy arrayreshape pytonwhat is 288 2c8 29 numpy reshape arrayreshape numnp reshape 28 1 1 29np reshapnumpy reshape 1 meaningfonction reshape pythonvalues reshapehow to reshape a numpy arrayarray reshape in pythonpytorch reshape reshapeb reshape 283 2c4 29 3breshape 28 1 29np reshapereshape 28 28 1 2c3 29 29how to use reshape in numpyreshape nparraypython matrix reshapetraining data reshape method in pythondataset reshape pythonreshape vector numpyvalues reshape 28 1 1 29np asarray reshapenumpy array reshape 28 1 2c 1 29np arange 289 29 reshape 283 3 29numpy reshapereshap numpy functionhow to change shape of matrix in pythonnumpy array reshpaingreshape in python numpy using np reshape 28 1 1 29what does reshape doreshape 28 1 2c 1 29reshape pandashow to use reshape in python for listtrain reshape 28 29how to use reshape numpypython how to reshape arraynumpy array 28list 29 reshape what it doeswhat is reshape 28 1 1 29array reshape 28 1 1 29 numpyreshape matrix in pythonnp reshape in different axiswhat does reshape 28 29 do 3fnp array reshape tricknumpy e 3dreshapepython string list reshapenp reshape number of rows pythonreshape your data either using array reshape 28 1 2c 1 29 if your data has a single feature or array reshape 281 2c 1 29 if it contains a single sample numpy shaep row columnshow to reshape numpy ndarray in pythonnp reshape pythonhow can i reshape array from 28m 2c 29 to 28m 2c1 29python array vs reshape reshape 28 1 2creshape numpy 28x 2c 29np reshape 281 2c 1 29ply reshape in pythonreshape 28a 2c 282 3 2c3 29 29numpy reshape 2f 2fnumpy reshape 28 1 2c1 29change the shape of a value pythonreshape 28 29 dans pythonnumpy reshareshape matrix in numpynp reshapwhat is the use of reshape in pythonhow to reshape numpy array to 1dvariable reshape numpyreshape a list python reshape 28 29 pythonreshape rank 0 numpy arraynumpy reshape 28 1 2c nonewhat is reshape 28 1 1 29 in pythonresape arraynp reshape vs array reshapenp reshape examplechange array dimentionreshape np with default valuewhat is reshape 28 1python numpy reshape vectornumpy reshape 1what does reshape acceptreshape python 281 1 29numpy rescale reshape 28 1what is reshape function in pythontf reshape 1what is np reshape 2810 29reshape matrix npnp arange 28 29 reshapereshape 28 1 2c1 29 treshape array implementationreshape 28 29 function in pythonnumpy array reshapev reshape 28 1 2c 1 29 numpyhow to reshapoe an np arrayautomatic reshape 23 reshape y to be a rank 2 matrix using y reshape 28 29np reshape 28 1 2c 1 29 do 3fhow does np array reshape worknop reshapedata reshape pythonpython reshape change x and ynp reshape2reshape array in numpynp array reshape 289990 2c 10 2c 3 29 to 2810 2c3 29 in phtyon reshape 28 1 1 29 pythonnp reshape means reshape numpyreshape matrix to fit another pythonnumpy ndarray reshapehow to reshape the array in pythonreshape function in pandasnumpy reshape how does it workimg reshapenumpy array reshape 28100 2cho wto reshape numpy arraynumpy reshape why we need itreshaping numpyreshape list python without numpyreshape np orderreshape 28 2c 1 29list reshape in pythonarray reshape numpynp resize vs reshapereshape pyhton nupmy how does reshape 28 29 works 3fnp reshape 28 1 29reshape as npnumpy reshape examplepython np reshapepython reshape 28 1 1 29reshape array and rankhow do i reshape a numpy array pythonreshape array reshape python pytourchhow to reshape ndarray in pythonnumpy reshape arrayreshape python matrixhow to reshape array numpynp array reshapehow to reshape array in pythonreshape 281 1 29 pythonnumpy reshape vector 28 2c1 29nparray reshapea reshape 281 2c 1 29reshape numoy arrayreshape in npreshape 28 1 1 29 numpyhow does np reshape worknumpy reshape automaticreshape array pythonnd array reshapepython how to reshape a matrixnp 2creshape 28data 2c 28 1 2c 29np array reshape 28 1 2c1 29how to do reshape in pythoncorrect syntax of the reshape 28 29 function in numpy array python is e2 80 93what does 1 in reshape mean in numpynp array 28trial answers 29 reshape 28none 2c1 29np rshapenumpy reshape c2 b6view vs reshape numpylist reshape pythonnumpy array reshapenumpy reshape ndarrayresize vs reshape numpy reshape 28n 2c 1reshape python numpyhow to reshape a data in pythonnp reshape 5creshape array pytnoreshaping array in pythonreshape using pythonhow to use reshape in pythonreshape matrix pythonreshape image numpyreshape array in pythonrershape pythonhow to reshape data using array reshape 28 1 2c 1 29reshape 28 28 1 2c 1 29 29reshape 28 1 1 29 in numpyreshape image pytohnreshape python functionreshape 28 2c 1 29reshape images python numpy arrayusing reshape in pythonhow to change shape in pythonpython reshape nureshape 1 numpyreshape 28 1 1 29 python meanswhen do we use reshape and when do we use arrayreshape 284 2c4 29 to 284 2c 29 numpyreshape 28 1 29 numpyreshape 5b0 5d numpynp reshape in pythonreshape matrix sympy reshape 28 1 2c1 29how to convert single dimensional array in 3 dimensionnp change shapereshape data pythonvalues reshape in pythonnumpy array reshape explaiedhow can i reshape array from 28m 2c 29 to 28m 2c1 29 in pythoncv reshapehow to reshape a numpy array in pythonnumpy reshape 28 29how to reshape an array column wise in pythonwhat does values reshape do reshape 28 1 1 29 in pythonwhat does reshape 28 1 2c 1 29 do to the matrix in numpy 3freshape image python numpyreshape function in python 27reshape 28 29 numpynumpy reshape in axis 1change shape numpy arraya reshape pythonnumpy reshape syntaxreshape python np arrayreshape 28a 27 2c 5b 5d 2c1 29med reshape pythonreshape list in pythonnparray reshapenp array reshape 1numpy reshape reversereshape index pythonnp reshape arraynumpy reshpaereshape numpy array to 1dnumpy reshape to column cannot reshape string numpynumpy reshape fucntriuonreshape in numpynumpy reshape to selfnp reshape 281 2c 1 29 meansreshape the npsyntax of reshape function in numpypython3 reshape 281 1 29 pthon reshapereshape 28 1 1 29 function in pythonreshape numpy operationmatrices in python numpy reshapereshape dimension numpynn reshape reshape 28 1 2c28 2c28 2c1 29reshape 281 1 29 pythonreshape 283 2c 1 29numpy array reshape 2d to 1dwhat is reshape 28 1 2c4 29np arange reshapereshape 28 1 1 29 explanationnumpy reshape axisreshape numpy 1 index meaningreshape arrayreshape 28 29 pythonhow to reshape in pythonnumpy matrix to array reshapereshape 28 2c 28 1 2c1 29 29reshape 28 1 1 29python numpy reshape examplepython list reshapehow does reshaping numpy arrays workpython reshape 2cset shape of existing numpy arrayreshape numpy array without reshape methodreshaping numpy arrayreshape list pythonnumpy reshape in pythonhow to use reshape for an array in pythonreshape 28a 27 2c1 2c 5b 5d 29reshape 281 2c6 29numpy array rshapingnumpy reshape why we eed itnp reshape vs reshapereshape 28 1 2c 1 29 meansreshape 281 1 29 in pythonin place reshape numpynp array reshape pythonhow to reshape a np arrayreshape array of arrays numpypython reshapenp asarray reshapereshape 28 2c 2c 2c 29how to use reshape in python for arraywhat do you use reshape 28 1 2c 1 29numpy array reshapingpython array into 2d arrayhow to use numpy np reshapenumpy reshaping an arraynp reshape 28a 2c 283 2c 1 29 29reshape in numpy purposereshape function pythonreshape 3 2c 1 numpynumpy reshape 5chow numpy reshape worksconvert numpy array reshapepython numpy matrix reshapereshape 28 1 2c 3 29what does reshape 28 1 1 29 donumpy array reshapepython reshape numpy arrayarr reshape pythonnumpy reshape 28shape 2c array name 29np reshape 28 1 2c2 29numpy reshape 28 1 1 29np reshapenumpy reshape 2d arraynumpy array reshape 28 29reshape pandas arrayreshape is in which module of python reshape 28x 2cy 2cz 29 in pythonnumpy reshape 28 1 1 29how to reshape numpy array from 4dreshape 28 1 2c1 29np reshape 1how to reshape back numpy arraytorch reshapepy numpy reshapenumpy array reshape examplecv2 reshapereshape functionnp array reshapenumpz reshapenumpy reshape documentationndarray reshapereshape matrix numpymatplotlib reshape pythonreshape 28 1 2c 1 29 pythonwhat is reshape in pythonreshape 28 1 2c x 29reshape 281 2c 1 29reshape in python 3reshape in python pandasreshape numpypyhton reshape a listnumpy reshape 3d arrayreshape syntax in pythonnumpy reshape vs resizereshape numpy 281 2c 29numpy list reshapem 3d np array 28m 29 reshape 28x shape 29reshape image array pythonpython reshape listarray reshape pythonreshape change data numpyhow to reshape numpy arraysnp reashapelist reshape numpyarray reshapewhat does reshape 281 2c2 29 doreshaping in numpynumpy array dimension reshape to 1dhow to reshape in numpyarray reshape 28 1 1 29 pythont reshape 28 1 2c 2 29reshaping an array in numpyreshape numpxnp reshape 28numpy undo reshapereshape 281 1 29how to use numpy np reshapevalues reshape 281 2c 1 29reshape numpy specific valuewhat reshape method pythonpython reshape your data either using array reshape 28 1 1 29python change the shape of numpy arraynp array 28 29 reshape 28 29np reshape imagemeaning of 1 in reshape in pythonnp reshape 1 1reshapy pythonwhat does reshape 28 1 1 29 function doestrain reshapereshape a numpy array pythonnumpy ndarray reshape 28 29numpy reshape 1 3fhow to reshape vector in python reshape 28 1 2c 1 29 isnumpy reshapewhat is reshape 28 1 1 29np reshape orderhow to reshape a matrix in pythondata reshapewhy use np reshape 281 2c 1 29 numpy how to reshape arraynumpy change shapepython reshape operationarr reshape 3 1 shapearray reshape 28 1 1 29 syntaxchange shape of numpy arrayreshape paythonpython reshape sourcenumpy reshape array vectormnumpy reshapereshape in python numpyreshape a matrix using numpyreshape numpy arraysnumoy reshapereshape 28 1 2c2 29reshape in numpy pythoncreate numpy array reshapey reshape 28 1 1 29numpy change shape from 2 2c to 2 2c1numpy reshape with 1nupmy reshapereshape train data pythonreshape of array in pythonvalues reshape 28 1 2c1 29reshape array numpy pythonhow to reshape np arrayarray reshapereshape 28 1 2c1 pythonnp how to reshape an array to a matrixconvert shape of array from 1 to 3reshape an array in pythonnumpy reshape a chartformula reshape in pythonnp reshape 28y 2c 28 1 2c1 29 29np reshape without numpyreshaping the array in numpyimage reshapereshape arrays numpychange shape of array npreshape on axis numpyreshape column numpynp reshape 5b0 5d pythonx reshape 28 28 1 2c1 29 29reshape listreshape 28 29what does array reshape function in pythonhow to reshape array in numpynumpy reshape simple algorithmpython reshape functionwhat does np reshape meanreshape vs resize numpynp array set shapereshape array python numpytorch reshape vs numpy reshapereshape 28 1 29 method in pythonreshape documentationreshaping python np reshape reshape in pyrhonhwo ot reshape an array in numpyhow does reshape py workhow does numpy reshape worknp mean reshapenp arange reshapereshape 28 1 1 29 reshape 28 1 1 29 22 reshape 28 1 2c 1 29 22array reshape 28 1 2c 1 29how does reshape work in pythonreshape numpy arraynumpy ndarray reshapenp reshape axisghow to reshape araay in pythonways to reshape numpy arrayspython reshape array to 2dnumpy reshape to 1 dimensionpython reshape matrixreshape a list in pythonreshape numpy ararynp reshape syntaxprint matrix python reshapenumpy reshapingcorrect syntax of reshape function in numpy array pythonfunction reshape in pythonreshpae numpy arrayreshape array in place np pythonnumpy reshape 28 29 reshape 281 2c 1 29tf reshapenp reshape stablereshape numpy array dimensions reshape 28 1 29numpy array reshape 28 1 1 29python array reshapenumpy reshape example pythonnumpy reshaphow to reshape matrix in pythonreshape numpy array in pythonchnage array shapenp array reshape functionreshape numpy arratpython programm to reshape a reshape 281 2c 1 29reshape an array with nothing in it numpy 1 in np reshapenumpy reshape 28 1 29how does reshape work pythonreshape a numpy arraywhat does 1 in np reshape doreshape to one dimension pythonex1 3d np reshape 28vect1 2c 1 2c1 29numpy reshapereshape np arraynumpy reshape 1array reshape 281 2c 1 29python arrange reshapereshape numpy array pythonreshape python