# numpy_intro.py
"""Introductory Labs: Intro to NumPy.
"""
def prob1():
"""Define the matrices A and B as arrays. Return the matrix product AB."""
pass
def prob2():
"""Define the matrix A as an array. Return the matrix -A^3 + 9A^2 - 15A."""
pass
def prob3():
"""Define the matrices A and B as arrays. Calculate the matrix product ABA,
change its data type to np.int64, and return it.
"""
pass
def prob4(A):
"""Make a copy of 'A' and set all negative entries of the copy to 0.
Return the copy.
Example:
>>> A = np.array([-3,-1,3])
>>> prob4(A)
array([0, 0, 3])
"""
pass
def prob5():
"""Define the matrices A, B, and C as arrays. Return the block matrix
| 0 A^T I |
| A 0 0 |,
| B 0 C |
where I is the identity matrix of appropriate size and each 0 is a matrix
of all zeros, also of appropriate sizes.
"""
pass
def prob6(A):
"""Divide each row of 'A' by the row sum and return the resulting array.
Example:
>>> A = np.array([[1,1,0],[0,1,0],[1,1,1]])
>>> prob6(A)
array([[ 0.5 , 0.5 , 0. ],
[ 0. , 1. , 0. ],
[ 0.33333333, 0.33333333, 0.33333333]])
"""
pass
def prob7():
"""Given the array stored in grid.npy, return the greatest product of four
adjacent numbers in the same direction (up, down, left, right, or
diagonally) in the grid.
"""
pass