Skip to content

[tmva][sofie] Remove ConvertShapeToString and ConvertDynamicShapeToLength#21509

Merged
guitargeek merged 1 commit intoroot-project:masterfrom
guitargeek:sofie_4
Mar 10, 2026
Merged

[tmva][sofie] Remove ConvertShapeToString and ConvertDynamicShapeToLength#21509
guitargeek merged 1 commit intoroot-project:masterfrom
guitargeek:sofie_4

Conversation

@guitargeek
Copy link
Copy Markdown
Contributor

@guitargeek guitargeek commented Mar 5, 2026

Remove the redundant ConvertShapeToString and
ConvertDynamicShapeToLength functions, because there are alternatives
with more expressive names: ConvertDimShapeToString and
ConvertDimShapeToLength. Having the same functions with different
names is just confusing.

@guitargeek guitargeek self-assigned this Mar 5, 2026
@guitargeek guitargeek requested a review from lmoneta as a code owner March 5, 2026 21:53
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 5, 2026

Test Results

    22 files      22 suites   3d 5h 5m 1s ⏱️
 3 815 tests  3 814 ✅ 1 💤 0 ❌
76 441 runs  76 432 ✅ 9 💤 0 ❌

Results for commit 8d1e761.

♻️ This comment has been updated with latest results.

Copy link
Copy Markdown
Member

@lmoneta lmoneta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree it is better to have only one signature, and thank you very much Jonas for improving on this.

However, I think it should be better to drop "ConvertDynamicShapeToKength" and keep "ConvertDimShapeToString", which is much more used and more consistent with other functions (e.g. ConvertShapeToDim).
Also a tensor with a shape represented as a vector can have fixed dimensions. So it is more correct semantically.

Remove the redundant `ConvertShapeToString` and
`ConvertDynamicShapeToLength` functions, because there are alternatives
with more expressive names: `ConvertDimShapeToString` and
`ConvertDimShapeToLength`. Having the same functions with different
names is just confusing.
@guitargeek guitargeek changed the title [tmva][sofie] Remove ConvertDimShapeToString and ConvertDimShapeToLength [tmva][sofie] Remove ConvertShapeToString and ConvertDynamicShapeToLength Mar 9, 2026
@guitargeek
Copy link
Copy Markdown
Contributor Author

Very well! I have updated the PR to keep the more expressive DimShape family of functions as you suggested.

Copy link
Copy Markdown
Member

@lmoneta lmoneta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@guitargeek guitargeek merged commit 5a58529 into root-project:master Mar 10, 2026
29 of 30 checks passed
@guitargeek guitargeek deleted the sofie_4 branch March 10, 2026 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants