<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body>
    Thanks Eric. I already checked that. It's not what I want. I think I
    wasn't clear about what I wanted.<br>
    <br>
    I want to split each column but I want to do it for each column and
    end up with an array. Here's the result I wish to have:<br>
    <br>
    <div class="cell code_cell rendered selected" tabindex="2"
      style="box-sizing: border-box; -webkit-box-orient: vertical;
      -webkit-box-align: stretch; display: flex; flex-direction: column;
      align-items: stretch; border-radius: 2px; border-width: 1px 1px
      1px 0px; border-style: solid; border-color: rgb(171, 171, 171);
      width: 738px; padding: 5px 5px 5px 6px; margin: 0px; outline:
      none; background: linear-gradient(to right, rgb(66, 165, 245)
      -40px, rgb(66, 165, 245) 5px, transparent 5px, transparent 100%);">
      <div class="output_wrapper" style="box-sizing: border-box;
        position: relative; -webkit-box-orient: vertical;
        -webkit-box-align: stretch; display: flex; flex-direction:
        column; align-items: stretch; z-index: 1;">
        <div class="output" style="box-sizing: border-box;
          -webkit-box-orient: vertical; -webkit-box-align: stretch;
          display: flex; flex-direction: column; align-items: stretch;">
          <div class="output_area" style="box-sizing: border-box;
            padding: 0px; page-break-inside: avoid; -webkit-box-orient:
            horizontal; -webkit-box-align: stretch; display: flex;
            flex-direction: row; align-items: stretch;">
            <div class="output_subarea output_text output_result"
              style="box-sizing: border-box; overflow-x: auto; padding:
              0.4em; -webkit-box-flex: 1; flex: 1 1 0%; max-width:
              calc(100% - 14ex); text-align: left; color: rgb(0, 0, 0);
              line-height: 1.21429em;">
              <pre style="box-sizing: border-box; overflow: auto; font-family: monospace; font-size: inherit; display: block; padding: 0px; margin: 0px; line-height: inherit; word-break: break-all; word-wrap: break-word; color: black; border: 0px; border-radius: 0px; white-space: pre-wrap; vertical-align: baseline; background-color: transparent;">array([[[0], [1, 2, 3, 4], [5, 6, 7], [8, 9]],
       [[10], [11, 12, 13, 14], [15, 16, 17], [18, 19]],
       [[20], [21, 21, 23, 24], [25, 26, 27], [28, 29]]], dtype=object)</pre>
            </div>
          </div>
        </div>
      </div>
    </div>
    <br>
    <pre class="moz-signature" cols="72">Sincerely Yours,
Bob
</pre>
    <br>
    <br>
    <div class="moz-cite-prefix">On 23/03/2016 14:17, Eric Moore wrote:<br>
    </div>
    <blockquote
cite="mid:CAGeA38kf95_TeNKBivB-UXT4W4kq=BBHDHGyUVqH5VBEQX2qiA@mail.gmail.com"
      type="cite">
      <div dir="ltr">Try just calling np.array_split on the full 2D
        array.  It splits along a particular axis, which is selected
        using the axis argument of np.array_split.  The axis to split
        along defaults to the first so the two calls to np.array_split
        below are exactly equivalent.<br>
        <br>
        <span style="color:rgb(0,0,128)">In [</span><span
          style="font-weight:600;color:rgb(0,0,128)">16</span><span
          style="color:rgb(0,0,128)">]:</span> a =
        np.c_[:10,10:20,20:30]
        <p style="margin:0px;text-indent:0px"><br>
        </p>
        <p style="margin:0px;text-indent:0px"><span
            style="color:rgb(0,0,128)">In [</span><span
            style="font-weight:600;color:rgb(0,0,128)">17</span><span
            style="color:rgb(0,0,128)">]:</span> np.array_split(a,
          [2,5,8])</p>
        <p style="margin:0px;text-indent:0px"><span
            style="color:rgb(139,0,0)">Out[</span><span
            style="font-weight:600;color:rgb(139,0,0)">17</span><span
            style="color:rgb(139,0,0)">]:</span> </p>
        <p style="margin:0px;text-indent:0px">[array([[ 0, 10, 20],</p>
        <p style="margin:0px;text-indent:0px"> [ 1, 11, 21]]), array([[
          2, 12, 22],</p>
        <p style="margin:0px;text-indent:0px"> [ 3, 13, 23],</p>
        <p style="margin:0px;text-indent:0px"> [ 4, 14, 24]]), array([[
          5, 15, 25],</p>
        <p style="margin:0px;text-indent:0px"> [ 6, 16, 26],</p>
        <p style="margin:0px;text-indent:0px"> [ 7, 17, 27]]), array([[
          8, 18, 28],</p>
        <p style="margin:0px;text-indent:0px"> [ 9, 19, 29]])]</p>
        <p style="margin:0px;text-indent:0px"><br>
        </p>
        <p style="margin:0px;text-indent:0px"><span
            style="color:rgb(0,0,128)">In [</span><span
            style="font-weight:600;color:rgb(0,0,128)">18</span><span
            style="color:rgb(0,0,128)">]:</span> np.array_split(a,
          [2,5,8], 0)</p>
        <p style="margin:0px;text-indent:0px"><span
            style="color:rgb(139,0,0)">Out[</span><span
            style="font-weight:600;color:rgb(139,0,0)">18</span><span
            style="color:rgb(139,0,0)">]:</span> </p>
        <p style="margin:0px;text-indent:0px">[array([[ 0, 10, 20],</p>
        <p style="margin:0px;text-indent:0px"> [ 1, 11, 21]]), array([[
          2, 12, 22],</p>
        <p style="margin:0px;text-indent:0px"> [ 3, 13, 23],</p>
        <p style="margin:0px;text-indent:0px"> [ 4, 14, 24]]), array([[
          5, 15, 25],</p>
        <p style="margin:0px;text-indent:0px"> [ 6, 16, 26],</p>
        <p style="margin:0px;text-indent:0px"> [ 7, 17, 27]]), array([[
          8, 18, 28],</p>
        <p style="margin:0px;text-indent:0px"> [ 9, 19, 29]])]</p>
        <p style="margin:0px;text-indent:0px"><br>
        </p>
        <p style="margin:0px;text-indent:0px"><span
            style="color:rgb(0,0,128)"></span><span
            style="color:rgb(0,0,128)">Eric<br>
          </span> </p>
        <br>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Wed, Mar 23, 2016 at 9:06 AM,
          Ibrahim EL MEREHBI <span dir="ltr"><<a
              moz-do-not-send="true" href="mailto:bobmerhebi@gmail.com"
              target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:bobmerhebi@gmail.com">bobmerhebi@gmail.com</a></a>></span> wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div text="#000000" bgcolor="#FFFFFF"> Hello,<br>
              <br>
              I have a multi-diensional array that I would like to split
              its columns.<br>
              <br>
              For example consider,<br>
              <br>
              dat = np.array([np.arange(10),np.arange(10,20),
              np.arange(20,30)]).T<br>
              <pre style="overflow:auto;font-family:monospace;font-size:14px;display:block;padding:0px;margin:0px;line-height:17.0001px;word-break:break-all;word-wrap:break-word;color:rgb(0,0,0);border:0px;border-radius:0px;white-space:pre-wrap;vertical-align:baseline;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;word-spacing:0px;background-color:rgb(255,255,255)">array([[ 0, 10, 20],
       [ 1, 11, 21],
       [ 2, 12, 22],
       [ 3, 13, 23],
       [ 4, 14, 24],
       [ 5, 15, 25],
       [ 6, 16, 26],
       [ 7, 17, 27],
       [ 8, 18, 28],
       [ 9, 19, 29]])</pre>
              <br>
              I already can split one column at a time:<br>
              <br>
              np.array_split(dat[:,0], [2,5,8])<br>
              <pre style="overflow:auto;font-family:monospace;font-size:14px;display:block;padding:0px;margin:0px;line-height:17.0001px;word-break:break-all;word-wrap:break-word;color:rgb(0,0,0);border:0px;border-radius:0px;white-space:pre-wrap;vertical-align:baseline;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;word-spacing:0px;background-color:rgb(255,255,255)">[array([0, 1]), array([2, 3, 4]), array([5, 6, 7]), array([8, 9])]</pre>
              <br>
              How can I extend this for all columns and (overwrite or)
              have a new multi-dimensional array?<br>
              <pre cols="72">Thank you,
Bob
</pre>
            </div>
            <br>
            _______________________________________________<br>
            NumPy-Discussion mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
            <a moz-do-not-send="true"
              href="https://mail.scipy.org/mailman/listinfo/numpy-discussion"
              rel="noreferrer" target="_blank">https://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
      <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>
    <br>
  </body>
</html>