cppextensions: Fix example code

4 jobs for master in 462 minutes and 4 seconds (queued for 4 seconds)
Status Job ID Name Coverage
  Test
failed #4078
amd64
job_clang_amd64

06:45:30

failed #4080
amd64
job_clang_amd64_nosh

06:41:47

failed #4077
amd64
job_gcc_amd64

07:42:04

failed #4079
amd64
job_gcc_amd64_nosh

07:05:56

 
Name Stage Failure
failed
job_gcc_amd64 Test
<string>:53: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`).
<string>:53: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`).
<string>:53: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`).
<string>:53: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`).
<string>:1: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`).
<string>:1: UserWarning: tight_layout : falling back to Agg renderer
<string>:53: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`).
<string>:53: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`).
ERROR: Job failed: exit status 1
failed
job_gcc_amd64_nosh Test
Doctest summary
===============
1199 tests
2 failures in tests
0 failures in setup code
0 failures in cleanup code
build finished with problems, 19 warnings.
<string>:1: UserWarning: tight_layout : falling back to Agg renderer
ERROR: Job failed: exit status 1
failed
job_clang_amd64 Test
    5 failures in tests
0 failures in setup code
0 failures in cleanup code
build finished with problems, 19 warnings.
/var/lib/gitlab-runner/builds/c098b1de/1/count0/graph-tool/doc/price.py:104: UserWarning: tight_layout : falling back to Agg renderer
tight_layout()
<string>:53: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`).
<string>:53: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`).
ERROR: Job failed: exit status 1
failed
job_clang_amd64_nosh Test
===============
1199 tests
5 failures in tests
0 failures in setup code
0 failures in cleanup code
build finished with problems, 19 warnings.
<string>:53: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`).
<string>:53: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`).
ERROR: Job failed: exit status 1