title: ValueError: all the input arrays must have same number of dimensions, (numpy error)
body: <pre><code>test = np.array([20, 21, 22, 23, 22, 21])
  test = test.astype(float)
  result = np.zeros((1,1))
  for i in range(len(test)-3):
      d = np.abs(test[i+3]-test[i])
      #print(d)
      v = 0
      for j in range(3):
          v = v + np.asscalar(
                  np.abs(test[i+3-j] - test[i+3-(j+1)]))
      out = d / v
      result = np.hstack((result, out))
  </code></pre>
  
  <p>I want the result of this code to be shape of numpy array like this -> (3,1)
  The normal output should originally appear as follows: [1, 0.333, 0.333]
  However, when I run this code, I got an error like the title.</p>