ssm_old.log 6.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. Traceback (most recent call last):
  2. File "/opt/anaconda3/lib/python3.8/site-packages/jupyter_cache/executors/utils.py", line 51, in single_nb_execution
  3. executenb(
  4. File "/opt/anaconda3/lib/python3.8/site-packages/nbclient/client.py", line 1087, in execute
  5. return NotebookClient(nb=nb, resources=resources, km=km, **kwargs).execute()
  6. File "/opt/anaconda3/lib/python3.8/site-packages/nbclient/util.py", line 74, in wrapped
  7. return just_run(coro(*args, **kwargs))
  8. File "/opt/anaconda3/lib/python3.8/site-packages/nbclient/util.py", line 53, in just_run
  9. return loop.run_until_complete(coro)
  10. File "/opt/anaconda3/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
  11. return future.result()
  12. File "/opt/anaconda3/lib/python3.8/site-packages/nbclient/client.py", line 540, in async_execute
  13. await self.async_execute_cell(
  14. File "/opt/anaconda3/lib/python3.8/site-packages/nbclient/client.py", line 832, in async_execute_cell
  15. self._check_raise_for_error(cell, exec_reply)
  16. File "/opt/anaconda3/lib/python3.8/site-packages/nbclient/client.py", line 740, in _check_raise_for_error
  17. raise CellExecutionError.from_cell_and_msg(cell, exec_reply['content'])
  18. nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
  19. ------------------
  20. # Filtering
  21. fig, ax = plt.subplots()
  22. plot_inference(filtered_dist, z_hist, ax)
  23. ax.set_ylabel("p(loaded)")
  24. ax.set_title("Filtered")
  25. ------------------
  26. ---------------------------------------------------------------------------
  27. ValueError Traceback (most recent call last)
  28. <ipython-input-17-a3a9c11b46bd> in <module>
  29.  1 # Filtering
  30.  2 fig, ax = plt.subplots()
  31. ----> 3 plot_inference(filtered_dist, z_hist, ax)
  32.  4 ax.set_ylabel("p(loaded)")
  33.  5 ax.set_title("Filtered")
  34. <ipython-input-16-9c8ddad3f57c> in plot_inference(inference_values, z_hist, ax, state, map_estimate)
  35.  3 n_samples = len(inference_values)
  36.  4 xspan = np.arange(1, n_samples + 1)
  37. ----> 5 spans = find_dishonest_intervals(z_hist)
  38.  6 if map_estimate:
  39.  7 ax.step(xspan, inference_values, where="post")
  40. <ipython-input-15-4606c615e17a> in find_dishonest_intervals(z_hist)
  41.  4 x_init = 0
  42.  5 for t, _ in enumerate(z_hist[:-1]):
  43. ----> 6 if z_hist[t + 1] == 0 and z_hist[t] == 1:
  44.  7 x_end = t
  45.  8 spans.append((x_init, x_end))
  46. /opt/anaconda3/lib/python3.8/functools.py in _method(cls_or_self, *args, **keywords)
  47.  397 def _method(cls_or_self, /, *args, **keywords):
  48.  398 keywords = {**self.keywords, **keywords}
  49. --> 399 return self.func(cls_or_self, *self.args, *args, **keywords)
  50.  400 _method.__isabstractmethod__ = self.__isabstractmethod__
  51.  401 _method._partialmethod = self
  52. /opt/anaconda3/lib/python3.8/site-packages/jax/_src/device_array.py in _forward_method(attrname, self, fun, *args)
  53.  39 
  54.  40 def _forward_method(attrname, self, fun, *args):
  55. ---> 41 return fun(getattr(self, attrname), *args)
  56.  42 _forward_to_value = partial(_forward_method, "_value")
  57.  43 
  58. ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
  59. ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()