<p dir="auto">Numpy silently assigns zeroes instead of the correct array if the array has a negative fraction.</p>
<h3 dir="auto">Reproducing code example:</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="A = np.array([[3,2,4],
              [2,1,3],
              [1,2,4]])
b = A[1,0:3] - 0.66*A[0,0:3]
A[1,1:3] = b[1:3]

A"><pre class="notranslate"><span class="pl-v">A</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([[<span class="pl-c1">3</span>,<span class="pl-c1">2</span>,<span class="pl-c1">4</span>],
              [<span class="pl-c1">2</span>,<span class="pl-c1">1</span>,<span class="pl-c1">3</span>],
              [<span class="pl-c1">1</span>,<span class="pl-c1">2</span>,<span class="pl-c1">4</span>]])
<span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-v">A</span>[<span class="pl-c1">1</span>,<span class="pl-c1">0</span>:<span class="pl-c1">3</span>] <span class="pl-c1">-</span> <span class="pl-c1">0.66</span><span class="pl-c1">*</span><span class="pl-v">A</span>[<span class="pl-c1">0</span>,<span class="pl-c1">0</span>:<span class="pl-c1">3</span>]
<span class="pl-v">A</span>[<span class="pl-c1">1</span>,<span class="pl-c1">1</span>:<span class="pl-c1">3</span>] <span class="pl-c1">=</span> <span class="pl-s1">b</span>[<span class="pl-c1">1</span>:<span class="pl-c1">3</span>]

<span class="pl-v">A</span></pre></div>
<p dir="auto">Output:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="array([[3, 2, 4],
       [2, 0, 0],
       [1, 2, 4]])"><pre class="notranslate"><span class="pl-en">array</span>([[<span class="pl-c1">3</span>, <span class="pl-c1">2</span>, <span class="pl-c1">4</span>],
       [<span class="pl-c1">2</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>],
       [<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">4</span>]])</pre></div>
<h3 dir="auto">Numpy/Python version information:</h3>
<p dir="auto">OS: Windows 10<br>
Numpy version :  1.14.5<br>
Python version :  3.6.6<br>
1.14.5 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 03:37:03) [MSC v.1900 64 bit (AMD64)]</p>
<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/numpy/ticket/1600" rel="nofollow">http://projects.scipy.org/numpy/ticket/1600</a> on 2010-09-02 by trac user steveb, assigned to unknown.</em></p>
<p dir="auto">When a record type is defined using a dictionary, dtype doesn't allow zero length arrays.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="np.dtype([('val1', np.float32, (0,))]) # OK
np.dtype({'names': ['val1'], 'formats':[(np.float32, (0,))]}) # Throws TypeError"><pre class="notranslate"><code class="notranslate">np.dtype([('val1', np.float32, (0,))]) # OK
np.dtype({'names': ['val1'], 'formats':[(np.float32, (0,))]}) # Throws TypeError
</code></pre></div>
<p dir="auto">It isn't clear to me why they shouldn't be allowed in this case.</p>