Question: USE PYTHON SYNTAX. PLEASE ANSWER ALL AND EXPLAIN THE CODES USED TO GET ANSWER. 1) Basic array operations (think about what is going on in
USE PYTHON SYNTAX. PLEASE ANSWER ALL AND EXPLAIN THE CODES USED TO GET ANSWER.
1) Basic array operations (think about what is going on in these operations): Write the expressions that create arrays h and g with following data:
h = g =
(0.5 points) What is the result of the expression h + g?
(0.25 points) What is the result of the expression numpy.sum(h + g, axis = 1)?
(0.25 points) What is the result of the expression numpy.sum(h + g, axis = 0)?
(0.25 points) What is the interpretation of the attribute axis in numpy.sum()?
(0.25 points) What is the result of mask = g [: ,0] > 0? What type of values does mask
contain?
(0.25 points) What is the result of g[mask, : ]? What does mask do?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
