@@ -25,10 +25,11 @@ def prepare_inputs(*inputs, **kwinputs):
25
25
"""
26
26
alpha , delta , tau , N = inputs
27
27
meta = kwinputs ['meta' ]
28
-
29
28
# Organize the parameters to an array. The broadcasting works nicely with constant
30
29
# arguments.
31
- param_array = np .row_stack (np .broadcast (alpha , delta , tau , N ))
30
+ param_array = np .row_stack (
31
+ [(a , d , t , N ) for (a , d , t , N ) in np .broadcast (alpha , delta , tau , N )]
32
+ )
32
33
33
34
# Prepare a unique filename for parallel settings
34
35
filename = '{model_name}_{batch_index}_{submission_index}.txt' .format (** meta )
@@ -37,7 +38,6 @@ def prepare_inputs(*inputs, **kwinputs):
37
38
# Add the filenames to kwinputs
38
39
kwinputs ['filename' ] = filename
39
40
kwinputs ['output_filename' ] = filename [:- 4 ] + '_out.txt'
40
-
41
41
# Return new inputs that the command will receive
42
42
return inputs , kwinputs
43
43
@@ -71,7 +71,7 @@ def process_result(completed_process, *inputs, **kwinputs):
71
71
def T1 (clusters ):
72
72
"""Summary statistic for BDM."""
73
73
clusters = np .atleast_2d (clusters )
74
- return np .sum (clusters > 0 , 1 ) / np .sum (clusters , 1 )
74
+ return np .sum (clusters > 0 , axis = 1 ) / np .sum (clusters , axis = 1 )
75
75
76
76
77
77
def T2 (clusters , n = 20 ):
0 commit comments