Skip to content

Added setindex! for ColVecs and RowVecs with tests #196

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

Merged
merged 3 commits into from
Nov 30, 2020
Merged

Conversation

theogf
Copy link
Member

@theogf theogf commented Nov 27, 2020

PR to solves #195 by adding setindex!(X, v, i) to ColVecs and RowVecs

Copy link
Member

@willtebbutt willtebbutt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved subject to patch bump and addressing the style issue (the latter being optional)

test/utils.jl Outdated
@@ -1,7 +1,7 @@
@testset "utils" begin
using KernelFunctions: vec_of_vecs, ColVecs, RowVecs
rng, N, D = MersenneTwister(123456), 10, 4
x, X = randn(rng, N), randn(rng, D, N)
x, X, v, w = randn(rng, N), randn(rng, D, N), randn(rng, D), randn(rng, N)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
x, X, v, w = randn(rng, N), randn(rng, D, N), randn(rng, D), randn(rng, N)
x = randn(rng, N)
X = randn(rng, D, N)
v = randn(rng, D)
w = randn(rng, N)

I just find this easier to comprehend

@theogf theogf merged commit b355811 into master Nov 30, 2020
@theogf theogf deleted the add_setindex! branch November 30, 2020 12: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 this pull request may close these issues.

2 participants