<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/scipy/ticket/534" rel="nofollow">http://projects.scipy.org/scipy/ticket/534</a> on 2007-11-06 by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/nilswagner01/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/nilswagner01">@nilswagner01</a>, assigned to unknown.</em></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="python /data/home/nwagner/local/lib64/python2.3/site-packages/scipy/io/tests/test_mio.py
Traceback (most recent call last):
  File &quot;/data/home/nwagner/local/lib64/python2.3/site-packages/scipy/io/tests/test_mio.py&quot;, line 25, in ?
    class TestMIOArray(NumpyTestCase):
  File &quot;/data/home/nwagner/local/lib64/python2.3/site-packages/scipy/io/tests/test_mio.py&quot;, line 235, in TestMIOArray
    format = case in case_table4 and '4' or '5'
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()"><pre class="notranslate"><code class="notranslate">python /data/home/nwagner/local/lib64/python2.3/site-packages/scipy/io/tests/test_mio.py
Traceback (most recent call last):
  File "/data/home/nwagner/local/lib64/python2.3/site-packages/scipy/io/tests/test_mio.py", line 25, in ?
    class TestMIOArray(NumpyTestCase):
  File "/data/home/nwagner/local/lib64/python2.3/site-packages/scipy/io/tests/test_mio.py", line 235, in TestMIOArray
    format = case in case_table4 and '4' or '5'
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
</code></pre></div>
<p dir="auto">In the documentation for <code class="notranslate">rv_continuous</code>, there is a clear note that only positive arguments are valid by default. However, such note is missing for <code class="notranslate">rv_discrete</code>. This is quite unintuitive and I would have like to be warned of that behavior instead of getting a <code class="notranslate">ValueError: Domain error in arguments.</code> exception.</p>
<p dir="auto">While I understand it's not always a good idea to duplicate documentation, I think it'd be worth it to add a small note in the <code class="notranslate">rv_discrete</code> to remind readers of this fact, instead of just saying: “<em>This class is similar to rv_continuous</em>”.</p>
<p dir="auto">I'm happy to send a pull request to support this issue.</p>