Skip to content

Commit

Permalink
Update __init__.py (#1213)
Browse files Browse the repository at this point in the history
# BUGFIX: remove_fields_space() function will drop Feature object field
  • Loading branch information
wony-zheng authored Jul 26, 2022
1 parent ba705d3 commit 687edd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qlib/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ def remove_fields_space(fields: [list, str, tuple]):
"""
if isinstance(fields, str):
return fields.replace(" ", "")
return [i.replace(" ", "") for i in fields if isinstance(i, str)]
return [i.replace(" ", "") if isinstance(i, str) else str(i) for i in fields]


def normalize_cache_fields(fields: [list, tuple]):
Expand Down

0 comments on commit 687edd7

Please sign in to comment.