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