title: How to convert a list of variables into numpy arrays
body: <p>I have a number of variables being passed into a function, V1, V2, etc and i want to automatically convert these to numpy arrays in as few lines as possible. These variables will be lists of numbers and i have already checked that they are either a list or a numpy array already</p>
  
  <p>I have tried packing them in a list, i.e. <code>newlist= [V1, V2, . . .]</code> and then iterating over the list:</p>
  
  <pre><code>for i in range(len(newlist)):
      inputs[i] = np.asarray(inputs[i])
  </code></pre>
  
  <p>but this method only replaces the elements in the list with copies. 
  What i would like to do is convert each variable to an array as if i had performed the following operation:</p>
  
  <pre><code>V1 = np.asarray(V1)
  </code></pre>
  
  <p>If V1 is a list, it is an array after this statement, but i would like to avoid having to write as many of these statements as there are variables.</p>
  
  <p>thanks for your help</p>