I ran into this this morning while writing up a new test for matplotlib. Shouldn't these two arrays be broadcasted automatically or maybe
np.ma is being overly cautious?
u = np.ma.masked_where((-0.4 < x) & (x < 0.1), u, copy=False)
File "/home/ben/.local/lib/python2.7/site-packages/numpy/ma/core.py", line 1806, in masked_where
" (got %s and %s)" % (cshape, ashape))
IndexError: Inconsistant shape between the condition and the input (got (10, 1, 1) and (10, 10, 3))
x has shape (10, 1, 1) and u has shape (10, 10, 3).