<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Le 22/01/2019 à 18:06, Stéphane
      Mottelet a écrit :<br>
    </div>
    <blockquote cite="mid:7c116f7c-b003-7279-fc13-318cd6642a63@utc.fr"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <div class="moz-cite-prefix">Le 22/01/2019 à 17:58, Samuel Gougeon
        a écrit :<br>
      </div>
      <blockquote type="cite"
        cite="mid:c02f5673-ed38-9dec-b3f6-b14366d4e23b@free.fr">
        <meta content="text/html; charset=windows-1252"
          http-equiv="Content-Type">
        <div class="moz-cite-prefix">Le 22/01/2019 à 17:56, Samuel
          Gougeon a écrit :<br>
        </div>
        <blockquote
          cite="mid:a05f47e0-447d-30f5-d676-06053b369ae8@free.fr"
          type="cite">
          <meta content="text/html; charset=windows-1252"
            http-equiv="Content-Type">
          <div class="moz-cite-prefix">Le 22/01/2019 à 17:40, Stéphane
            Mottelet a écrit :<br>
          </div>
          <blockquote
            cite="mid:e1000819-ebb2-fd9a-eff3-156a6ebf3e43@utc.fr"
            type="cite">
            <meta http-equiv="Content-Type" content="text/html;
              charset=windows-1252">
            <div class="moz-cite-prefix">Le 22/01/2019 à 17:06, Samuel
              Gougeon a écrit :<br>
            </div>
            <blockquote type="cite"
              cite="mid:8492f083-f5d0-c80f-ea79-1dd9d78baecd@free.fr">
              <meta content="text/html; charset=windows-1252"
                http-equiv="Content-Type">
              <div class="moz-cite-prefix">Le 22/01/2019 à 16:34,
                Stéphane Mottelet a écrit :<br>
              </div>
              <blockquote
                cite="mid:9bfed43f-66ed-a93f-61cf-d2922fa0cd24@utc.fr"
                type="cite">
                <meta http-equiv="Content-Type" content="text/html;
                  charset=windows-1252">
                <div class="moz-cite-prefix">Le 22/01/2019 à 16:25,
                  Samuel Gougeon a écrit :<br>
                </div>
                <blockquote type="cite"
                  cite="mid:922fed48-f7af-2d09-e468-e198310ba0af@free.fr">Hello
                  Stéphane, <br>
                  <br>
                  Le 17/01/2019 à 08:37, Stéphane Mottelet a écrit : <br>
                  <blockquote type="cite">Hello Samuel, <br>
                    <br>
                    I have initially voted for this behavior (sparse([])
                    == (  0,  0) zero sparse matrix ) but your remark on
                    numerous occurences of "sparse([])" in scilab
                    prevented to do so. <br>
                  </blockquote>
                  <br>
                  Why? My remark aimed to bring the attention to
                  existing occurrences and to prevent merging the commit
                  without updating them, not to prevent updating them. <br>
                  Then these occurrences changed your opinion and vote,
                  not mine. <br>
                  <br>
                  Best regards <br>
                  Samuel <br>
                </blockquote>
                <p>Please see comment #8:</p>
                <p>Anyway, <b>as bug #15758 is not related to
                    sparse([]) being not sparse</b>, and considered the
                  numerous side effects, I will restore sparse([]) ==
                  double empty matrix. <b>If you find necessary to have
                    sparse([]) == sparse empty matrix, please file a
                    bug/whish on BZ.</b></p>
              </blockquote>
              <br>
              Yes, and neither you -- that voted for it -- nor me did
              it.<br>
              And finally we agree: keeping sparse([])==[] was your
              decision.<br>
              Changing this could be done later if it proves to be
              better.<br>
              For the time being, the situation is the following:<br>
              <br>
              <b>Scilab 6.0.1</b>:<br>
              <tt>--> sparse([])</tt><tt><br>
              </tt><tt> ans  =</tt><tt><br>
              </tt><tt>    []</tt><tt><br>
              </tt><tt><br>
              </tt><tt>--> sparse([],[])</tt><tt><br>
              </tt><tt> ans  =</tt><tt><br>
              </tt><tt>(  0,  0) zero sparse matrix</tt><tt><br>
              </tt><tt><br>
              </tt><tt>--> sparse([],[],[0,2])</tt><tt><br>
              </tt><tt> ans  =</tt><tt><br>
              </tt><tt>    []</tt><br>
              <br>
              <b>Scilab 6.0.2-</b> after <a
                class="moz-txt-link-freetext"
href="https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/codereview.scilab.org/20492"
                moz-do-not-send="true">https://codereview.scilab.org/20492</a>
              :<br>
              <tt>--> sparse([])</tt><tt>      // unchanged<br>
              </tt><tt> ans  =</tt><tt><br>
              </tt><tt>    []</tt><tt><br>
              </tt><tt><br>
              </tt><tt>--> sparse([],[])</tt><tt>   // unchanged<br>
              </tt><tt> ans  =</tt><tt><br>
              </tt><tt>(  0,  0) zero sparse matrix</tt><tt><br>
              </tt><tt><br>
              </tt><tt>--> sparse([],[],[0,2])</tt><tt>  // <b>CHANGED</b><br>
              </tt><tt> ans  =</tt><tt><br>
              </tt><tt>(  0,  0) zero sparse matrix</tt><br>
              <br>
              while i don't think that this last change is intentional.<br>
            </blockquote>
            <p>it is. To me, <br>
            </p>
            <p><tt>sparse([],[]) <=> sparse([],[],[0,0]) by
                getting dims implicitely defined in first two arguments
                (ij,v), so explicit size definition in
                sparse([],[],[2,0]) should give the same output </tt></p>
          </blockquote>
          <br>
          <tt>Yes<br>
            <br>
          </tt>
          <blockquote
            cite="mid:e1000819-ebb2-fd9a-eff3-156a6ebf3e43@utc.fr"
            type="cite">
            <p><tt>(2x0 == empty matrix);</tt></p>
          </blockquote>
          <br>
          <tt>No. Since both other syntaxes yielded [], [] should be
            returned. What would make a consistent answer for <b>all</b>
            empty inputs.<br>
          </tt></blockquote>
        <br>
        <tt>I mean: Changing<br>
          <br>
        </tt><tt>--> sparse([],[]) <br>
           ans  =<br>
          (  0,  0) zero sparse matrix<br>
          <br>
          into<br>
          <br>
          --> sparse([],[]) <br>
           ans  =<br>
             []<br>
        </tt></blockquote>
      <p><tt>I do not agree. I will prepare a patch with </tt><tt>sparse([])
          == </tt><tt>(0,0) zero sparse matrix for master and this time
          I will track all possible glitches. Every output of
          sparse(...), whatever the arguments, should be sparse, even if
          empty.</tt></p>
    </blockquote>
    <br>
    <tt>This was the missing intention.<br>
      Thanks<br>
      <br>
    </tt>
  </body>
</html>