/[escript]/trunk/escript/py_src/modelframe.py
ViewVC logotype

Diff of /trunk/escript/py_src/modelframe.py

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

revision 2470 by jfenwick, Wed Jun 3 03:29:07 2009 UTC revision 2471 by jfenwick, Thu Jun 11 23:33:06 2009 UTC
# Line 670  class ParameterSet(LinkableObject): Line 670  class ParameterSet(LinkableObject):
670                      shape = [int(x) for x in shape.split()]                      shape = [int(x) for x in shape.split()]
671                  if node.tagName == 'Data':                  if node.tagName == 'Data':
672                      data = node.firstChild.nodeValue.strip()                      data = node.firstChild.nodeValue.strip()
673                      data = [float(x) for x in data.split()]          ndtype=getattr(numpy,arraytype)
674              return numpy.reshape(numpy.array(data, dtype=getattr(numpy, arraytype)),          if ndtype==numpy.bool_:
675            data=[(x=="True") for x in data.split()]
676            else:
677            data=[ndtype(x) for x in data.split()]
678                return numpy.reshape(numpy.array(data, dtype=ndtype),
679                                      shape)                                      shape)
680    
681          def _listfromValue(esysxml, node):          def _listfromValue(esysxml, node):

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

  ViewVC Help
Powered by ViewVC 1.1.26