<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    This is my code:<br>
    <br>
    matrix="".join(f.readlines())<br>
    matrix=np.fromstring(matrix, dtype=np.int16)<br>
    matrix=matrix.reshape(siz[2],siz[1],siz[0]).T<br>
    <br>
    <br>
    <br>
    <br>
    Il 05/02/2012 17:21, Olivier Delalleau ha scritto:
    <blockquote
cite="mid:CAFXk4bppm+s2kmUyV6hK02fi186Zprj7V6xkhSk2A8vF+-VkgQ@mail.gmail.com"
      type="cite">It means there is some of your code that is not
      entirely platform-independent. It's not possible to tell you which
      part because you didn't provide your code. The problem may not
      even be numpy-related.<br>
      So you should first look at the current shape of 'matrix', and
      what are the values of a, b and c, then see where the discrepancy
      is, and work from there.<br>
      <br>
      -=- Olivier<br>
      <br>
      <div class="gmail_quote">Le 5 f&eacute;vrier 2012 11:16, Paolo Zaffino <span
          dir="ltr">&lt;<a moz-do-not-send="true"
            href="mailto:p.zaffino@yahoo.it">p.zaffino@yahoo.it</a>&gt;</span>
        a &eacute;crit :<br>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <table border="0" cellpadding="0" cellspacing="0">
            <tbody>
              <tr>
                <td style="font:inherit" valign="top">
                  <p>Yes, I understand this but I don't know because on
                    Linux and Mac it works well.<br>
                    If the matrix size is different it should be
                    different indipendently from os type.<br>
                    Am I wrong?<br>
                    Thanks for your support!</p>
                </td>
              </tr>
            </tbody>
          </table>
          <div>
            <div> <br>
              <div style="font-family:times new roman,new
                york,times,serif;font-size:12pt"> <font face="Tahoma">
                  <hr size="1"> <b> <span style="font-weight:bold">From:</span>
                  </b> Olivier Delalleau &lt;<a moz-do-not-send="true"
                    href="mailto:shish@keba.be" target="_blank">shish@keba.be</a>&gt;;
                  <br>
                  <b> <span>To:</span> </b> Discussion of Numerical
                  Python &lt;<a moz-do-not-send="true"
                    href="mailto:numpy-discussion@scipy.org"
                    target="_blank">numpy-discussion@scipy.org</a>&gt;;
                  <br>
                  <b> <span>Subject:</span> </b> Re:
                  [Numpy-discussion] "ValueError: total size of new
                  array must be unchanged" only on Windows <br>
                  <b> <span style="font-weight:bold">Sent:</span> </b>
                  Sun, Feb 5, 2012 3:02:44 PM <br>
                </font>
                <div>
                  <div class="h5"> <br>
                    <table border="0" cellpadding="0" cellspacing="0">
                      <tbody>
                        <tr>
                          <td style="font:inherit" valign="top">It
                            should mean that matrix.size != a * b * c.<br>
                            <br>
                            -=- Olivier<br>
                            <br>
                            <div class="gmail_quote">Le 5 f&eacute;vrier 2012
                              09:32, Paolo <span dir="ltr">&lt;<a
                                  moz-do-not-send="true" rel="nofollow">p.zaffino@yahoo.it</a>&gt;</span>
                              a &eacute;crit :<br>
                              <blockquote class="gmail_quote"
                                style="margin:0 0 0 .8ex;border-left:1px
                                #ccc solid;padding-left:1ex">Hello,<br>
                                I wrote a function that works on a numpy
                                matrix and it works fine on Mac<br>
                                OS and GNU/Linux (I didn't test it on
                                python 3).<br>
                                Now I have a problem with numpy: the
                                same python file doesn't work on<br>
                                Windows (Windows xp, python 2.7 and
                                numpy 2.6.1).<br>
                                I get this error:<br>
                                <br>
                                matrix=matrix.reshape(a, b, c)<br>
                                ValueError: total size of new array must
                                be unchanged<br>
                                <br>
                                Why? Do anyone have an idea about this?<br>
                                Thank you very much.<br>
_______________________________________________<br>
                                NumPy-Discussion mailing list<br>
                                <a moz-do-not-send="true" rel="nofollow">NumPy-Discussion@scipy.org</a><br>
                                <a moz-do-not-send="true" rel="nofollow"
href="http://mail.scipy.org/mailman/listinfo/numpy-discussion"
                                  target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
                              </blockquote>
                            </div>
                            <br>
                          </td>
                        </tr>
                      </tbody>
                    </table>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
    </blockquote>
    <br>
  </body>
</html>