array - float64 to array - ndarray
Question: I am new to python, am not aware of data types.

I want the output to be in the form

    
    
    [[ 0.3120883 ]
     [ 0.36910208]
     [ 0.99886361]
     ..., 
     [-0.10729821]
     [ 0.08311962]
     [ 1.67302086]]
    

But currently my output is the form

    
    
    [-0.13562086 -0.11107482  0.1600553  ..., -0.3161786  -0.23419835
      0.45029903]
    

How to convert it?


Answer: You can
[`numpy.reshape`](http://docs.scipy.org/doc/numpy/reference/generated/numpy.reshape.html)
it to `(-1,1)` to get the result in the form you want. Example -

    
    
    narray = narray.reshape((-1,1))
    

Demo -

    
    
    In [19]: import numpy as np
    
    In [20]: narray = np.arange(10)
    
    In [21]: narray
    Out[21]: array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
    
    In [22]: narray.reshape((-1,1))
    Out[22]:
    array([[0],
           [1],
           [2],
           [3],
           [4],
           [5],
           [6],
           [7],
           [8],
           [9]])
    

Basically what you are doing is to change the shape of the array from
something like - `(n,)` to `(n,1)` , you do this by using
[`reshape()`](http://docs.scipy.org/doc/numpy/reference/generated/numpy.reshape.html#numpy.reshape)
, in it you can pass `-1` as one of the arguments. As given in documentation -

> `newshape` : int or tuple of ints
>
> The new shape should be compatible with the original shape. If an integer,
> then the result will be a 1-D array of that length. **One shape dimension
> can be -1. In this case, the value is inferred from the length of the array
> and remaining dimensions.**

