Changeset 26302


Ignore:
Timestamp:
06/07/21 23:56:52 (4 years ago)
Author:
jdquinn
Message:

BUG: reshape(-1, 1) should work but doesn’t

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/classes/initialization.py

    r26301 r26302  
    137137                pos = np.where(md.initialization.waterfraction > 0)[0]
    138138                self.enthalpy = md.materials.heatcapacity * (md.initialization.temperature - md.constants.referencetemperature)
    139                 self.enthalpy[pos] = md.materials.heatcapacity * (tpmp[pos].reshape(-1, 1) - md.constants.referencetemperature) + md.materials.latentheat * md.initialization.waterfraction[pos].reshape(-1, 1)
     139                self.enthalpy[pos] = md.materials.heatcapacity * (tpmp[pos].reshape(-1,) - md.constants.referencetemperature) + md.materials.latentheat * md.initialization.waterfraction[pos].reshape(-1,)
    140140
    141141            WriteData(fid, prefix, 'data', self.enthalpy, 'format', 'DoubleMat', 'mattype', 1, 'name', 'md.initialization.enthalpy')
Note: See TracChangeset for help on using the changeset viewer.