title: SyntaxError: invalid syntax astype('float32')[:limit] in python3
body: <p>This code runs in python2, but when I want run it in python3, appears this error : </p>
  
  <pre class="lang-py prettyprint-override"><code>    images, targets = data
      rng_state = numpy.random.get_state()
      numpy.random.shuffle(images)
      numpy.random.set_state(rng_state)
      numpy.random.shuffle(targets)
      if limit is not None:
          print "WARNING ONLY FIRST {} MNIST DIGITS".format(limit)
          images = images.astype('float32')[:limit]
          targets = targets.astype('int32')[:limit]
      if n_labelled is not None:
          labelled = numpy.zeros(len(images), dtype='int32')
          labelled[:n_labelled] = 1
  </code></pre>
  
  <p>What's then correct syntax in python3? </p>
  
  <pre><code>      images = images.astype('float32')[:limit]
               ^
     SyntaxError: invalid syntax
  </code></pre>