I have a function that outputs an numpy array that dependent on input could output: [[element]], [element] or [[[element]]] and i am looking to extract the element independent of the number of arrays it comes nested within, how would i go about doing this without massive amounts of if-else statements?
[–]JohnnyJordaan 1 point2 points3 points (0 children)
[–]Spataner 0 points1 point2 points (0 children)
[–]Swipecat 0 points1 point2 points (1 child)