2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 8
8
from qstack import spahm
9
9
from qstack import mathutils
10
10
from qstack import orcaio
11
+ from qstack import qml
12
+ if 'b2r2' not in dir (qml ):
13
+ del qml
11
14
15
+
16
+ # qstack.regression needs sklearn to work
12
17
try :
13
18
import sklearn
14
19
except ImportError :
Original file line number Diff line number Diff line change
1
+ # qstack.qml is in a different python package
2
+ # but prefer "the local version of it" if we are in a development environment, and both sources are there.
3
+ import os
4
+ _qstack_qml_path = os .path .join (os .path .dirname (__file__ ), 'qstack-qml' )
5
+ if os .path .isfile (os .path .join (_qstack_qml_path , 'qstack_qml' , '__init__.py' )):
6
+ import sys
7
+ sys .path .insert (0 ,_qstack_qml_path )
8
+ from qstack_qml import *
9
+ sys .path .pop (0 )
10
+ del sys
11
+ else :
12
+ try :
13
+ from qstack_qml import *
14
+ except ImportError :
15
+ pass
16
+ del os , _qstack_qml_path
0 commit comments