Question: 7) Define a function smartstack() that will take two 2D arrays of any size. It should: a) merge them horizontally if the arrays have the

7) Define a function "smartstack()" that will take two 2D arrays of any size. It should: a) merge them horizontally if the arrays have the same number of rows or b) merge them vertically if the arrays have the same number of columns. Then return the bigger merged array. If both dimensions match, it can return either orientation. If there are no dimensions that share the same size, the function should raise an error (use Google to figure out how to make your function raise an error). Make sure to test out your function to see if it works
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
