<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Also a +1 from me.  I've had to
      (re-)learn how exactly np.transpose works more times then I care
      to admit.<br>
      <br>
          - Jonathan Helmus<br>
      <br>
      On 11/05/2015 02:26 AM, Juan Nunez-Iglesias wrote:<br>
    </div>
    <blockquote cite="mid:1446711984088.9f2d3d97@Nodemailer" type="cite">
      <div>I'm just a lowly user, but I'm a fan of this. +1!</div>
      <div class="mailbox_signature">
        <br>
        <br>
      </div>
      <br>
      <br>
      <div class="gmail_quote">
        <p>On Thu, Nov 5, 2015 at 6:42 PM, Stephan Hoyer <span
            dir="ltr"><<a moz-do-not-send="true"
              href="mailto:shoyer@gmail.com" target="_blank">shoyer@gmail.com</a>></span>
          wrote:<br>
        </p>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex;">
          <div>
            <div dir="ltr">I've put up a pull request implementing a new
              function, np.moveaxis, as an alternative to np.transpose
              and np.rollaxis:
              <div>
                <a moz-do-not-send="true"
                  href="https://github.com/numpy/numpy/pull/6630">https://github.com/numpy/numpy/pull/6630</a><br>
              </div>
              <div><br>
              </div>
              <div>This functionality has been discussed (even the exact
                function name) several times over the years, but it
                never made it into a pull request. The most pressing
                issue is that the behavior of np.rollaxis is not
                intuitive to most users:</div>
              <div>
                <a moz-do-not-send="true"
href="https://mail.scipy.org/pipermail/numpy-discussion/2010-September/052882.html">https://mail.scipy.org/pipermail/numpy-discussion/2010-September/052882.html</a><br>
              </div>
              <div>
                <a moz-do-not-send="true"
                  href="https://github.com/numpy/numpy/issues/2039">https://github.com/numpy/numpy/issues/2039</a><br>
              </div>
              <div>
                <a moz-do-not-send="true"
href="http://stackoverflow.com/questions/29891583/reason-why-numpy-rollaxis-is-so-confusing">http://stackoverflow.com/questions/29891583/reason-why-numpy-rollaxis-is-so-confusing</a><br>
              </div>
              <div><br>
              </div>
              <div>In this pull request, I also allow the source and
                destination axes to be sequences as well as scalars.
                This does not add much complexity to the code, solves
                some additional use cases and makes np.moveaxis a proper
                generalization of the other axes manipulation routines
                (see the pull requests for details).</div>
              <div><br>
              </div>
              <div>Best of all, it already works on ndarray duck types
                (like masked array and dask.array), because they have
                already implemented transpose.<br>
              </div>
              <div><br>
              </div>
              <div>I think np.moveaxis would be a useful addition to
                NumPy -- I've found myself writing helper functions with
                a subset of its functionality several times over the
                past few years. What do you think?</div>
              <div><br>
              </div>
              <div>Cheers,</div>
              <div>Stephan</div>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
NumPy-Discussion mailing list
<a class="moz-txt-link-abbreviated" href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a>
<a class="moz-txt-link-freetext" href="https://mail.scipy.org/mailman/listinfo/numpy-discussion">https://mail.scipy.org/mailman/listinfo/numpy-discussion</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>