Cytnx
Cytnx copied to clipboard
Kernel crash when try to get a non-existing block.
If a UniTensor has 3 blocks. UniTensor.get_block(3) will crash the kernel.
This might be related to issue #357 .
I guess this is the expected behavior. The index of blocks starts from zero. If my_unitensor has three blocks:
my_unitensor.get_block(0) # OK
my_unitensor.get_block(1) # OK
my_unitensor.get_block(2) # OK
my_unitensor.get_block(3) # raise RuntimeError in Python