ioam / topographica

A general-purpose neural simulator focusing on topographic maps.
topographica.org
BSD 3-Clause "New" or "Revised" License
53 stars 32 forks source link

An error in topo.sheet.optimized.NeighborhoodMask_Opt() #676

Open kalok87 opened 6 years ago

kalok87 commented 6 years ago

topo.sheet.optimized.NeighborhoodMask_Opt()

TypeError: init() takes exactly 2 arguments (1 given)

The reason for this error is that the init is missing in the codes of NeighborhoodMask_Opt.

jbednar commented 6 years ago

That error indicates that you aren't instantiating it with the correct argument. NeighborhoodMask_Opt inherits its constructor from NeighborhoodMask, which requires a "sheet" argument (topo.sim.V1 or similar).

jbednar commented 6 years ago

You can do help(topo.sheet.optimized.NeighborhoodMask_Opt) for more information.

kalok87 commented 6 years ago

Dear Prof. Bednar. The situation is like this. I was running gcal.ty in gui mode for 2000 rounds, and then I saved the script at somewhere else, this was running flawlessly. In the second time, I loaded the saved script in topopgrahica and then this error appears. How should I set up the arguments?

jbednar commented 6 years ago

Ah, sounds like the script that's generated doesn't contain all the details necessary to reconstruct this particular network. In this case, you'd probably need to hand-edit the generated .ty file to supply the missing information, which in this case is probably an argument of topo.sim.V1. However, if this mask is being defined within topo.sim.V1's constructor, that could get tricky, as topo.sim.V1 won't exist yet. It's hard to see without the .ty file involved.