Changeset 20973
- Timestamp:
- 07/21/16 14:14:37 (9 years ago)
- Location:
- issm/trunk-jpl/src/m/classes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/autodiff.m
r20696 r20973 122 122 123 123 if(num_independent_objects), 124 names= zeros(num_independent_objects,1);124 names=cell(num_independent_objects,1); 125 125 types=zeros(num_independent_objects,1); 126 126 … … 128 128 indep=self.independents{i}; 129 129 130 names (i)=StringToEnum(indep.name);130 names{i}=indep.name; 131 131 types(i)=indep.typetoscalar(); 132 132 end 133 WriteData(fid,prefix,'data',names,'name','md.autodiff.independent_object_names','format',' IntMat','mattype',3);133 WriteData(fid,prefix,'data',names,'name','md.autodiff.independent_object_names','format','StringArray'); 134 134 WriteData(fid,prefix,'data',types,'name','md.autodiff.independent_object_types','format','IntMat','mattype',3); 135 135 end -
issm/trunk-jpl/src/m/classes/autodiff.py
r20690 r20973 122 122 123 123 if num_independent_objects: 124 names= numpy.zeros(num_independent_objects)124 names=[None] * num_independent_objects 125 125 types=numpy.zeros(num_independent_objects) 126 126 127 127 for i,indep in enumerate(self.independents): 128 names[i]= StringToEnum(indep.name)[0]128 names[i]=indep.name 129 129 types[i]=indep.typetoscalar() 130 130 131 WriteData(fid,prefix,'data',names,'name','md.autodiff.independent_object_names','format',' IntMat','mattype',3)131 WriteData(fid,prefix,'data',names,'name','md.autodiff.independent_object_names','format','StringArray') 132 132 WriteData(fid,prefix,'data',types,'name','md.autodiff.independent_object_types','format','IntMat','mattype',3) 133 133 #}}}
Note:
See TracChangeset
for help on using the changeset viewer.