One day, when I used matplotlib, I got this error.
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/lib/stride_tricks.py", line 119, in broadcast_arrays zip(args, shapes, strides)] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/lib/stride_tricks.py", line 32, in as_strided array.dtype = x.dtype TypeError: Cannot change data-type for object array.
Reinstalling matplotlib solved the problem. $ pip uninstall matplotlib $ pip install matplotlib