0

I'm using sphinx with numpydoc extension.

when I make html, every last item in my 'Examples' paragraph is broken.

This is what I try to make document :

        """
        ...
        Examples
        --------
        Example of using gauss_elem with no option:

        >>> a = Matrix([[1,2,3],[2,5,3],[1,0,8]])
        >>> print(a.gauss_elem())
        [[-40 16  9]
         [ 13 -5 -3]
         [  5 -2 -1]]

        Example of using gauss_elem with option:

        >>> b = Matrix([[1,0,0],[0,1,0],[0,1,1]])
        >>> print(a.gauss_elem(b))
        [[-40 16  9]
         [ 13 -5 -3]
         [  5 -2 -1]]

        Example of using step by step solution:

        >>> a.gauss_elem(step_by_step=True)

        1 2 3 | 1 0 0
        2 5 3 | 0 1 0
        1 0 8 | 0 0 1
        Add row 1 * -2 to row 2
            ...

        """

But output is like this. Output image link with broken format at last element

What is problem with this?

Edited

As Steve Piercy said, I changed my code, and it now work for gauss_elem.

But, there are two more problem.

Here is another docstring:

        """
        ...
        Examples
        --------
        Example of using inv_using_det:

        >>> a = Matrix([[1,2,3],[2,5,3],[1,0,8]]
        >>> print(a.inv_using_det())
        [[-40 16  9]
         [ 13 -5 -3]
         [  5 -2 -1]]

        Example of using step by step solution:

        >>>a.inv_using_det(step_by_step=True)
        Get adjugate matrix before transpose
        [[ 40 -13 -5]
         [-16   5  2]
         [ -9   3  1]]
        Transpose it
            ...
        """

And here is another Output with broken format.

LegenDUST
  • 142
  • 9

1 Answers1

0

All right. I found solution with my question.

Problem was here : >>>a.get_inv_using_det

It had to be : >>> a.get_inv_using_det

It works fine now.

LegenDUST
  • 142
  • 9