/[escript]/trunk/escript/src/Data.cpp
ViewVC logotype

Diff of /trunk/escript/src/Data.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2461 by jfenwick, Fri Jun 5 05:06:31 2009 UTC revision 2471 by jfenwick, Thu Jun 11 23:33:06 2009 UTC
# Line 1176  Data::getValueOfDataPointAsTuple(int dat Line 1176  Data::getValueOfDataPointAsTuple(int dat
1176    }    }
1177    else    else
1178    {    {
1179      // The old method would return an empty numArray of the given shape      // The pre-numpy method would return an empty array of the given shape
1180      // I'm going to throw an exception because if we have zero points per sample we have problems      // I'm going to throw an exception because if we have zero points per sample we have problems
1181      throw DataException("Error - need at least 1 datapoint per sample.");      throw DataException("Error - need at least 1 datapoint per sample.");
1182    }    }
# Line 1273  Data::getValueOfGlobalDataPointAsTuple(i Line 1273  Data::getValueOfGlobalDataPointAsTuple(i
1273      //      //
1274      // Check a valid sample number has been supplied      // Check a valid sample number has been supplied
1275      if ((sampleNo >= getNumSamples()) || (sampleNo < 0 )) {      if ((sampleNo >= getNumSamples()) || (sampleNo < 0 )) {
1276          throw DataException("Error - Data::convertToNumArray: invalid sampleNo.");          throw DataException("Error - Data::getValueOfGlobalDataPointAsTuple: invalid sampleNo.");
1277      }      }
1278    
1279      //      //
1280      // Check a valid data point number has been supplied      // Check a valid data point number has been supplied
1281      if ((dataPointNoInSample >= getNumDataPointsPerSample()) || (dataPointNoInSample < 0)) {      if ((dataPointNoInSample >= getNumDataPointsPerSample()) || (dataPointNoInSample < 0)) {
1282          throw DataException("Error - Data::convertToNumArray: invalid dataPointNoInSample.");          throw DataException("Error - Data::getValueOfGlobalDataPointAsTuple: invalid dataPointNoInSample.");
1283      }      }
1284      // TODO: global error handling      // TODO: global error handling
1285      DataTypes::ValueType::size_type offset=getDataOffset(sampleNo, dataPointNoInSample);      DataTypes::ValueType::size_type offset=getDataOffset(sampleNo, dataPointNoInSample);

Legend:
Removed from v.2461  
changed lines
  Added in v.2471

  ViewVC Help
Powered by ViewVC 1.1.26