Skip to content

Commit 7a1893b

Browse files
committed
[Enh] Moved imports to local
1 parent 4bab1c4 commit 7a1893b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

spm/__wrapper__/matlab_class.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from .core import MatlabType
2-
from .runtime import Runtime
32

43
import numpy as np
54
import warnings
@@ -8,9 +7,10 @@ class MatlabClass(MatlabType):
87
_subclasses = dict()
98

109
def __new__(cls, *args, _objdict=None, **kwargs):
11-
1210
if _objdict is None:
1311
if cls.__name__ in MatlabClass._subclasses.keys():
12+
from .runtime import Runtime
13+
1414
obj = Runtime.call(cls.__name__, *args, **kwargs)
1515
else:
1616
obj = super().__new__(cls)
@@ -96,6 +96,8 @@ def _process_index(self, ind, k=1, n=1):
9696
)
9797
except TypeError:
9898
pass
99+
100+
from .runtime import Runtime
99101

100102
if not hasattr(self, '__endfn'):
101103
self.__endfn = Runtime.call('str2func', 'end')

0 commit comments

Comments
 (0)