Description
This demo http://matplotlib.org/devdocs/examples/pylab_examples/color_by_yvalue.html is broken on python 3.
Only the left most plotted region is shown and happens either with ma arrays or np.nan
filled arrays (have not started digging yet, I assume the eventually follow the same code path). Filling with 0 works as expected.
I think bisect on this goes back to the cxx removal but many of the commits in there don't compile on python3 due to a numpy related gcc error so that isn't very helpful.
This smells like a subtle clipping bug.
The most common compilation error is:
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_ft2font_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -I/home/tcaswell/.virtualenvs/dd_3k/lib/python3.4/site-packages/numpy/core/include -I/home/tcaswell/.virtualenvs/dd_3k/include/freetype2 -I/usr/local/include -I/usr/include -I. -I/home/tcaswell/.virtualenvs/dd_3k/include/python3.4m -c src/ft2font_wrapper.cpp -o build/temp.linux-x86_64-3.4/src/ft2font_wrapper.o
In file included from src/file_compat.h:7:0,
from src/ft2font_wrapper.cpp:3:
src/ft2font_wrapper.cpp: In function ‘PyObject* PyFT2Image_as_array(PyFT2Image*, PyObject*, PyObject*)’:
src/ft2font_wrapper.cpp:142:47: error: ‘PyArray_UBYTE’ was not declared in this scope
return PyArray_SimpleNewFromData(2, dims, PyArray_UBYTE, self->x->get_buffer());
^
/home/tcaswell/.virtualenvs/dd_3k/lib/python3.4/site-packages/numpy/core/include/numpy/ndarrayobject.h:129:46: note: in definition of macro ‘PyArray_SimpleNewFromData’
PyArray_New(&PyArray_Type, nd, dims, typenum, NULL, \
^
Going to try rolling back to older versions of numpy te see if that fixes it.
For future reference, the output of bisect:
The first bad commit could be any of:
4a56cda
cfbf8d5
339537d
8dae818
6e19dac
a225968
697b3ef
c5ab747
5204635
af578f5
0624664
6d07179
ba40160
d862c47
d8c1d0d
We cannot bisect more!
Bisect Log:
git bisect start 'master' 'v1.4.3'
a165735 bad Merge pull request #4521 from jkseppan/issue-4475
21f46ff good REL : version 1.4.3
git bisect bad 056ba7a
056ba7a bad MNT : Remove NavigationToolbar2QTAgg
git bisect bad 112f199
112f199 bad Merge pull request #3752 from astrofrog/rc_context_exceptions
git bisect good 34ed45a
34ed45a good Merge pull request #3291 from joferkington/lightsource-enhancements
git bisect bad c6f24d3
c6f24d3 bad Merge pull request #3665 from jkseppan/fix-gdk-strides
git bisect good 0f4a68d
0f4a68d good Merge pull request #3547 from jkseppan/numpy-deprecation
git bisect bad 7891790
7891790 bad Remove reference to PyCXX
git bisect skip 697b3ef
697b3ef skip Restore parallel testing
git bisect skip 6d07179
6d07179 skip Change how array converter functions are defined
git bisect good 7b206eb
7b206eb good Skip shading of masked array test on numpy 1.6
git bisect skip 8dae818
8dae818 skip Remove some obsolete TODOs
git bisect skip af578f5
af578f5 skip Add .clang-format to repository
git bisect good ea8617d
ea8617d good fix E201 and E202 pep8 errors
git bisect skip 4a56cda
4a56cda skip Fix compilation
git bisect skip d862c47
d862c47 skip Fix Mac compile again
git bisect skip cfbf8d5
cfbf8d5 skip Remove debugging prints
git bisect skip ba40160
ba40160 skip Remove use of PyCXX in core C++ extensions
git bisect skip 339537d
339537d skip Fix curve simplification
git bisect good dbeed94
dbeed94 good Merge pull request #3661 from jenshnielsen/numpy_16_fixes
git bisect skip 6e19dac
6e19dac skip Fix segfault on Python 3
git bisect skip 0624664
0624664 skip Fix test_hexbin_pickable test
git bisect skip c5ab747
c5ab747 skip More Python 3 fixes
git bisect skip a225968
a225968 skip Documentation
git bisect skip 5204635
5204635 skip Windows-related fixes, thanks to @cgohlke
git bisect bad d8c1d0d
d8c1d0d bad Remove usage of old Numpy API