Changeset 21236
- Timestamp:
- 09/28/16 08:24:17 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/io/loadvars.py
r21235 r21236 121 121 if varval.dtype==str: 122 122 if varval.shape==1: 123 Tree.__dict__[str(var)]= varval[0]123 Tree.__dict__[str(var)]=str(varval[0]) 124 124 if 'True' in varval[:] or 'False' in varval[:]: 125 125 Tree.__dict__[str(var)]=np.asarray(varval[:],dtype=bool) … … 150 150 for attr in curclass.ncattrs(): 151 151 #print(' treating {}'.format(attr)) 152 if classtree[mod][0]!='results' : #no attributes in results153 Tree.__dict__[str(attr)]= curclass.getncattr(attr)152 if classtree[mod][0]!='results' and attr!='classtype': #no attributes in results 153 Tree.__dict__[str(attr)]=str(curclass.getncattr(attr)) 154 154 if curclass.getncattr(attr)=='True': 155 155 Tree.__dict__[str(attr)]=True
Note:
See TracChangeset
for help on using the changeset viewer.