title: I need to resample a np array with signal resample
body: <p>I have some .csv files with data of different lengths. I need to load some defined coloums, sort them and resample to the same length (100%). </p>
  
  <p>I have written som defined nested loops to sort the data, but the resampling function dosn't work in the end. </p>
  
  <pre><code>subjects   = ['S01_']
  conditions = ['Shoe1_', 'Shoe2_']
  trials     = ['Run_1', 'Run_2','Run_3']
  
  results_GRF_AP = np.empty(shape=(100,6))*np.NaN
  results_GRF_ML = np.empty(shape=(100,6))*np.NaN
  results_GRF_VERT = np.empty(shape=(100,6))*np.NaN
  
  results_AnkPower = np.empty(shape=(100,6))*np.NaN
  
  
  ind = 0
  for s, subject in enumerate(subjects):
      for c, condition in enumerate(conditions):
          for t, trial in enumerate(trials):
              ind += 1
              filename = path + subject + condition + trial + extension
              try:
                  data2 = pd.read_csv(filename,delimiter = ';')
                  data2=np.array(data2)
  
  
  
              except Exception as err:
                  print(filename, err)          
                  continue
              else:
                  print(filename, 'loaded')
                  pass
  
  
              threshold = 30 ## defined threshold value in Newton from vertical GRF
              signal = np.array(data2[:,4])
              indices_bigger_than_threshold = np.where(signal &gt; threshold)[0] # get item
              non_consecutive = np.where(np.diff(indices_bigger_than_threshold) != 1)[0]+1 # +1 for selecting the next
              first_bigger_than_threshold1 = np.zeros_like(signal, dtype=np.bool)
              first_bigger_than_threshold1[indices_bigger_than_threshold[0]] = True # retain the first
              first_bigger_than_threshold1[indices_bigger_than_threshold[non_consecutive]] = True
              indices_bigger_than_threshold = np.array(indices_bigger_than_threshold)
  
              GRF_AP = (data2[indices_bigger_than_threshold,2])
              GRF_ML = (data2[indices_bigger_than_threshold,3])
              GRF_VERT= (data2[indices_bigger_than_threshold,4])
              Ank_Power = (data2[indices_bigger_than_threshold,28])
  
  
  
              GRF_AP_Norm = signal.resample(GRF_AP,100)
              GRF_ML_Norm = signal.resample(GRF_ML,100)
              GRF_VERT_Norm= signal.resample(GRF_VERT,100)
              Ank_Power_Norm = signal.resample(Ank_Power,100)
  
  
              # talking one coloum from the loaded .csv file to store in the results parameter.  
              results_GRF_AP[:,ind-1] = GRF_AP_Norm
              results_GRF_ML[:,ind-1] = GRF_ML_Norm
              results_GRF_VERT[:,ind-1] = GRF_VERT_Norm
  
              results_AnkPower[:,ind-1] = Ank_Power_Norm
  </code></pre>
  
  <p>All the parts work individually, but in the loop i get an error abut 
  AttributeError: 'numpy.ndarry' object has no attribute 'resample' </p>
  
  <p>if i run from scipy import signal and then uses the resample on the loaded subject, condition and trial it works.</p>