java - In python, is "args = [temp[n] for n in array(index)]" doing a check of temp[n]? -
i converting python java.
my question 'args' doing?
args = [this.scrath[c] c in this.connections(n)]; //python
is it:
[this.scrath[c] //get data @ index c of this.scratch[] c in // number of c in connections this.connections(n)]; //connections ann_neuron n
in case "this.scratch[c]" checking data matches c in "this.connections(n)"?
this.scratch = arrays.copyofrange(inputvalues, this.scratch.length-this.input_length, this.scratch.length+1); //java //inputvalues given negative values. (int i=0; i<this.scratch.length; i++){ this.scratch[i] = inputvalues[i]*-1; } //loop through active genes in order (ann_neuron n : nodes){ if (n.active){ float func = n.function; (ann_connection c : n.connections){ //argument here!! } } args = [this.scrath[c] c in this.connections(n)]; //python //apply function inputs scratch, save results in scratch this.scratch[n] = function(*args); }
this:
args = [this.scrath[c] c in this.connections(n)]
is equivalent this:
args = [] c in this.connections(n): args.append(this.scrath[c])
Comments
Post a Comment