Skip to content

Commit

Permalink
add scipy compatibility wrapper for mat_struct
Browse files Browse the repository at this point in the history
this should fix the python_modular dynprog example on newer scipy's
  • Loading branch information
Soeren Sonnenburg committed Aug 25, 2011
1 parent 2117954 commit b378001
Showing 1 changed file with 10 additions and 1 deletion.
Expand Up @@ -35,10 +35,19 @@ def mapname(name):
return renametable[name]
return name

# scipy compatibility class
class mat_struct(object):
pass

def mapped_load_global(self):
module = mapname(self.readline()[:-1])
name = mapname(self.readline()[:-1])
klass = self.find_class(module, name)

if name=='mat_struct':
klass=mat_struct
else:
klass = self.find_class(module, name)

self.append(klass)

def loads(str):
Expand Down

0 comments on commit b378001

Please sign in to comment.