repo.or.cz
/
geany-mirror.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Use consistent shadows across Geany
[geany-mirror.git]
/
tests
/
ctags
/
cython_sample2.pyx
blob
59585cb829c12b24061032a15ef74cf83d3d9dd2
1
# -*- cython-mode -*-
2
# test code for cython functionality with complex datatypes
3
4
import
numpy
as
np
5
cimport numpy
as
np
6
7
cpdef np
.
ndarray
[
dtype
=
double
,
ndim
=
1
]
my_fun
(
np
.
ndarray
[
dtype
=
double
,
ndim
=
1
]
x
):
8
cdef
np
.
ndarray
[
dtype
=
double
,
ndim
=
1
,
mode
=
"c"
]
res
9
10
res
=
2
*
x
11
return
res