<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/scipy/ticket/754" rel="nofollow">http://projects.scipy.org/scipy/ticket/754</a> on 2008-10-13 by trac user shashmik, assigned to <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/wnbell/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/wnbell">@wnbell</a>.</em></p>
<p dir="auto">Running scipy version 0.7.0.dev4763</p>
<p dir="auto">coo_matrix.tocsr + tocsc both ignore the sum_duplicates parameter:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [1]: from numpy import *
In [2]: from scipy.sparse import *
In [3]: data = array([1,1,1,1,1,1,1])
In [4]: row  = array([0,0,1,3,1,0,0])
In [5]: col  = array([0,2,1,3,1,0,0])
In [6]: A = coo_matrix( (data,(row,col)), shape=(4,4))
In [8]: A.tocsr(sum_duplicates=False).todense()
Out[8]: 
matrix([[3, 0, 1, 0],
        [0, 2, 0, 0],
        [0, 0, 0, 0],
        [0, 0, 0, 1]])
In [9]: A.tocsc(sum_duplicates=False).todense()
Out[9]: 
matrix([[3, 0, 1, 0],
        [0, 2, 0, 0],
        [0, 0, 0, 0],
        [0, 0, 0, 1]])"><pre class="notranslate"><code class="notranslate">In [1]: from numpy import *
In [2]: from scipy.sparse import *
In [3]: data = array([1,1,1,1,1,1,1])
In [4]: row  = array([0,0,1,3,1,0,0])
In [5]: col  = array([0,2,1,3,1,0,0])
In [6]: A = coo_matrix( (data,(row,col)), shape=(4,4))
In [8]: A.tocsr(sum_duplicates=False).todense()
Out[8]: 
matrix([[3, 0, 1, 0],
        [0, 2, 0, 0],
        [0, 0, 0, 0],
        [0, 0, 0, 1]])
In [9]: A.tocsc(sum_duplicates=False).todense()
Out[9]: 
matrix([[3, 0, 1, 0],
        [0, 2, 0, 0],
        [0, 0, 0, 0],
        [0, 0, 0, 1]])
</code></pre></div>
<p dir="auto"></p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/scipy/scipy/blob/fcdc3d7b7c1b950d874ac3e890cccde3e2de1c6c/scipy/optimize/optimize.py#L160">scipy/scipy/optimize/optimize.py</a>
    </p>
    <p class="mb-0 color-fg-muted">
         Line 160
      in
      <a data-pjax="true" class="commit-tease-sha" href="/scipy/scipy/commit/fcdc3d7b7c1b950d874ac3e890cccde3e2de1c6c">fcdc3d7</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L160" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="160"></td>
          <td id="LC160" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s">        sum(100.0*(x[1:] - x[:-1]**2.0)**2.0 + (1 - x[:-1])**2.0</span> </td>
        </tr>
    </tbody></table>
  </div>
</div>
<p></p>
<p dir="auto">Should be<br>
<code class="notranslate">sum(100.0*(x[1:] - x[:-1]**2.0)**2.0 + (1 - x[:-1])**2.0 )</code></p>