Skip to content

Commit b862362

Browse files
committed
Minor fixes so that numpy is not imported before installation
1 parent 8de83e7 commit b862362

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

ltl/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from numbers import Integral, Real
1010
from timeit import default_timer as timer
1111

12-
import numpy as np
1312

1413
__author__ = 'anand'
1514

@@ -208,6 +207,8 @@ def dict_to_list(input_dict, get_dict_spec=False):
208207
:returns: The list representing the contents of the dict. If get_dict_spec is True, the dict
209208
specification is also returned. Note that the keys are always sorted ascendingly by name
210209
"""
210+
import numpy as np
211+
211212
return_list = []
212213
dict_items = sorted(input_dict.items())
213214
dict_spec = []
@@ -241,6 +242,8 @@ def list_to_dict(input_list, dict_spec):
241242
of individual elements are preserved, the types of the iterables inside which they reside are not.
242243
:func:`.list_to_dict` creates all iterables as numpy arrays.
243244
"""
245+
import numpy as np
246+
244247
cursor = 0
245248
return_dict = {}
246249
for dict_entry in dict_spec:
@@ -302,6 +305,8 @@ def convert_dict_to_numpy(input_dict):
302305
303306
:returns: The converted output dictionary
304307
"""
308+
import numpy as np
309+
305310
output_dict = {}
306311
for key, value in input_dict.items():
307312
if isinstance(value, Iterable) and not isinstance(value, str):

ltl/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
MAJOR_VERSION = "0.4"
2-
FULL_VERSION = "0.4.0"
2+
FULL_VERSION = "0.4.1"

0 commit comments

Comments
 (0)