8000 Import the matlab engine first · Calysto/matlab_kernel@e3ce32e · GitHub
[go: up one dir, main page]

Skip to content

Commit e3ce32e

Browse files
committed
Import the matlab engine first
1 parent 2090e3e commit e3ce32e

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

matlab_kernel/kernel.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
try:
2+
import matlab.engine
3+
from matlab.engine import MatlabExecutionError
4+
except ImportError:
5+
matlab = None
16
from functools import partial
27
try:
38
from StringIO import StringIO
@@ -20,12 +25,6 @@
2025
except ImportError:
2126
Wurlitzer = None
2227

23-
try:
24-
import matlab.engine
25-
from matlab.engine import MatlabExecutionError
26-
except ImportError:
27-
matlab = None
28-
2928

3029
class _PseudoStream:
3130

0 commit comments

Comments
 (0)
0