title: Python add 2 multidimensional numpy arrays
body: <p>I'm trying to collect/concat multiple <code>numpy</code> arrays in a single numpy array. I can do this with <code>pandas</code> data frame as: </p>
  
  <pre><code>df_train = pd.DataFrame()
  ... loop ...:
      df_temp = pd.read_json(file)
      df_train = pd.concat([df_train, df_temp], ignore_index=True, axis=0, sort=False) 
  </code></pre>
  
  <p>in a loop. With this I'm able to combine various data in a single data frame.</p>
  
  <p>What I want to do this is with numpy arrays. I tried the same thing as:</p>
  
  <pre><code>nump_train = np.nan
  ... loop ...:
      nump = df_temp.values
      nump_train = np.concatenate((nump_train, nump))
  </code></pre>
  
  <p>but I cannot concat zero-dimensional arrays as the error message says (ValueError: zero-dimensional arrays cannot be concatenated)</p>
  
  <p>How can I do this like in pandas?</p>
  
  <p>ps: I can solve this with a bad-written hard-coded code as:</p>
  
  <pre><code>w=1
  for loop:
      if w == 1:
          nump1 = sc.transform(df_temp.drop(['time'], axis=1))
      elif w == 2:
          nump2 = sc.transform(df_temp.drop(['time','trend'], axis=1))
      elif w == 3:
          nump3 = sc.transform(df_temp.drop(['time'], axis=1))
      w += 1
  X_train = np.concatenate((nump1, nump2, nump3), axis = 0)
  </code></pre>
  
  <p>Bu this bad coding and I cannot scale this in a loop.</p>
  
  <p>EDIT 1:</p>
  
  <p>Actual code is this:</p>
  
  <pre><code>w = 1
  
  for i in range(1, loop_size+1):
  
      df_train = pd.DataFrame()
      nump_train = np.nan
  
      random_list = random.sample(file_list, selection)
  
      for json in random_list:
          json_name = json[:json.index('_')]
          df_temp = pd.read_json(filedir + json)
  
          train_period_mask = (df_temp['time'] &gt; train_start_date) &amp; (df_temp['time'] &lt; train_end_date)
  
          df_temp = df_temp.loc[train_period_mask]
          df_temp.index = np.arange(0, len(df_temp))
  
  
          df_temp = calc_(df_temp)
          df_temp['trend'] = zg(df_temp, zg_ratio)
          df_temp['trend_shifted'] = df_temp.trend.shift(-1)
          df_temp = df_temp.dropna()
  
          nump = sc.fit_transform(df_temp.drop(['time','trend_shifted','trend'], axis=1))
  
          if w == 1:
              nump1 = sc.transform(df_temp.drop(['time','trend_shifted','trend'], axis=1))
          elif w == 2:
              nump2 = sc.transform(df_temp.drop(['time','trend_shifted','trend'], axis=1))
          elif w == 3:
              nump3 = sc.transform(df_temp.drop(['time_period_start','trend_shifted','trend'], axis=1))
  
          df_train = pd.concat([df_train, df_temp], ignore_index=True, axis=0, sort=False)
          nump_train.append(nump)
          w += 1
  
      drop_list = ['time_period_start']
      df_train.drop(drop_list, 1, inplace = True )
  
  
      start = timeit.default_timer()
      sc = MinMaxScaler()
      X_train = sc.fit_transform(df_train.drop(['trend','trend_shifted'], axis=1))
      X_train2 = np.concatenate((nump1, nump2, nump3), axis = 0)
      y_train = df_train['trend_shifted'].values
  </code></pre>
  
  <p>I want X_train and X_train2 to have the same shape. </p>