Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: Added the function get_linalg_dir to get the directory containin…
…g scipy.linalg.
- Loading branch information
1 parent
445f9be
commit 5087adc
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from os.path import dirname, realpath | ||
|
||
__all__ = ['get_linalg_dir'] | ||
|
||
def get_linalg_dir(): | ||
""" | ||
Return the directory containing scipy.linalg. | ||
This function should be used to get the proper include directory | ||
to include the proper cython pxd files when using the Cython | ||
wrappers for BLAS and LAPACK. | ||
Notes | ||
----- | ||
When using ``distutils``, for example, in ``setup.py``. | ||
:: | ||
from scipy.linalg import get_linalg_dir | ||
... | ||
Extension('extension_name', ... | ||
include_dirs=[get_linalg_dir()]) | ||
... | ||
""" | ||
# Used to get the proper include directory to include f2pyptr.h | ||
# and the cython pxd files when using the Cython wrappers | ||
# for BLAS and LAPACK. | ||
return dirname(realpath(__file__)) |