Fix TypeError: __class__ assignment: 'TestFlexibleMCP' object layout differs from 'UnboundSelf'

This commit is contained in:
cgohlke
2014-03-10 23:40:14 -07:00
parent f4b260cb33
commit b06d160cb7
+2 -2
View File
@@ -9,7 +9,7 @@ a = np.ones((8, 8), dtype=np.float32)
a[1::2] *= 2.0
class TestFlexibleMCP(mcp.MCP_Flexible):
class FlexibleMCP(mcp.MCP_Flexible):
""" Simple MCP subclass that allows the front to travel
a certain distance from the seed point, and uses a constant
cost factor that is independant of the cost array.
@@ -38,7 +38,7 @@ class TestFlexibleMCP(mcp.MCP_Flexible):
def test_flexible():
# Create MCP and do a traceback
mcp = TestFlexibleMCP(a)
mcp = FlexibleMCP(a)
costs, traceback = mcp.find_costs([(0, 0)])
# Check that inner part is correct. This basically