diff options
author | Warren Weckesser <warren.weckesser@gmail.com> | 2019-09-10 11:44:59 -0400 |
---|---|---|
committer | Warren Weckesser <warren.weckesser@gmail.com> | 2019-09-10 11:44:59 -0400 |
commit | 631ce4956c73d2c7830a493dcd0814892e234f93 (patch) | |
tree | 38dc5e50969c3c38fe3a07328f1c35de11f3cd54 /numpy/lib/recfunctions.py | |
parent | b42c2e3f02e6c6d0682ae148923db1b7123c5ac6 (diff) | |
download | numpy-631ce4956c73d2c7830a493dcd0814892e234f93.tar.gz |
BUG: core: Fix the str function of the rational dtype.
Fix the function pyrational_str to return a Unicode string.
Before this change:
>>> r = _rational_tests.rational(17, 5)
>>> r
rational(17,5)
>>> str(r)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: __str__ returned non-string (type bytes)
After this change:
>>> r = _rational_tests.rational(17, 5)
>>> r
rational(17,5)
>>> str(r)
'17/5'
Diffstat (limited to 'numpy/lib/recfunctions.py')
0 files changed, 0 insertions, 0 deletions