Skip to content

Commit

Permalink
Merge pull request #61 from ggebbie/unitful-linear-algebra
Browse files Browse the repository at this point in the history
Dimensional Data v0.29
  • Loading branch information
ggebbie authored Nov 12, 2024
2 parents 71f3365 + 010c0e2 commit 3d49dbf
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 14 deletions.
22 changes: 13 additions & 9 deletions Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

julia_version = "1.11.1"
manifest_format = "2.0"
project_hash = "131ccf24f5c1da11353d44aab65e067e3ce4de07"
project_hash = "7b213f9da7628bbc0245f8ee42e7bb7f64e5ca6c"

[[deps.AbstractFFTs]]
deps = ["LinearAlgebra"]
Expand Down Expand Up @@ -31,12 +31,12 @@ version = "4.1.0"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"

[[deps.AlgebraicArrays]]
deps = ["LinearAlgebra", "Revise"]
git-tree-sha1 = "1861960eb2845e1d8221b3054d4c5a47d9a47ab4"
deps = ["LinearAlgebra"]
git-tree-sha1 = "989594685ea5be936b6000b06d465696163be525"
repo-rev = "main"
repo-url = "https://github.com/ggebbie/AlgebraicArrays.jl"
uuid = "8af735f6-f3e5-4048-bdaa-40a2355e9eea"
version = "1.0.5-DEV"
version = "1.0.6-DEV"
weakdeps = ["DimensionalData", "Unitful"]

[deps.AlgebraicArrays.extensions]
Expand Down Expand Up @@ -150,17 +150,21 @@ version = "1.11.0"

[[deps.DimensionalData]]
deps = ["Adapt", "ArrayInterface", "ConstructionBase", "DataAPI", "Dates", "Extents", "Interfaces", "IntervalSets", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "PrecompileTools", "Random", "RecipesBase", "SparseArrays", "Statistics", "TableTraits", "Tables"]
git-tree-sha1 = "7723a66edfd3bfff65ec510959b6683f8acfb111"
git-tree-sha1 = "2f4be699daeadd58a884f1e1e0205054dfcf31cd"
uuid = "0703355e-b756-11e9-17c0-8b28908087d0"
version = "0.27.9"
version = "0.29.0"

[deps.DimensionalData.extensions]
DimensionalDataAlgebraOfGraphicsExt = "AlgebraOfGraphics"
DimensionalDataCategoricalArraysExt = "CategoricalArrays"
DimensionalDataMakie = "Makie"
DimensionalDataStatsBase = "StatsBase"

[deps.DimensionalData.weakdeps]
AlgebraOfGraphics = "cbdf2221-f076-402e-a563-3d30da359d67"
CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597"
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"

[[deps.Distributed]]
deps = ["Random", "Serialization", "Sockets"]
Expand Down Expand Up @@ -609,10 +613,10 @@ version = "1.21.0"
InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112"

[[deps.UnitfulLinearAlgebra]]
deps = ["DimensionalData", "LinearAlgebra", "Statistics", "Unitful"]
git-tree-sha1 = "a4ad21ef6b5b406c24c380dad92c793bb4f8d809"
deps = ["DimensionalData", "LinearAlgebra", "Revise", "Statistics", "Unitful"]
git-tree-sha1 = "ae3773970c5aff0eec93b369a2f572ddee7b7424"
uuid = "c14bd059-d406-4571-8f61-9bd20e53c30b"
version = "0.3.7"
version = "0.4.0"

[deps.UnitfulLinearAlgebra.extensions]
UnitfulLinearAlgebraLatexifyExt = ["Latexify", "UnitfulLatexify"]
Expand Down
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "BLUEs"
uuid = "b3a7f272-e305-45d1-bcf3-14d22bb67726"
authors = ["G Jake Gebbie <ggebbie@whoi.edu>"]
version = "0.2.2"
version = "0.2.3"

[deps]
AlgebraicArrays = "8af735f6-f3e5-4048-bdaa-40a2355e9eea"
Expand All @@ -17,12 +17,12 @@ UnitfulLinearAlgebra = "c14bd059-d406-4571-8f61-9bd20e53c30b"

[compat]
AlgebraicArrays = "1.0.3"
DimensionalData = "0.24, 0.25, 0.27"
DimensionalData = "0.29"
Measurements = "2"
Statistics = "1"
ToeplitzMatrices = "0.7, 0.8"
Unitful = "1"
UnitfulLinearAlgebra = "0.3"
UnitfulLinearAlgebra = "0.4"
julia = "1.10,1.11"

[extras]
Expand Down
6 changes: 5 additions & 1 deletion test/test_estimate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,11 @@ end

Px⁻¹ = Diagonal(ustrip.(γ),[kg/g,kg*d/g,kg*d^2/g,kg*d^3/g],[g/kg,g/kg/d,g/kg/d^2,g/kg/d^3])
#x₀ = UnitfulMatrix(zeros(N).*unitdomain(Cxx⁻¹))
x₀ = zeros(N).*unitdomain(Px⁻¹)
#x₀ = zeros(N).*unitdomain(Px⁻¹)

# workaround for unitdomain issue
x₀ = zeros(N).*parent(parent(unitdomain(Px⁻¹)))

else
t = (1:M)
E =hcat(t.^0, t, t.^2, t.^3)
Expand Down
4 changes: 3 additions & 1 deletion test/test_unitful_linear_algebra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@

N = size(Px⁻¹,1)
#x₀ = UnitfulMatrix(zeros(N).*unitdomain(Px⁻¹))
x₀ = zeros(N).*unitdomain(Px⁻¹)

# problem in DD 0.29 with workaround here
x₀ = zeros(N).*parent(parent(unitdomain(Px⁻¹)))
x = Px¹².L*randn(N)
y = E*x

Expand Down

0 comments on commit 3d49dbf

Please sign in to comment.