Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
kwant
tkwant
Commits
0e1cd06e
Commit
0e1cd06e
authored
Aug 20, 2020
by
Kloss
Browse files
move solvers module from cython to python
parent
cf3870be
Pipeline
#41974
passed with stages
in 26 minutes and 48 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
setup.py
View file @
0e1cd06e
...
...
@@ -43,11 +43,6 @@ CYTHON_TRACE_OPTION = '--cython-trace'
MANIFEST_IN_FILE
=
'MANIFEST.in'
SPARSELIB
=
None
distr_root
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
SCIPY_SOLVER_DIR
,
SCIPY_SOLVER_LIB
=
os
.
path
.
split
(
scipy
.
integrate
.
_dop
.
__file__
)
# Leading colon specifies that the name is the actual filename, otherwise the
# linker looks for 'lib<name>.so'; SCIPY_SOLVER_LIB is not of this form.
SCIPY_SOLVER_LIB
=
':'
+
SCIPY_SOLVER_LIB
# Let tkwant itself determine its own version.
# We cannot simply import tkwant, as it is not built yet.
...
...
@@ -212,17 +207,6 @@ def extensions():
'tkwant/linalg/blas_sparse.pxd'
]}))
)
# solvers
result
.
append
(([
'tkwant.onebody.solvers'
,
[
'tkwant/onebody/solvers.pyx'
]],
{
'libraries'
:
[
SCIPY_SOLVER_LIB
],
'extra_link_args'
:
[
'-Wl,-rpath={}'
.
format
(
SCIPY_SOLVER_DIR
)],
'library_dirs'
:
[
SCIPY_SOLVER_DIR
],
'include_dirs'
:
[
'tkwant/onebody'
],
'depends'
:
[
'tkwant/onebody/kernels.pxd'
],
}
))
#### Add cython tracing macro
if
trace_cython
:
for
args
,
kwargs
in
result
:
...
...
tkwant/onebody/solvers.py
x
→
tkwant/onebody/solvers.py
View file @
0e1cd06e
# -*- coding: utf-8 -*-
#
# Copyright 2016
-2018
tkwant authors.
# Copyright 2016 tkwant authors.
#
# This file is part of tkwant. It is subject to the license terms in the file
# LICENSE.rst found in the top-level directory of this distribution and at
...
...
@@ -12,9 +12,6 @@
import
numpy
as
np
import
scipy.integrate
from
.
cimport
kernels
from
.
import
kernels
__all__
=
[
'Scipy'
]
...
...
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