code: def batchify(data, batch_size):
      
      nbatch = data.shape[0] // batch_size
      data = data[:nbatch * batch_size]
      data = data.reshape((batch_size, nbatch)).T
      return data
docs: Reshape data into (num_example, batch_size)