Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grader fails on all tests, seems like type info is getting lost, isfinite datatype check can't be applied. #4

Open
brookman1 opened this issue Sep 7, 2022 · 1 comment

Comments

@brookman1
Copy link

The graded function specifically returns:

    return covariance_matrix.astype('float64')

not sure how the grader changes the type, this is failing for all 4 tests.

======================================================================
ERROR: test_cov (week1_tests.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/autograde_pnpmxbbt/week1_tests.py", line 32, in test_cov
    np.testing.assert_allclose(result, cov(X))
  File "/opt/conda/lib/python3.7/site-packages/numpy/testing/_private/utils.py", line 1533, in assert_allclose
    verbose=verbose, header=header, equal_nan=equal_nan)
  File "/opt/conda/lib/python3.7/site-packages/numpy/testing/_private/utils.py", line 794, in assert_array_compare
    val = comparison(x, y)
  File "/opt/conda/lib/python3.7/site-packages/numpy/testing/_private/utils.py", line 1528, in compare
    equal_nan=equal_nan)
  File "<__array_function__ internals>", line 6, in isclose
  File "/opt/conda/lib/python3.7/site-packages/numpy/core/numeric.py", line 2257, in isclose
    xfin = isfinite(x)
TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

It appears to fail for functions defined in this notebook here as well.

@brookman1
Copy link
Author

As it turns out the submission doesn't work until notebook is exported as .ipynb and then imported back in for grading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant