Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.blitz
Commits
670a4a18
Commit
670a4a18
authored
Jul 05, 2018
by
Tiago de Freitas Pereira
Browse files
[sphinx] Fixed doctest
parent
6d134e0f
Pipeline
#21616
passed with stage
in 19 minutes and 53 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
doc/guide.rst
View file @
670a4a18
...
...
@@ -36,7 +36,7 @@ You can build a new :py:class:`bob.blitz.array` using one of two possible ways:
>>> a = bob.blitz.array((2,), 'uint8')
>>> a[0] # doctest: +SKIP
145
a[0]==
145
2. Use the :py:func:`bob.blitz.as_blitz` generic converter. This function takes any
object that is convertible to a :py:class:`numpy.ndarray`, convert it to a
...
...
@@ -80,8 +80,8 @@ using the normal python indexing operatiors ``[]``:
>>> a = bob.blitz.array(2, 'float64')
>>> a[0] = 3.2
>>> a[1] = 6.14
>>>
print(
a)
[ 3.2 6.14]
>>>
numpy.allclose(numpy.array([3.2, 6.14]),
a)
True
>>> t = a[1]
>>> print(t)
6.14
...
...
@@ -95,8 +95,8 @@ You can convert :py:class:`bob.blitz.array` objects into either (shallow)
>>> a[0] = complex(3,4)
>>> a[1] = complex(2,2)
>>> npy = a.as_ndarray()
>>>
print(npy
)
[ 3.+4.j 2.+2.j]
>>>
numpy.allclose(numpy.array([ 3.+4.j, 2.+2.j]),a
)
True
>>> id(npy.base) == id(a)
True
>>> print(npy.flags.owndata)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment