title: Numpy slicing from variable
body: <p>I'm trying to slice a numpy array using a slice that is predefined in a variable. This works:</p>
  
  <pre><code>b = fromfunction(lambda x,y: 10*x+y, (5,4),dtype=int) # Just some matrix
  
  b[1:3,1:3]
  # Output:
  # array([[11, 12],
  #       [21, 22]])
  </code></pre>
  
  <p>But what I want to do is somthing like this:</p>
  
  <pre><code>slice = "1:3,1:3"
  b[slice]
  # Output:
  # array([[11, 12],
  #       [21, 22]])
  </code></pre>
  
  <p>It is not important to me what type the slice-variable has, I'm just using a string as an example. How do I save a slice-specifier like that?</p>