From aceca0fac67f941ef2f3bcfe4a99f043d2d76d59 Mon Sep 17 00:00:00 2001 From: alecloudenback Date: Sat, 3 Feb 2024 10:42:58 -0600 Subject: [PATCH 1/3] Remove erroneous docstring and point user to the alternative that works. Closes #93 --- src/larray.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/larray.jl b/src/larray.jl index 3416618..03e623b 100644 --- a/src/larray.jl +++ b/src/larray.jl @@ -271,11 +271,11 @@ A = @LVector Float64 (:a, :b, :c, :d) A .= rand(4) ``` -On the other hand, users can also initialize the vector and set its values at the -same time: +To initialize the vector and set its values at the +same time, used [`@LArray`](@ref) instead: ```julia -b = @LVector [1, 2, 3] (:a, :b, :c) +b = @LArray [1, 2, 3] (:a, :b, :c) ``` """ macro LVector(type, syms) From a13e9551efc697d9f81d28546adc874dc7a26d0b Mon Sep 17 00:00:00 2001 From: alecloudenback Date: Sat, 3 Feb 2024 10:47:38 -0600 Subject: [PATCH 2/3] Add test that confirms old docstring was broken --- test/larrays.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/larrays.jl b/test/larrays.jl index 0d653e1..e8f594d 100644 --- a/test/larrays.jl +++ b/test/larrays.jl @@ -78,6 +78,9 @@ using LabelledArrays, Test, InteractiveUtils @test vcat(x, y) == [1, 2, 3, 4, 5, 6] @test_throws ErrorException x.z + + # Ref #93, #154 + @test_broken @LVector [1, 2, 3] (:a, :b, :c) end @testset "Alternate array backends" begin From 18ed11bf79ba9ee02300fe112581ddc374429c1a Mon Sep 17 00:00:00 2001 From: alecloudenback Date: Sat, 3 Feb 2024 10:48:31 -0600 Subject: [PATCH 3/3] fix typo --- src/larray.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/larray.jl b/src/larray.jl index 03e623b..b3491ef 100644 --- a/src/larray.jl +++ b/src/larray.jl @@ -272,7 +272,7 @@ A .= rand(4) ``` To initialize the vector and set its values at the -same time, used [`@LArray`](@ref) instead: +same time, use [`@LArray`](@ref) instead: ```julia b = @LArray [1, 2, 3] (:a, :b, :c)