Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Tutorials] Handle various types of cell source
This is a duplicate of the same code change in botorch: pytorch/botorch#2752 I was noticing that sometimes (depending on a variety of factors like the editor used to modify the tutorial, whether they had been executed) the conversion script would fail because the cell source would be stored as a list of strings instead of a multi-line string. From the official nbformat documentation: > Some fields, such as code input and text output, are characteristically multi-line strings. When these fields are written to disk, they may be written as a list of strings, which should be joined with '' when reading back into memory. In programmatic APIs for working with notebooks (Python, Javascript), these are always re-joined into the original multi-line string. If you intend to work with notebook files directly, you must allow multi-line string fields to be either a string or list of strings. https://ipython.readthedocs.io/en/3.x/notebook/nbformat.html
- Loading branch information