Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

euler2mat documentation says it can return 4x4 #34

Closed
FSund opened this issue Sep 3, 2020 · 2 comments · Fixed by #35
Closed

euler2mat documentation says it can return 4x4 #34

FSund opened this issue Sep 3, 2020 · 2 comments · Fixed by #35

Comments

@FSund
Copy link
Contributor

FSund commented Sep 3, 2020

According to the transforms3d.euler.euler2mat documentation it returns

mat : array-like shape (3, 3) or (4, 4)

But as far as I can see it will only return 3x3.

    M = np.eye(3)
    if repetition:
        M[i, i] = cj
        M[i, j] = sj*si
        M[i, k] = sj*ci
        M[j, i] = sj*sk
        M[j, j] = -cj*ss+cc
        M[j, k] = -cj*cs-sc
        M[k, i] = -sj*ck
        M[k, j] = cj*sc+cs
        M[k, k] = cj*cc-ss
    else:
        M[i, i] = cj*ck
        M[i, j] = sj*sc-cs
        M[i, k] = sj*cc+ss
        M[j, i] = cj*sk
        M[j, j] = sj*ss+cc
        M[j, k] = sj*cs-sc
        M[k, i] = -sj
        M[k, j] = cj*si
        M[k, k] = cj*ci
    return M

Is this an error in the docs, or the code, or is there something I'm not seeing?

@matthew-brett
Copy link
Owner

Oops - yes - looks like a documentation error. Do you have any interest in a little pull request to fix that?

@FSund
Copy link
Contributor Author

FSund commented Sep 3, 2020

Sure!

matthew-brett added a commit that referenced this issue Sep 3, 2020
MRG: Documentation error in transforms3d.euler.euler2mat

Fixes #34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants