google-research / google-research/optformer
to_str() raises TypeError due to float input in np.base_repr()
Open
- Dominant language
- Python
- Stars
- 244
- Forks
- 36
- Avg merge
- 9h 41m
- Merged PRs (30d)
- 2
Description
### Description:
I encountered a TypeError when calling to_str(f: float). The issue occurs because np.base_repr() expects an integer, but the function passes a floating-point number.
### Steps to Reproduce:
```
serializer = NumericSerializer()
print(serializer.to_str(2.5)) # Raises TypeError
```
### Error Message:
TypeError: string indices must be integers
Contributor guide
Assessment
This issue has not been assessed yet.