I believe it's a problem of installed versions that differ between CW and what you have at your place. Try this:
print something to the console just before the return statement (but do return only a variable, don't put any statement in the return line)
if you see the statement in the console, that means the error comes from the assertion process. In that case, just convert your numpy array to a regular list before returning it. (edit: oh, but you have to return string, right. So next point, I guess)
if not, that means you do a boolean check somewhere. Then apply what's recommanded in the error message.
This comment is hidden because it contains spoiler information about the solution
the break after a return is redundant, a return end execution and breaks out of the switch.
Description states: I expect a 3x3 square back just like below as a string.
This comment is hidden because it contains spoiler information about the solution
"don't use numpy" ? x)
I believe it's a problem of installed versions that differ between CW and what you have at your place. Try this:
return
line)Sure, my code however fails to return anything. Instead of generating a 2d array it throws an error.
You have to return a string.
This comment is hidden because it contains spoiler information about the solution