Changeset 17167


Ignore:
Timestamp:
01/24/14 11:44:26 (11 years ago)
Author:
schlegel
Message:

CHG: Attempt to add error to python WriteData for large arrays...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/solve/WriteData.py

    r15655 r17167  
    201201
    202202                #first write length of record
    203                 fid.write(struct.pack('i',4+4+8*s[0]*s[1]+4+4))    #2 integers (32 bits) + the double matrix + code + matrix type
     203                recordlength=4+4+8*s[0]*s[1]+4+4; #2 integers (32 bits) + the double matrix + code + matrix type
     204                if recordlength > 2^31 :
     205                        raise ValueError('field %s cannot be marshalled because it is larger than 4^31 bytes!' % EnumToString(enum)[1])
     206
     207                fid.write(struct.pack('i',recordlength))  #2 integers (32 bits) + the double matrix + code + matrix type
    204208
    205209                #write data code and matrix type:
Note: See TracChangeset for help on using the changeset viewer.