summaryrefslogtreecommitdiff
path: root/numpy/polynomial/polyutils.py
diff options
context:
space:
mode:
authorOndrej Certik <ondrej.certik@gmail.com>2012-07-27 12:16:12 -0700
committerOndrej Certik <ondrej.certik@gmail.com>2012-08-03 07:45:12 -0700
commita9d58ab42da8d2ed9071044848a54c5e066b557a (patch)
tree2e1e7be17dea21f480551de7cd37dc9085e5c3c2 /numpy/polynomial/polyutils.py
parentfd15162fbff5dd68c548284947d39bb2a2481183 (diff)
downloadnumpy-a9d58ab42da8d2ed9071044848a54c5e066b557a.tar.gz
FIX: Fixes the PyUnicodeObject problem in py-3.3
Previously NumPy did not compile in Python 3.3 due to the changes in PEP 393. This patch simply calls PyUnicode_FromKindAndData() from the new Python 3.3 API and possibly swaps the data before calling it if needed. The data in NumPy is always UCS4 and the PyUnicode_FromKindAndData() internally converts it to UCS1, UCS2 or UCS4 depending on the maximum code point. The following tests now fail, because they produce invalid unicode in the process (will be fixed in the next patch): ====================================================================== ERROR: Check byteorder of 0-dimensional objects ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ondrej/py33/lib/python3.3/site-packages/numpy/core/tests/test_unicode.py", line 277, in test_values0D self.assertTrue(ua[()] != ua2[()]) SystemError: invalid maximum character passed to PyUnicode_New ====================================================================== ERROR: Check byteorder of multi-dimensional objects ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ondrej/py33/lib/python3.3/site-packages/numpy/core/tests/test_unicode.py", line 297, in test_valuesMD self.assertTrue(ua[0,0,0] != ua2[0,0,0]) SystemError: invalid maximum character passed to PyUnicode_New ====================================================================== ERROR: Check byteorder of single-dimensional objects ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ondrej/py33/lib/python3.3/site-packages/numpy/core/tests/test_unicode.py", line 286, in test_valuesSD self.assertTrue(ua[0] != ua2[0]) SystemError: invalid maximum character passed to PyUnicode_New ====================================================================== ERROR: Check byteorder of 0-dimensional objects ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ondrej/py33/lib/python3.3/site-packages/numpy/core/tests/test_unicode.py", line 277, in test_values0D self.assertTrue(ua[()] != ua2[()]) SystemError: invalid maximum character passed to PyUnicode_New ====================================================================== ERROR: Check byteorder of multi-dimensional objects ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ondrej/py33/lib/python3.3/site-packages/numpy/core/tests/test_unicode.py", line 297, in test_valuesMD self.assertTrue(ua[0,0,0] != ua2[0,0,0]) SystemError: invalid maximum character passed to PyUnicode_New ====================================================================== ERROR: Check byteorder of single-dimensional objects ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ondrej/py33/lib/python3.3/site-packages/numpy/core/tests/test_unicode.py", line 286, in test_valuesSD self.assertTrue(ua[0] != ua2[0]) SystemError: invalid maximum character passed to PyUnicode_New
Diffstat (limited to 'numpy/polynomial/polyutils.py')
0 files changed, 0 insertions, 0 deletions