Commit c2518991 authored by André Anjos's avatar André Anjos 💬
Browse files

Fix doc errors in Python 2.x

parent 4ea13f7c
Pipeline #4603 passed with stages
in 28 minutes and 38 seconds
...@@ -22,7 +22,7 @@ auto array_doc = bob::extension::ClassDoc( ...@@ -22,7 +22,7 @@ auto array_doc = bob::extension::ClassDoc(
"array", "array",
"Constructs a new :py:class:`bob.blitz.array`", "Constructs a new :py:class:`bob.blitz.array`",
"The implementation current supports a maximum of 4 dimensions. " "The implementation current supports a maximum of 4 dimensions. "
"Building an array with more dimensions will raise a :py:class:`TypeError`. " "Building an array with more dimensions will raise a :py:exc:`TypeError`. "
"There are no explicit limits for the size in each dimension, except for the machine's maximum address size.\n\n" "There are no explicit limits for the size in each dimension, except for the machine's maximum address size.\n\n"
"The following numpy data types are supported by this library:\n\n" "The following numpy data types are supported by this library:\n\n"
" * :py:class:`numpy.bool_`\n" " * :py:class:`numpy.bool_`\n"
......
...@@ -20,7 +20,7 @@ auto as_blitz = bob::extension::FunctionDoc( ...@@ -20,7 +20,7 @@ auto as_blitz = bob::extension::FunctionDoc(
"Converts any compatible python object into a shallow :py:class:`" BOB_EXT_MODULE_PREFIX ".array`", "Converts any compatible python object into a shallow :py:class:`" BOB_EXT_MODULE_PREFIX ".array`",
"This function works by first converting the input object ``x`` into a :py:class:`numpy.ndarray` and then shallow wrapping that ``ndarray`` into a new :py:class:`" BOB_EXT_MODULE_PREFIX ".array`. " "This function works by first converting the input object ``x`` into a :py:class:`numpy.ndarray` and then shallow wrapping that ``ndarray`` into a new :py:class:`" BOB_EXT_MODULE_PREFIX ".array`. "
"You can access the converted ``ndarray`` using the returned value's :py:meth:`" BOB_EXT_MODULE_PREFIX ".array.base` attribute. " "You can access the converted ``ndarray`` using the returned value's :py:meth:`" BOB_EXT_MODULE_PREFIX ".array.base` attribute. "
"If the ``ndarray`` cannot be shallow-wrapped, a :py:class:`ValueError` is raised.\n\n" "If the ``ndarray`` cannot be shallow-wrapped, a :py:exc:`ValueError` is raised.\n\n"
"In the case the input object ``x`` is already a behaved (C-style, memory-aligned, contiguous) :py:class:`numpy.ndarray`, then this function only shallow wrap's it into a :py:class:`" BOB_EXT_MODULE_PREFIX ".array` skin." "In the case the input object ``x`` is already a behaved (C-style, memory-aligned, contiguous) :py:class:`numpy.ndarray`, then this function only shallow wrap's it into a :py:class:`" BOB_EXT_MODULE_PREFIX ".array` skin."
) )
.add_prototype("x", "array") .add_prototype("x", "array")
......
...@@ -26,3 +26,7 @@ py:class numpy.float128 ...@@ -26,3 +26,7 @@ py:class numpy.float128
py:class numpy.complex64 py:class numpy.complex64
py:class numpy.complex128 py:class numpy.complex128
py:class numpy.complex256 py:class numpy.complex256
# not sure why these don't work
py:exc ValueError
py:exc TypeError
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment