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
3ae7c065
Commit
3ae7c065
authored
Jul 05, 2018
by
Amir MOHAMMADI
Browse files
Merge branch 'issue-12' into 'master'
[sphinx] Fixed doctest Closes
#12
See merge request
!11
parents
6d134e0f
670a4a18
Pipeline
#21617
passed with stages
in 7 minutes and 13 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
doc/guide.rst
View file @
3ae7c065
...
...
@@ -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