From a69336817f1e153f768e41d33f4e477e8ba38926 Mon Sep 17 00:00:00 2001 From: mattsignorelli Date: Fri, 11 Sep 2026 11:29:52 -0400 Subject: [PATCH 1/2] ok --- src/utils.jl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils.jl b/src/utils.jl index e81d6e2..31a4642 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -51,7 +51,7 @@ end factor_in(t, var::Int, n::Int=1) = (out = zero(t); factor_in!(out, t, var, n)) -function factor_in!(out, t, var::Int, n::Int=1) +function factor_in!(out, t, var::Int, n::Int=1, ) TI.is_tps_type(typeof(t)) isa TI.IsTPSType || error("Function only accepts TPS types") TI.is_tps_type(typeof(out)) isa TI.IsTPSType || error("Function only accepts TPS types") nn = ndiffs(t) @@ -65,7 +65,9 @@ function factor_in!(out, t, var::Int, n::Int=1) idx = TI.cycle!(t, 0, mono=tmpmono, val=v) while idx > 0 tmpmono[var] += n - TI.setm!(out, v[], tmpmono) + if TI.isvalidm(out, tmpmono) + TI.setm!(out, v[], tmpmono) + end idx = TI.cycle!(t, idx, mono=tmpmono, val=v) end return out From a3784111fc832a04fc40c29c38109d85850fd1e4 Mon Sep 17 00:00:00 2001 From: mattsignorelli Date: Fri, 11 Sep 2026 11:33:45 -0400 Subject: [PATCH 2/2] bump --- Project.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index fee500e..19ed20f 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "NonlinearNormalForm" uuid = "05e19671-dec8-4f15-984f-54eaa6ca64be" authors = ["Matt Signorelli"] -version = "0.5.2" +version = "0.5.3" [deps] DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" @@ -28,7 +28,7 @@ Reexport = "1" ReferenceFrameRotations = "3" SkewLinearAlgebra = "1" StaticArrays = "1" -TPSAInterface = "0.3.0" +TPSAInterface = "0.3.1" julia = "1.9" [extras]