Skip to content
Snippets Groups Projects
Commit e8bbf73f authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

[sphinx] Fixed doc test

parent b6394ccb
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -52,10 +52,8 @@ the :py:func:`bob.ip.base.scale` function of |project| is then called to up-scal ...@@ -52,10 +52,8 @@ the :py:func:`bob.ip.base.scale` function of |project| is then called to up-scal
:options: +NORMALIZE_WHITESPACE :options: +NORMALIZE_WHITESPACE
>>> bob.ip.base.scale(A, B) >>> bob.ip.base.scale(A, B)
>>> print(B) >>> numpy.allclose(B, [[ 1.,1.5, 2., 2.5, 3.],[ 2.5, 3.,3.5, 4., 4.5],[ 4.,4.5, 5., 5.5,6. ]])
[[ 1. 1.5 2. 2.5 3. ] True
[ 2.5 3. 3.5 4. 4.5]
[ 4. 4.5 5. 5.5 6. ]]
which bi-linearly interpolates image A to image B. Of course, scaling factors which bi-linearly interpolates image A to image B. Of course, scaling factors
can be different in horizontal and vertical direction: can be different in horizontal and vertical direction:
...@@ -65,10 +63,8 @@ can be different in horizontal and vertical direction: ...@@ -65,10 +63,8 @@ can be different in horizontal and vertical direction:
>>> C = numpy.ndarray( (2, 5), dtype = numpy.float64 ) >>> C = numpy.ndarray( (2, 5), dtype = numpy.float64 )
>>> bob.ip.base.scale(A, C) >>> bob.ip.base.scale(A, C)
>>> print(C) >>> numpy.allclose(C, [[1., 1.5, 2., 2.5, 3.],[4., 4.5, 5., 5.5, 6. ]])
[[ 1. 1.5 2. 2.5 3. ] True
[ 4. 4.5 5. 5.5 6. ]]
Rotating images Rotating images
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~
...@@ -96,10 +92,8 @@ After the creation of the image in the desired size, the ...@@ -96,10 +92,8 @@ After the creation of the image in the desired size, the
>>> A_rotated = numpy.ndarray( rotated_shape, dtype = numpy.float64 ) # A small image of rotated size >>> A_rotated = numpy.ndarray( rotated_shape, dtype = numpy.float64 ) # A small image of rotated size
>>> bob.ip.base.rotate(A, A_rotated, 90) # execute the rotation >>> bob.ip.base.rotate(A, A_rotated, 90) # execute the rotation
>>> print(A_rotated) >>> numpy.allclose(A_rotated, [[ 3., 6.],[ 2., 5.],[ 1., 4.]])
[[ 3. 6.] True
[ 2. 5.]
[ 1. 4.]]
Complex image operations Complex image operations
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment