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

Small fix for to_vec(::Adjoint) and to_vec(::Transpose) #131

Merged
merged 2 commits into from
Jan 3, 2021

Conversation

willtebbutt
Copy link
Member

At present, to_vec(randn(5)')[2](randn(5)) produces an Adjoint whose parent is a Matrix, rather than a Vector. While this doesn't generally seem to be too problematic, it recently caused me an issue with some AD testing code. Regardless, it doesn't feel like the natural thing to do.

This patch changes this behaviour to produce an Adjoint whose parent is a Vector. Same for Transpose.

@willtebbutt willtebbutt merged commit e6e2573 into master Jan 3, 2021
@willtebbutt willtebbutt deleted the wct/fix-Adjoint-vec branch January 3, 2021 16:39
@willtebbutt willtebbutt mentioned this pull request Jan 5, 2021
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 this pull request may close these issues.

2 participants