1

In my Jupyter notebook I have the following Markdown code block:

    ````python
                                [[0 1 0 0 0 0]
   [0 1 1 0 1 1]       -         [0 0 1 0 0 0]
                                 [0 0 0 0 1 0]
                                 [0 0 0 0 0 1]]
    ````

which is rather unexpectedly rendering asRendering on Nbviewer on my local machine as well as on Nbviewer. In other words the whitespace in front of the first vector [[0 1 0 0 0 0] seems to be getting ignored. I have used single spaces to create this whitespace, not tabs.

Any idea on how to resolve this problem? Thank you.

2
  • 2
    1) It is not valid Python code so it may be rendered in any way whatsoever; use latex equation for vectors and matrices instead 2) You have extra indent, not sure if on purpose. 3) your second line containing a vector is missing one space indentation on the left; after adding the missing space and removing the unneeded indentation level it works both in Jupyter Notebook and JupyterLab Commented Feb 18, 2021 at 13:47
  • Thanks @krassowski, adding one space on the left worked. Commented Feb 19, 2021 at 6:07

0

Your Answer

Draft saved
Draft discarded

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.