Up vector help (Maya)

I was wondering how in maya to get the up vector of an object from it’s ws rotation. It looks like I can query the xform worldspace matrix of an object, but it returns a whole bunch of numbers. Is the up vector sitting in there somewhere? Thanks!

don’t use the rotation, since you’d have to de-eulerize it. Get the matrix and get items [4][5][6]. The local x vector is [0][1][2] and the local z is [8][9][10]. However those vectors are not guaranteed to be normalized, so if you need them to be real vectors you need to normalize them yourself.

Thanks!