You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Check whether the pull request contains files which are required to be present for all packages:
101
99
- name: 'Check whether the pull request contains files which are required to be present for all packages'
102
-
id: check-required-files
103
100
run: |
104
101
# Define a list of required files:
105
102
required_files=(
@@ -169,15 +166,15 @@ jobs:
169
166
170
167
body=""
171
168
if [[ "${#missing_files[@]}" -eq 0 ]]; then
172
-
body="Hi @${{ github.event.issue.pull_request.user.login }}, thank you for your contribution!
169
+
body="Hi @${{ inputs.user }}, thank you for your contribution!
173
170
174
171
:tada: Your pull request contains all required files for the new package: :tada:
175
172
176
173
${checkbox_list}
177
174
178
175
-- stdlib-bot"
179
176
else
180
-
body="Hi @${{ github.event.issue.pull_request.user.login }}, thank you for your contribution! Your pull request contains a new package, but is missing some of the required files.
177
+
body="Hi @${{ inputs.user }}, thank you for your contribution! Your pull request contains a new package, but is missing some of the required files.
181
178
182
179
Use the following checklist to keep track of the required files and which ones are still missing:
183
180
@@ -188,11 +185,8 @@ jobs:
188
185
-- stdlib-bot"
189
186
fi
190
187
191
-
# Add the comment body to the workflow output after escaping to preserve newlines:
Applies a provided callback function to each element of the array, in order, passing in the return value from the calculation on the preceding element and returning the accumulated result upon completion.
1628
+
1629
+
```javascript
1630
+
var real =require( '@stdlib/complex/real' );
1631
+
var imag =require( '@stdlib/complex/imag' );
1632
+
var cadd =require( '@stdlib/math/base/ops/cadd' );
1633
+
1634
+
var arr =newComplex128Array( 3 );
1635
+
1636
+
arr.set( [ 1.0, 1.0 ], 0 );
1637
+
arr.set( [ 2.0, 2.0 ], 1 );
1638
+
arr.set( [ 3.0, 3.0 ], 2 );
1639
+
1640
+
var z =arr.reduce( cadd );
1641
+
// returns <Complex128>
1642
+
1643
+
var re =real( z );
1644
+
// returns 6.0
1645
+
1646
+
var im =imag( z );
1647
+
// returns 6.0
1648
+
```
1649
+
1650
+
The reducer function is provided four arguments:
1651
+
1652
+
-**acc**: accumulated result.
1653
+
-**value**: current array element.
1654
+
-**index**: current array element index.
1655
+
-**arr**: the array on which this method was called.
1656
+
1657
+
By default, the function initializes the accumulated result to the first element in the array and passes the second array element as `value` during the first invocation of the provided callback. To begin accumulation from a different starting value and pass in the first array element as `value` during the first invocation of the provided callback, provide an `initialValue` argument.
0 commit comments