<div dir="ltr"><div><div><div>Hi All,<br><br></div>This is apropos <a href="https://github.com/numpy/numpy/pull/5582">gh-5582</a> dealing with some corner cases of np.where. The following are the current behavior<br><br><pre><code>>>> import numpy
>>> numpy.where(True)  # case 1
... (array([0]),)
>>> numpy.where(True, None, None)  # case 2
... array(None, dtype=object)
>>> numpy.ma.where(True)  # case 3
... (array([0]),)
>>> numpy.ma.where(True, None, None)  # case 4
... (array([0]),)</code></pre>The question is, what exactly should be done in these cases? I'd be inclined to raise an error for cases 1 and 3. Case two looks correct to me if we agree that scalar inputs are acceptable. Case 4 looks wrong.<br><br></div>Thoughts?<br><br></div>Chuck<br></div>