Skip to content

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

@brookman1

Description

@brookman1

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions