title: Pytorch median - is it bug or am I using it wrong
body: <p>I am trying to get median of each row of 2D torch.tensor. But the result is not what I expect when compared to working with standard array or numpy</p>
  
  <pre><code>import torch
  import numpy as np
  from statistics import median
  
  print(torch.__version__)
  &gt;&gt;&gt; 0.4.1
  
  y = [[1, 2, 3, 5, 9, 1],[1, 2, 3, 5, 9, 1]]
  median(y[0])
  &gt;&gt;&gt; 2.5
  
  np.median(y,axis=1)
  &gt;&gt;&gt; array([2.5, 2.5])
  
  yt = torch.tensor(y,dtype=torch.float32)
  yt.median(1)[0]
  &gt;&gt;&gt; tensor([2., 2.])
  </code></pre>