Files
FYS-STK4155/doc/LectureNotes/_build/html/reports/exercisesweek42.log
T
Morten Hjorth-Jensen e9d6ea5784 added slides
2024-11-03 14:40:38 +01:00

58 lines
4.7 KiB
Plaintext

Traceback (most recent call last):
File "/Users/mhjensen/miniforge3/envs/myenv/lib/python3.9/site-packages/jupyter_cache/executors/utils.py", line 51, in single_nb_execution
executenb(
File "/Users/mhjensen/miniforge3/envs/myenv/lib/python3.9/site-packages/nbclient/client.py", line 1204, in execute
return NotebookClient(nb=nb, resources=resources, km=km, **kwargs).execute()
File "/Users/mhjensen/miniforge3/envs/myenv/lib/python3.9/site-packages/nbclient/util.py", line 84, in wrapped
return just_run(coro(*args, **kwargs))
File "/Users/mhjensen/miniforge3/envs/myenv/lib/python3.9/site-packages/nbclient/util.py", line 62, in just_run
return loop.run_until_complete(coro)
File "/Users/mhjensen/miniforge3/envs/myenv/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
return future.result()
File "/Users/mhjensen/miniforge3/envs/myenv/lib/python3.9/site-packages/nbclient/client.py", line 663, in async_execute
await self.async_execute_cell(
File "/Users/mhjensen/miniforge3/envs/myenv/lib/python3.9/site-packages/nbclient/client.py", line 965, in async_execute_cell
await self._check_raise_for_error(cell, cell_index, exec_reply)
File "/Users/mhjensen/miniforge3/envs/myenv/lib/python3.9/site-packages/nbclient/client.py", line 862, in _check_raise_for_error
raise CellExecutionError.from_cell_and_msg(cell, exec_reply_content)
nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
------------------
sol1 = np.array([0.60610368, 4.0076268, 0.0, 0.56469864])
print(np.allclose(a1, sol1))
------------------
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[6], line 3
 1 sol1 = np.array([0.60610368, 4.0076268, 0.0, 0.56469864])
----> 3 print(np.allclose(a1, sol1))
File ~/miniforge3/envs/myenv/lib/python3.9/site-packages/autograd/tracer.py:48, in primitive.<locals>.f_wrapped(*args, **kwargs)
 46 return new_box(ans, trace, node)
 47 else:
---> 48 return f_raw(*args, **kwargs)
File ~/miniforge3/envs/myenv/lib/python3.9/site-packages/numpy/core/numeric.py:2241, in allclose(a, b, rtol, atol, equal_nan)
 2170 @array_function_dispatch(_allclose_dispatcher)
 2171 def allclose(a, b, rtol=1.e-5, atol=1.e-8, equal_nan=False):
 2172  """
 2173  Returns True if two arrays are element-wise equal within a tolerance.
 2174
 (...)
 2239
 2240  """
-> 2241 res = all(isclose(a, b, rtol=rtol, atol=atol, equal_nan=equal_nan))
 2242 return bool(res)
File ~/miniforge3/envs/myenv/lib/python3.9/site-packages/numpy/core/numeric.py:2348, in isclose(a, b, rtol, atol, equal_nan)
 2345 dt = multiarray.result_type(y, 1.)
 2346 y = asanyarray(y, dtype=dt)
-> 2348 xfin = isfinite(x)
 2349 yfin = isfinite(y)
 2350 if all(xfin) and all(yfin):
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''
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''