Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It seems `(Y @ X)[None]` produces a row vector of shape (1,3),

   (Y @ X)[None]
   
   # array([[14, 32, 50]])
   
but `(Y @ X)[None].T` works as you described:

   (Y @ X)[None].T
   
   # array([[14],
   #        [32],
   #        [50]])

I don't know either RE supposed to or not, though I know np.newaxis is an alias for None.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: