mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-11 21:12:38 +02:00
Automatic fallback to Numpy if Cython modules not available
This commit is contained in:
parent
276330d1d1
commit
e7a9b53506
5 changed files with 53 additions and 31 deletions
|
|
@ -4,8 +4,11 @@
|
|||
import numpy as np
|
||||
from . import linalg
|
||||
from .config import config
|
||||
|
||||
from . import choleskies_cython
|
||||
try:
|
||||
from . import choleskies_cython
|
||||
config.set('cython', 'working', 'True')
|
||||
except ImportError:
|
||||
config.set('cython', 'working', 'False')
|
||||
|
||||
def safe_root(N):
|
||||
i = np.sqrt(N)
|
||||
|
|
|
|||
|
|
@ -8,10 +8,14 @@
|
|||
import numpy as np
|
||||
from scipy import linalg
|
||||
from scipy.linalg import lapack, blas
|
||||
|
||||
from .config import config
|
||||
import logging
|
||||
from . import linalg_cython
|
||||
|
||||
try:
|
||||
from . import linalg_cython
|
||||
config.set('cython', 'working', 'True')
|
||||
except ImportError:
|
||||
config.set('cython', 'working', 'False')
|
||||
|
||||
|
||||
def force_F_ordered_symmetric(A):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue