Changeset 21236
- Timestamp:
- 09/28/16 08:24:17 (9 years ago)
- File:
-
- 1 edited
-
issm/trunk-jpl/src/m/io/loadvars.py (modified) (2 diffs)
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.
![(please configure the [header_logo] section in trac.ini)](/trac/issm/chrome/common/trac_banner.png)