Question: Modify your functions to allow the user to provide an axis keyword argument so the calculations can be performed row-by-row or column-by-column on a two-dimensional

 Modify your functions to allow the user to provide an axis

Modify your functions to allow the user to provide an axis keyword argument so the calculations can be performed row-by-row or column-by-column on a two-dimensional array.

Write functions median and mode that use existing NumPy capabilities to determine the median (middle) and mode (most frequent) of the values in an array. Your functions should determine the median and mode regardless of the array's shape. Test your function on three arrays of different shapes

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!