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

Don't do anything if converting to AbstractArray with correct eltype #101

Merged
merged 2 commits into from
Jul 29, 2019

Conversation

kleinschmidt
Copy link
Member

This PR adds a no-op convert method for when convert to an AbstractArray
with the same eltype as the PDMat. This is a workaround to support things like
static arrays wrapped in PDMats.

@ararslan
Copy link
Member

A test would be nice, perhaps something as simple as

X = PDMat((Y->Y'Y)(randn(Float32, 4, 4)))
@test convert(AbstractArray{Float32}, X) === X

@ararslan ararslan merged commit 77f9f84 into JuliaStats:master Jul 29, 2019
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.

None yet

2 participants