I am trying to complete this assignment but I am hitting an error while running the tests for the cost function implementation checks.

While the previous tests returned the correct data I am hitting an error that doesn’t seem related to the results computed by my code, but mostly to how I implemented it (or so it seems).

To run the computations only on the films rated by the users I have used Numpy’s array masking (e.g.

`valid_data = np.ma.masked_where(R == 0, Y)`

). I am wondering if that breaks something in the tests somehow.If that’s the case I’ll change my implementation.