Skip to content

Commit a3af360

Browse files
committed
Auto-generated commit
1 parent 514d1ef commit a3af360

File tree

6 files changed

+25
-25
lines changed

6 files changed

+25
-25
lines changed

.github/.keepalive

Lines changed: 0 additions & 1 deletion
This file was deleted.

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
<section class="release" id="unreleased">
66

7-
## Unreleased (2025-05-12)
7+
## Unreleased (2025-06-01)
88

99
<section class="features">
1010

@@ -22,6 +22,7 @@
2222

2323
<details>
2424

25+
- [`5c8faed`](https://github.com/stdlib-js/stdlib/commit/5c8faed8016941ff5a337bb4d14b1bdb65748993) - **docs:** update example _(by Athan Reines)_
2526
- [`a1e230f`](https://github.com/stdlib-js/stdlib/commit/a1e230f29297caa89880e9c194c615a0400fb7bc) - **chore:** clean up cppcheck-suppress comments _(by Karan Anand)_
2627
- [`3f8a327`](https://github.com/stdlib-js/stdlib/commit/3f8a327f98267690ae7d101c84e522810986caf0) - **bench:** fix syntax _(by Athan Reines)_
2728
- [`2ddce39`](https://github.com/stdlib-js/stdlib/commit/2ddce39825650066ba35c74a217ab6425e4f3c9c) - **bench:** fix copy-paste error _(by Athan Reines)_

CONTRIBUTORS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ Joris Labie <joris.labie1@gmail.com>
8080
Justin Dennison <justin1dennison@gmail.com>
8181
Justyn Shelby <96994781+ShelbyJustyn@users.noreply.github.com>
8282
Karan Anand <anandkarancompsci@gmail.com>
83+
Karan Vasudevamurthy <karanlvm123@gmail.com>
8384
Karan Yadav <77043443+karanBRAVO@users.noreply.github.com>
8485
Karthik Prakash <116057817+skoriop@users.noreply.github.com>
8586
Kaushikgtm <162317291+Kaushikgtm@users.noreply.github.com>
@@ -146,6 +147,7 @@ Ryan Seal <splrk@users.noreply.github.com>
146147
Rylan Yang <137365285+rylany27@users.noreply.github.com>
147148
SAHIL KUMAR <168997976+sahilk45@users.noreply.github.com>
148149
SHIVAM YADAV <120725381+Shivam-1827@users.noreply.github.com>
150+
Sachin Raj <120590207+schnrj@users.noreply.github.com>
149151
Sahil Goyal <87982509+sahil20021008@users.noreply.github.com>
150152
Sai Avinash <120403424+nasarobot@users.noreply.github.com>
151153
Sai Srikar Dumpeti <80447788+the-r3aper7@users.noreply.github.com>
@@ -166,10 +168,14 @@ Spandan Barve <contact@marsian.dev>
166168
Stephannie Jiménez Gacha <steff456@hotmail.com>
167169
Suhaib Ilahi <suhaib.elahi87@gmail.com>
168170
Suraj Kumar <125961509+kumarsuraj212003@users.noreply.github.com>
171+
Swapnil Hajare <69076366+Swapnil-2502@users.noreply.github.com>
169172
Tanishq Ahuja <68651083+TheGEN1U5@users.noreply.github.com>
170173
Tirtadwipa Manunggal <tirtadwipa.manunggal@gmail.com>
171174
Tudor Pagu <104032457+tudor-pagu@users.noreply.github.com>
172175
Tufailahmed Bargir <142114244+Tufailahmed-Bargir@users.noreply.github.com>
176+
Tushar Bhardwaj <155543597+TusharBhardwaj441@users.noreply.github.com>
177+
Uday Kakade <141299403+udaykakade25@users.noreply.github.com>
178+
Ujjwal Kirti <64329707+ujjwalkirti@users.noreply.github.com>
173179
Utkarsh <http://utkarsh11105@gmail.com>
174180
Utkarsh Raj <rajutkarsh2505@gmail.com>
175181
UtkershBasnet <119008923+UtkershBasnet@users.noreply.github.com>

README.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -157,20 +157,16 @@ The function supports the following parameters:
157157
<!-- eslint no-undef: "error" -->
158158

159159
```javascript
160-
var Complex128 = require( '@stdlib/complex-float64-ctor' );
161-
var discreteUniform = require( '@stdlib/random-base-discrete-uniform' ).factory;
160+
var Complex128Array = require( '@stdlib/array-complex128' );
161+
var discreteUniform = require( '@stdlib/random-array-discrete-uniform' );
162+
var logEachMap = require( '@stdlib/console-log-each-map' );
162163
var scale = require( '@stdlib/complex-float64-base-scale' );
163164

164-
var rand = discreteUniform( -50, 50 );
165+
// Generate an array of random values:
166+
var values = new Complex128Array( discreteUniform( 200, -50, 50 ) );
165167

166-
var z1;
167-
var z2;
168-
var i;
169-
for ( i = 0; i < 100; i++ ) {
170-
z1 = new Complex128( rand(), rand() );
171-
z2 = scale( 5.0, z1 );
172-
console.log( '(%s) * 5.0 = %s', z1.toString(), z2.toString() );
173-
}
168+
// Scale each by a scalar constant:
169+
logEachMap( '%0.1f * (%s) = %s', 5.0, values, scale );
174170
```
175171

176172
</section>

examples/index.js

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,13 @@
1818

1919
'use strict';
2020

21-
var Complex128 = require( '@stdlib/complex-float64-ctor' );
22-
var discreteUniform = require( '@stdlib/random-base-discrete-uniform' ).factory;
21+
var Complex128Array = require( '@stdlib/array-complex128' );
22+
var discreteUniform = require( '@stdlib/random-array-discrete-uniform' );
23+
var logEachMap = require( '@stdlib/console-log-each-map' );
2324
var scale = require( './../lib' );
2425

25-
var rand = discreteUniform( -50, 50 );
26+
// Generate an array of random values:
27+
var values = new Complex128Array( discreteUniform( 200, -50, 50 ) );
2628

27-
var z1;
28-
var z2;
29-
var i;
30-
for ( i = 0; i < 100; i++ ) {
31-
z1 = new Complex128( rand(), rand() );
32-
z2 = scale( 5.0, z1 );
33-
console.log( '(%s) * 5.0 = %s', z1.toString(), z2.toString() );
34-
}
29+
// Scale each by a scalar constant:
30+
logEachMap( '%0.1f * (%s) = %s', 5.0, values, scale );

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,14 @@
5050
"@stdlib/utils-library-manifest": "^0.2.2"
5151
},
5252
"devDependencies": {
53+
"@stdlib/array-complex128": "^0.3.0",
5354
"@stdlib/array-float64": "^0.2.2",
5455
"@stdlib/assert-is-method": "^0.2.2",
5556
"@stdlib/assert-is-same-float64array": "^0.2.2",
57+
"@stdlib/console-log-each-map": "github:stdlib-js/console-log-each-map#main",
5658
"@stdlib/math-base-assert-is-nan": "^0.2.2",
59+
"@stdlib/random-array-discrete-uniform": "^0.2.1",
5760
"@stdlib/random-array-uniform": "^0.2.1",
58-
"@stdlib/random-base-discrete-uniform": "^0.2.1",
5961
"@stdlib/random-base-uniform": "^0.2.1",
6062
"@stdlib/utils-try-require": "^0.2.2",
6163
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",

0 commit comments

Comments
 (0)