Question: Write a Python function that takes two three-dimensional numeric data sets and adds them componentwise. Hint: The entries A[i][j][k] and B[i][j][k] are the ones that
Write a Python function that takes two three-dimensional numeric data sets and adds them componentwise.
Hint: The entries A[i][j][k] and B[i][j][k] are the ones that need to be added.
Note: Create a function named three_dimension_add(A, B). In the test code, print out the two three-dimensional arrays and the result of the addition of these two arrays.
For example, following format represents a two-dimensional array:
data = [[22, 18, 709, 5, 33], [45, 32, 830, 120, 750], [4, 880, 45, 66, 61]]
Consider how to represent a three-dimensional array, and print the array in a corresponding format.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
