Main Page
+
Namespaces
Namespace List
+
Namespace Members
+
All
_
a
b
c
d
e
f
g
i
l
m
n
p
q
r
s
t
u
v
w
x
y
+
Functions
_
a
c
d
e
f
g
i
m
n
p
r
s
t
u
+
Variables
_
a
b
c
d
e
i
l
m
n
p
q
r
s
t
v
w
x
y
+
Classes
Class List
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
v
w
x
y
~
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
v
w
~
+
Variables
b
c
d
e
f
i
j
l
m
n
o
p
s
t
v
w
x
y
+
Typedefs
_
a
b
c
d
e
f
i
k
l
m
n
p
q
r
s
t
v
Enumerator
Related Functions
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
z
+
Functions
a
b
c
e
f
g
i
l
m
n
p
r
s
t
v
z
+
Variables
a
b
c
d
e
f
g
h
i
k
l
m
o
p
r
s
t
u
v
+
Macros
_
b
e
n
p
benchmarks
bench-switch.py
Go to the documentation of this file.
1
from
__future__
import
print_function
2
3
import
eigenpy
4
import
numpy
as
np
5
6
import
time
# noqa
7
import
timeit
# noqa
8
9
from
IPython
import
get_ipython
10
11
ipython = get_ipython()
12
13
quat = eigenpy.Quaternion()
14
a = [0.0, 0.0, 0.0]
15
16
cmd1 =
"timeit np.array(a)"
17
print
(
"\n"
)
18
print
(cmd1)
19
ipython.magic(cmd1)
20
print
(
"\n"
)
21
22
cmd2 =
"timeit np.matrix(a)"
23
print
(cmd2)
24
ipython.magic(cmd2)
25
print
(
"\n"
)
26
27
cmd4 =
"timeit quat.coeffs()"
28
print
(cmd4)
29
ipython.magic(cmd4)
30
print
(
"\n"
)
31
32
cmd5 =
"timeit np.asmatrix(quat.coeffs())"
33
print
(cmd5)
34
ipython.magic(cmd5)
35
print
(
"\n"
)
36
37
a_matrix = np.matrix(a)
38
cmd6 =
"timeit np.asarray(a_matrix)"
39
print
(cmd6)
40
ipython.magic(cmd6)
41
print
(
"\n"
)
print
void print(const Tensor &tensor)
Definition:
tensor.cpp:35
eigenpy
Author(s): Justin Carpentier, Nicolas Mansard
autogenerated on Fri Jun 2 2023 02:10:26