C3 W1 Assignment - Cannot Assign to None

Hi all,

I cannot submit the assignment due to weird grader errors, such as this one:
There was a problem compiling the code from your notebook. Details:
cannot assign to None (, line 424)
For instance, I reset the assignment, then only put the code of the first function uniform_generator() as follows:

array = np.random.uniform(a, b, num_samples)

This is the right solution, and when I check it with the next cell, I get the expected output:

6 randomly generated values between 0 and 1: [0.375 0.951 0.732 0.599 0.156 0.156]
3 randomly generated values between 20 and 55: [33.109 53.275 45.62 ]
1 randomly generated value between 0 and 100: [37.454]

I then submit the assignment with this code only and still get the above error from the grader for the uniform_generator() function. What am I doing wrong? Please reply ASAP, I’m wasting hours on this stupid exercise.


Is there a lesson on how to use numpy to calculate determinant? I do not seen to find it in the videos

Not in C3. However, what you’re looking is numpy.linalg.det (numpy.linalg.det — NumPy v1.25 Manual).

You could refer numpy’s documentation for that.

@verner.alexander did you figure out how to fix? I am getting the exact same error.

There is another thread with a similar issue.

@Paige_Lee. No, I didn’t, sorry. But I have this assignment solved. Send me a personal note, and I’ll send you the solution.