rules/tslearn/dtw-mismatched-constraint.md

tslearn.metrics._masks._compute_mask_generic dispatches solely on global_constraint once it is set. Passing sakoe_chiba_radius with global_constraint="itakura" (or itakura_max_slope with global_constraint="sakoe_chiba") silently drops the mismatched parameter and uses the default slope (2.0) or default radius (1).

diff
1-dist = dtw(s1, s2, global_constraint="itakura", sakoe_chiba_radius=2)
2+dist = dtw(s1, s2, global_constraint="sakoe_chiba", sakoe_chiba_radius=2)

What the rule reports

Calls to tslearn.metrics warping functions that pair global_constraint="itakura" (or 1) with a non-None sakoe_chiba_radius, or global_constraint="sakoe_chiba" (or 2) with a non-None itakura_max_slope.

How to fix it

Match global_constraint to the constraint parameter you pass, or remove the unused constraint argument.