Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 7, 2024
1 parent de28a8a commit 10e2743
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
6 changes: 3 additions & 3 deletions docs/usage/dynamics/k-matrix.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1492,9 +1492,9 @@
" *sp.symbols(f\"s m_a{i} m_b{i}\", nonnegative=True)\n",
" ).doit()\n",
"\n",
" expr = expr.xreplace({\n",
" sp.sqrt(rho_i(i)): 1 for i in range(n_channels)\n",
" }).xreplace({sp.conjugate(sp.sqrt(rho_i(i))): 1 for i in range(n_channels)})\n",
" expr = expr.xreplace(\n",
" {sp.sqrt(rho_i(i)): 1 for i in range(n_channels)}\n",
" ).xreplace({sp.conjugate(sp.sqrt(rho_i(i))): 1 for i in range(n_channels)})\n",
" expr = expr.xreplace({s: m**2})\n",
" expr = symplot.substitute_indexed_symbols(expr)\n",
" np_expr, sliders = symplot.prepare_sliders(expr, m)\n",
Expand Down
6 changes: 3 additions & 3 deletions src/ampform/helicity/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@
def _order_component_mapping(
mapping: Mapping[str, sp.Expr]
) -> OrderedDict[str, sp.Expr]:
return collections.OrderedDict([
(key, mapping[key]) for key in sorted(mapping, key=natural_sorting)
])
return collections.OrderedDict(
[(key, mapping[key]) for key in sorted(mapping, key=natural_sorting)]
)


def _order_symbol_mapping(
Expand Down
8 changes: 5 additions & 3 deletions src/ampform/helicity/align/dpd.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,11 @@ def _(obj: ReactionInfo) -> ReactionInfo: # type: ignore[misc]

@relabel_edge_ids.register(StateTransitionCollection)
def _(obj: StateTransitionCollection) -> StateTransitionCollection: # type: ignore[misc]
return StateTransitionCollection([ # no attrs.evolve() for __attrs_post_init__()
relabel_edge_ids(transition) for transition in obj.transitions
])
return StateTransitionCollection(
[ # no attrs.evolve() for __attrs_post_init__()
relabel_edge_ids(transition) for transition in obj.transitions
]
)


@relabel_edge_ids.register(StateTransition)
Expand Down
6 changes: 3 additions & 3 deletions src/ampform/kinematics/angles.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ def __recursive_helicity_angles(
sub_momenta_ids = determine_attached_final_state(topology, state_id)
if len(sub_momenta_ids) > 1:
# add all of these momenta together -> defines new subsystem
four_momentum = ArraySum(*[
four_momenta[i] for i in sub_momenta_ids
])
four_momentum = ArraySum(
*[four_momenta[i] for i in sub_momenta_ids]
)

# boost all of those momenta into this new subsystem
phi_expr = Phi(four_momentum)
Expand Down

0 comments on commit 10e2743

Please sign in to comment.