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

Less restrictive types for reconstruct #139

Closed
Kolaru opened this issue Feb 9, 2021 · 2 comments
Closed

Less restrictive types for reconstruct #139

Kolaru opened this issue Feb 9, 2021 · 2 comments

Comments

@Kolaru
Copy link
Contributor

Kolaru commented Feb 9, 2021

Currently reconstruct for PCA have the following signature:

reconstruct(M::PCA{T}, y::AbstractVecOrMat{T}) where {T<:Real}

This can be slightly annoying if the PCA was fitted with Float32 (e.g. data loaded from some file for which it is standard) and then the y is generated independantly thus being Float64 and leading to MethodError.

Could these kind of restrictions be lifted? If yes I'll look into a PR for it.

@wildart
Copy link
Collaborator

wildart commented Feb 9, 2021

Sure, transform & reconstruct can be mended to accept different parameter types. If you up to, PR is always welcome.

@wildart
Copy link
Collaborator

wildart commented Mar 13, 2021

Thanks for fix.

@wildart wildart closed this as completed Mar 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants