Grading error C2_W1_Assignment Excercise 1

I am repeatedly getting 0/30 in the C2_W1_Assignment Exercise 1.
The output from my code exactly matches the expected output.

Failed test case: prices_A has incorrect type.
Expected:
<class ‘jaxlib.xla_extension.DeviceArrayBase’>,
but got:
<class ‘pandas.core.series.Series’>.

Please help me resolve the issue.

Some prices of supplier A: [104. 108. 101. 104. 102.]
Some prices of supplier B: [76. 76. 84. 79. 81.]
Average of the prices, supplier A: 100.799995
Average of the prices, supplier B: 100.0

Expected Output
Some prices of supplier A: [104. 108. 101. 104. 102.]
Some prices of supplier B: [76. 76. 84. 79. 81.]
Average of the prices, supplier A: 100.799995
Average of the prices, supplier B: 100.0

Print some elements and mean values of the prices_A and prices_B arrays.

print(“Some prices of supplier A:”, np.array(prices_A[0:5]))
print(“Some prices of supplier B:”, np.array(prices_B[0:5]))
print(“Average of the prices, supplier A:”, np.mean(np.array(prices_A)))
print(“Average of the prices, supplier B:”, np.mean(np.array(prices_B)))

The grader uses a different set of tests. Passing the tests in the notebook does not prove your code is perfect.

What is your detailed feedback from the grader? Please post a screen capture image.

Here is the output of my code

Your output does not show the data types. That’s what the grader is complaining about.

There must be a problem in the code you added to create prices_A and prices_B.

You only need to use df. and then np.array(…) with the .astype(…) method, providing the correct arguments.

Thank you for guidance Tom. I was able to resolve the issue

That’s good news!