AttributeError: 'numpy.ndarray' object has no attribute 'shapew3_unittest'

Ok I have two questions here…

  1. The obvious: why am I getting this error? (see attached screenshot)

  2. What is line 6 actually doing?? It looks like Exercise 1 was run and verified in line 5, but line 6 is trying to load a new code that’s failing — presumably based on what I did for Exercise 1, which passed. How can it pass in line 5 but fail in line 6?

Regarding the error in cell [6], I’d say you accidentally edited that cell. It should just say “w3_unittest.test_shape…” etc.

The “X.shape” part has been added by you, it’s not in the original notebook.

There are additional unit tests that are bundled with the notebook, in the w3_unittest module.


@TMosh …yup, that did it! Thank you. Is there a way for us to refer to a copy of the original assignment so we can check to see what the original instructions were as we go?

1 Like

You can only have one copy of the assignment in your Files area. This is because the grader will always use the original notebook file name, regardless of what notebook you have open.

You could do the file-name-three-step, where you rename your current notebook, then use the “Help->Get latest version” button to download a new copy, then rename that copy to be a different name, then re-name your original notebook back to the default name.