Main menu

Skip to content
  • About
  • Basic Markup
  • import cv2 #Notes
  • template.py

The Python Path

"Because the geeks shall inherit the properties and methods of object Earth" -heard on Slay Radio

RSS

Tag Archives: skew-symmetric

skew matrix with numpy operations

Posted by Wujie of Dasheshire on September 4, 2012

As an alternative to plugging values into [[0,-c,b],[c,0,-a],[-b,a,0]], i tried using numpy operations. This is very slightly faster than the above.

def skew(v):
    if len(v) == 4: v = v[:3]/v[3]
    skv = roll(roll(diag(v.flatten()), 1, 1), -1, 0)
    return skv - skv.T
2 Comments Posted in Uncategorized Tagged numpy, skew-symmetric

StackOverflow

profile for user6811 at Stack Overflow, Q&A for professional and enthusiast programmers

Archives

  • July 2017
  • May 2017
  • May 2014
  • September 2013
  • April 2013
  • February 2013
  • October 2012
  • September 2012
  • August 2012
  • July 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • December 2011
  • November 2011
  • October 2011

Blog at WordPress.com.

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Subscribe Subscribed
    The Python Path

    Have a WordPress.com account? Log in now.

  • The Python Path
    View site in Reader
    Manage subscriptionsSign upLog in
    Report this content
    Collapse this bar
Create your own website, free on WordPress.com.Create your own website.
Start free