Closed Morri2676 closed 1 month ago
Hi, Why Are you using it like that? Considering how to import the library, you should do one of these:
import pymnet
# Create an instance of it :
two_layer_net = pymnet.MultilayerNetwork()
# For it to be a neet work :
two_layer_net.add_layer('a')
two_layer_net.add_layer('b')
two_layer_net.add_node(4,'a')
two_layer_net.add_node(4, 'b')
# And then :
two_layer_net[4, 4, 'a', 'b'] = 1
pymnet.draw(two_layer_net , layout="circle", show = True )
OR
from pymnet import *
# Create an instance of it :
two_layer_net = MultilayerNetwork()
# For it to be a neet work :
two_layer_net.add_layer('a')
two_layer_net.add_layer('b')
two_layer_net.add_node(4,'a')
two_layer_net.add_node(4, 'b')
# And then :
two_layer_net[4, 4, 'a', 'b'] = 1
draw(two_layer_net , layout="circle", show = True)
Be Aware: The option for layout is"circle" , Not 'circlar' !!!
Hi, it is not clear where the error is occurring. The error message shows that you're trying to call a method of a None
object, which I couldn't replicate with the draw
function. If you want to draw the network into a specific axes
object, you can use the ax
parameter of draw
.
AttributeError Traceback (most recent call last)