Answer to Question #147685 in Python for Joseph Se

Question #147685
Consider the following variables in Python:

a1 = np.random.rand(4)
a2 = np.random.rand(4, 1)
a3 = np.array([[1, 2, 3, 4]])
a4 = np.arange(1, 4, 1)
a5 = np.linspace(1 ,4, 4)

Which of the following statements regarding these variables is correct?

A. a3.shape == a4.shape
B. a4.ndim() == 1
C. a5.shape == a1.shape
D. a1.shape == a2.shape
1
Expert's answer
2020-11-29T23:45:30-0500

C. a5.shape == a1.shape


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS