Advertisement
Guest User

code

a guest
Sep 4th, 2019
18,400
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. TypeError Traceback (most recent call last)
  2. <ipython-input-28-bcad79cb17df> in <module>()
  3. 2
  4. 3 # You cannot and should update this cell. Just run it
  5. ----> 4 check('Q9 graph', q9_graph, points=5)
  6.  
  7. ~\Dropbox\Comp 116\assignments\A1\comp116.py in check(tag, val, *args, **kwargs)
  8. 1001
  9. 1002 elif isinstance(ev, dict) and 'FigureState' in ev:
  10. -> 1003 score = check_figure(tag, value, ev, extra)
  11. 1004
  12. 1005 elif isinstance(ev, float):
  13.  
  14. ~\Dropbox\Comp 116\assignments\A1\comp116.py in check_figure(tag, given, ev, extra)
  15. 824 LOK[j] = (len(eline[0]) == len(gline[0]) and
  16. 825 len(eline[1]) == len(gline[1]) and
  17. --> 826 np.allclose(eline[0], gline[0], rtol=rtol, atol=atol) and
  18. 827 np.allclose(eline[1], gline[1], rtol=rtol, atol=atol))
  19. 828 if LOK[j]:
  20.  
  21. ~\Anaconda3\lib\site-packages\numpy\core\numeric.py in allclose(a, b, rtol, atol, equal_nan)
  22. 2268
  23. 2269 """
  24. -> 2270 res = all(isclose(a, b, rtol=rtol, atol=atol, equal_nan=equal_nan))
  25. 2271 return bool(res)
  26. 2272
  27.  
  28. ~\Anaconda3\lib\site-packages\numpy\core\numeric.py in isclose(a, b, rtol, atol, equal_nan)
  29. 2362
  30. 2363 xfin = isfinite(x)
  31. -> 2364 yfin = isfinite(y)
  32. 2365 if all(xfin) and all(yfin):
  33. 2366 return within_tol(x, y, atol, rtol)
  34.  
  35. 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''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement