File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import numpy as _vp_np
2+ import random as _vp_rd
13"""
24Search Variables
35"""
@@ -77,8 +79,6 @@ def _vp_get_profiling_list():
7779
7880 return result
7981
80- import numpy as _vp_np
81- import random as _vp_rd
8282def _vp_sample (data , sample_cnt ):
8383 """
8484 Sampling data
@@ -94,16 +94,13 @@ def _vp_sample(data, sample_cnt):
9494 return data [_vp_np .random .choice (data .shape [0 ], sample_cnt , replace = False )]
9595 elif dataType == 'list' :
9696 return _vp_rd .choices (data , k = sample_cnt )
97+
9798 return data
9899
99100def _vp_check_module_loaded (fname_list ):
100101 """
101102 Check if this module is loaded
102103 """
103- result = []
104- for fname in fname_list :
105- if fname in globals ():
106- result .append (True )
107- else :
108- result .append (False )
104+ result = [True if fname in globals () else False for fname in fname_list ]
105+
109106 return result
You can’t perform that action at this time.
0 commit comments