Skip to content

Commit

Permalink
FIX: set correct return type for masses (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer authored May 4, 2024
1 parent eeaab6f commit 9f1d1e9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/ampform_dpd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class AmplitudeModel:
amplitudes: dict[sp.Indexed, sp.Expr] = field(factory=dict)
variables: dict[sp.Symbol, sp.Expr] = field(factory=dict)
parameter_defaults: dict[sp.Symbol, float | complex] = field(factory=dict)
masses: dict[sp.Symbol, float | complex] = field(factory=dict)
masses: dict[sp.Symbol, float] = field(factory=dict)
invariants: dict[sp.Symbol, sp.Expr] = field(factory=dict)

@property
Expand Down Expand Up @@ -402,9 +402,7 @@ def formulate_non_resonant(
return sp.Rational(1), {}


def create_mass_symbol_mapping(
decay: ThreeBodyDecay,
) -> dict[sp.Symbol, float | complex]:
def create_mass_symbol_mapping(decay: ThreeBodyDecay) -> dict[sp.Symbol, float]:
return {
sp.Symbol(f"m{i}", nonnegative=True): decay.states[i].mass
for i in sorted(decay.states) # ensure that dict keys are sorted by state ID
Expand Down

0 comments on commit 9f1d1e9

Please sign in to comment.