Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- `pycmError` class
### Changed
- `__trapezoidal_numeric_integral__` function updated
- `_set_to_multihot` function updated
- Curve validation modified
- Internal functions renamed
- `README.md` modified
Expand Down
6 changes: 1 addition & 5 deletions pycm/multilabel_cm.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,4 @@ def _set_to_multihot(input_set: Set[Any], classes: List[Any]) -> List[int]:
:param input_set: input set
:param classes: ordered labels of classes
"""
result = [0] * len(classes)
for i, x in enumerate(classes):
if x in input_set:
result[i] = 1
return result
return [int(x in input_set) for x in classes]
Loading