Question: Problem 12: Averaging chunks Define a function half_ave(a) that will take a square (e.g. 10x10 ) 2D numpy array and will produce a halved (

Problem 12: Averaging chunks Define a function half_ave(a) that will take a square (e.g. 10x10 ) 2D numpy array and will produce a "halved" ( 5x5 for that example) array that averages over 2x2 chunks of the original array. Assume that the size of the input array is always even. See an example below for clarification. Your code goes here: #Your code goes here: #Function definition: def half_ave(ar): #... Problem 12: Averaging chunks Define a function half_ave(a) that will take a square (e.g. 10x10 ) 2D numpy array and will produce a "halved" ( 5x5 for that example) array that averages over 2x2 chunks of the original array. Assume that the size of the input array is always even. See an example below for clarification. Your code goes here: #Your code goes here: #Function definition: def half_ave(ar): #
Step by Step Solution
There are 3 Steps involved in it
Ive opened the image and I can ... View full answer
Get step-by-step solutions from verified subject matter experts
