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

@cast for remaining n-1 dimensions, e.g, add noise to a tensor of column vectors #59

Open
prittjam opened this issue Oct 9, 2022 · 1 comment

Comments

@prittjam
Copy link

prittjam commented Oct 9, 2022

is there a way to achieve this with TensorCast?

add_white_noise(u::AbstractArray{T}, Σ::AbstractMatrix{T}) where {T<:AbstractFloat} = u + combinedims(rand(MvNormal(zeros(eltype(u),size(u,1)), Σ),size(u)[2:end]))
@prittjam prittjam changed the title tensor cast for remaining dimensions, e.g, add noise to a tensor of column vectors tensor cast for remaining n-1 dimensions, e.g, add noise to a tensor of column vectors Oct 9, 2022
@prittjam prittjam changed the title tensor cast for remaining n-1 dimensions, e.g, add noise to a tensor of column vectors @cast for remaining n-1 dimensions, e.g, add noise to a tensor of column vectors Oct 9, 2022
@mcabbott
Copy link
Owner

I'm not certain I know what this is doing, but in general everything in TensorCast needs to know ndims in advance. Have not explored how hard it would be to add some kind of A[i, j..., k] feature.

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

No branches or pull requests

2 participants