Skip to content

Commit 901e429

Browse files
trulsfhellemo
andauthored
Add missing package names (#40)
* Add missing package names * Add test for rowtable with custom header * Fix formatting * Bump version --------- Co-authored-by: Lars Hellemo <[email protected]>
1 parent 4fc4a94 commit 901e429

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "SparseVariables"
22
uuid = "2749762c-80ed-4b14-8f33-f0736679b02b"
33
authors = ["Truls Flatberg <[email protected]>", "Lars Hellemo <[email protected]>"]
4-
version = "0.7.1"
4+
version = "0.7.2"
55

66
[deps]
77
Dictionaries = "85a47980-9c8c-11e8-2b9f-f7ca1fa99fb4"

src/tables.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function JuMP.Containers.rowtable(
2828
)
2929
header = Symbol[k for k in keys(x.index_names)]
3030
push!(header, col_header)
31-
return rowtable(f, x; header = header)
31+
return JuMP.Containers.rowtable(f, x; header = header)
3232
end
3333

3434
function JuMP.Containers.rowtable(f::Function, x::IndexedVarArray)

test/runtests.jl

+7
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,13 @@ end
253253
@test r.car == "ford"
254254
@test r.year == 2002
255255
@test r.value == 300.0
256+
257+
tab_cust =
258+
JuMP.Containers.rowtable(value, y; header = [:Car, :Year, :Value])
259+
r = first(tab_cust)
260+
@test r.Car == "ford"
261+
@test r.Year == 2002
262+
@test r.Value == 300.0
256263
end
257264

258265
@testset "JuMP extension" begin

0 commit comments

Comments
 (0)