Skip to content

Commit 7bf89c6

Browse files
committed
Auto-generated commit
1 parent b77edd7 commit 7bf89c6

File tree

4 files changed

+45
-198
lines changed

4 files changed

+45
-198
lines changed

CHANGELOG.md

+26
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
##### Features
2222

23+
- [`565a2ff`](https://github.com/stdlib-js/stdlib/commit/565a2ffe3aa2c7260109cbacf85bf6029c12e305) - refactor namespace to export subnamespaces
2324
- [`81b48ae`](https://github.com/stdlib-js/stdlib/commit/81b48aeb9d5d2b16fe039f9db7e710c95a35585f) - update namespace TypeScript declarations [(##2621)](#2621)
2425

2526
</section>
@@ -30,6 +31,18 @@
3031

3132
##### BREAKING CHANGES
3233

34+
- [`565a2ff`](https://github.com/stdlib-js/stdlib/commit/565a2ffe3aa2c7260109cbacf85bf6029c12e305): refactor namespace to export subnamespaces
35+
- [`565a2ff`](https://github.com/stdlib-js/stdlib/commit/565a2ffe3aa2c7260109cbacf85bf6029c12e305): APIs renamed and/or moved to subnamespaces
36+
37+
- To migrate, users should consult the list of exports to determine
38+
which properties moved where. Double-precision APIs moved to the
39+
`float64` namespace and single-precision APIs moved to the `float32`
40+
namespace. The following properties were renamed:
41+
- complexCtors => ctors
42+
- complexDataType => dtype
43+
- complexDataTypes => dtypes
44+
- complexPromotionRules => promotionRules
45+
3346
- [`7381394`](https://github.com/stdlib-js/stdlib/commit/738139479cf29cbe123d7c5028024983ba11b3bd): remove `complex/reviver-float64`
3447

3548
- To migrate, users should update their require/import paths to use
@@ -1671,6 +1684,18 @@ This release closes the following issue:
16711684

16721685
### BREAKING CHANGES
16731686

1687+
- [`565a2ff`](https://github.com/stdlib-js/stdlib/commit/565a2ffe3aa2c7260109cbacf85bf6029c12e305): refactor namespace to export subnamespaces
1688+
- [`565a2ff`](https://github.com/stdlib-js/stdlib/commit/565a2ffe3aa2c7260109cbacf85bf6029c12e305): APIs renamed and/or moved to subnamespaces
1689+
1690+
- To migrate, users should consult the list of exports to determine
1691+
which properties moved where. Double-precision APIs moved to the
1692+
`float64` namespace and single-precision APIs moved to the `float32`
1693+
namespace. The following properties were renamed:
1694+
- complexCtors => ctors
1695+
- complexDataType => dtype
1696+
- complexDataTypes => dtypes
1697+
- complexPromotionRules => promotionRules
1698+
16741699
- [`d9edc48`](https://github.com/stdlib-js/stdlib/commit/d9edc482b619ce39d6d2b0ed172e85e7cb295ba4): convert `complex/float64` to a namespace
16751700
- [`d9edc48`](https://github.com/stdlib-js/stdlib/commit/d9edc482b619ce39d6d2b0ed172e85e7cb295ba4): `complex/float64` converted to a namespace
16761701

@@ -1851,6 +1876,7 @@ A total of 6 people contributed to this release. Thank you to the following cont
18511876

18521877
<details>
18531878

1879+
- [`565a2ff`](https://github.com/stdlib-js/stdlib/commit/565a2ffe3aa2c7260109cbacf85bf6029c12e305) - **feat:** refactor namespace to export subnamespaces _(by Athan Reines)_
18541880
- [`ea241a3`](https://github.com/stdlib-js/stdlib/commit/ea241a32e7bbd7f346ff993d932adbd1857108e1) - **feat:** add `assert` to namespace _(by Athan Reines)_
18551881
- [`69eecad`](https://github.com/stdlib-js/stdlib/commit/69eecadd785a9ba5732e2d136b8755cad6341fd0) - **feat:** add `complex/float32/base/assert` namespace _(by Athan Reines)_
18561882
- [`c89d08c`](https://github.com/stdlib-js/stdlib/commit/c89d08c3733ca6b6f1fab8d8ebc95663b8190b5e) - **feat:** add `assert` to namespace _(by Athan Reines)_

README.md

+2-91
Original file line numberDiff line numberDiff line change
@@ -72,67 +72,12 @@ var o = ns;
7272
// returns {...}
7373
```
7474

75-
The namespace constains complex number constructors.
75+
The namespace contains the following APIs:
7676

77-
<!-- <toc keywords="+data, +structure, +types"> -->
78-
79-
<div class="namespace-toc">
80-
81-
- <span class="signature">[`base`][@stdlib/complex/base]</span><span class="delimiter">: </span><span class="description">base (i.e., lower-level) complex number functions.</span>
82-
- <span class="signature">[`complex( real, imag[, dtype] )`][@stdlib/complex/cmplx]</span><span class="delimiter">: </span><span class="description">create a complex number.</span>
83-
- <span class="signature">[`complexCtors( dtype )`][@stdlib/complex/ctors]</span><span class="delimiter">: </span><span class="description">complex number constructors.</span>
84-
- <span class="signature">[`complexDataType( value )`][@stdlib/complex/dtype]</span><span class="delimiter">: </span><span class="description">return the data type of a complex number.</span>
85-
- <span class="signature">[`complexDataTypes()`][@stdlib/complex/dtypes]</span><span class="delimiter">: </span><span class="description">list of complex number data types.</span>
86-
- <span class="signature">[`complexPromotionRules( [dtype1, dtype2] )`][@stdlib/complex/promotion-rules]</span><span class="delimiter">: </span><span class="description">return the complex number data type with the smallest size and closest "kind" to which data types can be **safely** cast.</span>
87-
88-
</div>
77+
<!-- <toc pattern="*"> -->
8978

9079
<!-- </toc> -->
9180

92-
```javascript
93-
var z = ns.complex( 5.0, 3.0 );
94-
// returns <Complex128>
95-
96-
var str = z.toString();
97-
// returns '5 + 3i'
98-
99-
z = ns.complex( 5.0, 3.0, 'float32' );
100-
// returns <Complex64>
101-
102-
z = new ns.Complex64( 5.0, 3.0 );
103-
// returns <Complex64>
104-
```
105-
106-
In addition, the namespace contains the following functions:
107-
108-
<!-- <toc keywords="-data, -structure, -types"> -->
109-
110-
<div class="namespace-toc">
111-
112-
- <span class="signature">[`conj( z )`][@stdlib/complex/float64/conj]</span><span class="delimiter">: </span><span class="description">return the complex conjugate of a double-precision complex floating-point number.</span>
113-
- <span class="signature">[`conjf( z )`][@stdlib/complex/float32/conj]</span><span class="delimiter">: </span><span class="description">return the complex conjugate of a single-precision complex floating-point number.</span>
114-
- <span class="signature">[`imag( z )`][@stdlib/complex/float64/imag]</span><span class="delimiter">: </span><span class="description">return the imaginary component of a double-precision complex floating-point number.</span>
115-
- <span class="signature">[`imagf( z )`][@stdlib/complex/float32/imag]</span><span class="delimiter">: </span><span class="description">return the imaginary component of a single-precision complex floating-point number.</span>
116-
- <span class="signature">[`real( z )`][@stdlib/complex/float64/real]</span><span class="delimiter">: </span><span class="description">return the real component of a double-precision complex floating-point number.</span>
117-
- <span class="signature">[`realf( z )`][@stdlib/complex/float32/real]</span><span class="delimiter">: </span><span class="description">return the real component of a single-precision complex floating-point number.</span>
118-
- <span class="signature">[`reim( z )`][@stdlib/complex/float64/reim]</span><span class="delimiter">: </span><span class="description">return the real and imaginary components of a double-precision complex floating-point number.</span>
119-
- <span class="signature">[`reimf( z )`][@stdlib/complex/float32/reim]</span><span class="delimiter">: </span><span class="description">return the real and imaginary components of a single-precision complex floating-point number.</span>
120-
- <span class="signature">[`reviveComplex( key, value )`][@stdlib/complex/reviver]</span><span class="delimiter">: </span><span class="description">revive a JSON-serialized complex number.</span>
121-
122-
</div>
123-
124-
<!-- </toc> -->
125-
126-
```javascript
127-
var z = ns.complex( 5.0, 3.0 );
128-
var str = z.toString();
129-
// returns '5 + 3i'
130-
131-
var v = ns.conj( z );
132-
str = v.toString();
133-
// returns '5 - 3i'
134-
```
135-
13681
</section>
13782

13883
<!-- /.usage -->
@@ -236,40 +181,6 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
236181

237182
[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/complex/main/LICENSE
238183

239-
<!-- <toc-links> -->
240-
241-
[@stdlib/complex/float64/conj]: https://github.com/stdlib-js/complex/tree/main/float64/conj
242-
243-
[@stdlib/complex/float32/conj]: https://github.com/stdlib-js/complex/tree/main/float32/conj
244-
245-
[@stdlib/complex/float64/imag]: https://github.com/stdlib-js/complex/tree/main/float64/imag
246-
247-
[@stdlib/complex/float32/imag]: https://github.com/stdlib-js/complex/tree/main/float32/imag
248-
249-
[@stdlib/complex/float64/real]: https://github.com/stdlib-js/complex/tree/main/float64/real
250-
251-
[@stdlib/complex/float32/real]: https://github.com/stdlib-js/complex/tree/main/float32/real
252-
253-
[@stdlib/complex/float64/reim]: https://github.com/stdlib-js/complex/tree/main/float64/reim
254-
255-
[@stdlib/complex/float32/reim]: https://github.com/stdlib-js/complex/tree/main/float32/reim
256-
257-
[@stdlib/complex/reviver]: https://github.com/stdlib-js/complex/tree/main/reviver
258-
259-
[@stdlib/complex/base]: https://github.com/stdlib-js/complex/tree/main/base
260-
261-
[@stdlib/complex/cmplx]: https://github.com/stdlib-js/complex/tree/main/cmplx
262-
263-
[@stdlib/complex/ctors]: https://github.com/stdlib-js/complex/tree/main/ctors
264-
265-
[@stdlib/complex/dtype]: https://github.com/stdlib-js/complex/tree/main/dtype
266-
267-
[@stdlib/complex/dtypes]: https://github.com/stdlib-js/complex/tree/main/dtypes
268-
269-
[@stdlib/complex/promotion-rules]: https://github.com/stdlib-js/complex/tree/main/promotion-rules
270-
271-
<!-- </toc-links> -->
272-
273184
</section>
274185

275186
<!-- /.links -->

lib/index.js

+16-106
Original file line numberDiff line numberDiff line change
@@ -55,148 +55,58 @@ setReadOnly( ns, 'base', require( './../base' ) );
5555
setReadOnly( ns, 'complex', require( './../cmplx' ) );
5656

5757
/**
58-
* @name complexCtors
58+
* @name ctors
5959
* @memberof ns
6060
* @readonly
6161
* @type {Function}
6262
* @see {@link module:@stdlib/complex/ctors}
6363
*/
64-
setReadOnly( ns, 'complexCtors', require( './../ctors' ) );
64+
setReadOnly( ns, 'ctors', require( './../ctors' ) );
6565

6666
/**
67-
* @name complexDataType
67+
* @name dtype
6868
* @memberof ns
6969
* @readonly
7070
* @type {Function}
7171
* @see {@link module:@stdlib/complex/dtype}
7272
*/
73-
setReadOnly( ns, 'complexDataType', require( './../dtype' ) );
73+
setReadOnly( ns, 'dtype', require( './../dtype' ) );
7474

7575
/**
76-
* @name complexDataTypes
76+
* @name dtypes
7777
* @memberof ns
7878
* @readonly
7979
* @type {Function}
8080
* @see {@link module:@stdlib/complex/dtypes}
8181
*/
82-
setReadOnly( ns, 'complexDataTypes', require( './../dtypes' ) );
82+
setReadOnly( ns, 'dtypes', require( './../dtypes' ) );
8383

8484
/**
85-
* @name conjf
85+
* @name float32
8686
* @memberof ns
8787
* @readonly
88-
* @type {Function}
89-
* @see {@link module:@stdlib/complex/float32/conj}
90-
*/
91-
setReadOnly( ns, 'conjf', require( './../float32/conj' ) );
92-
93-
/**
94-
* @name Complex64
95-
* @memberof ns
96-
* @readonly
97-
* @constructor
98-
* @see {@link module:@stdlib/complex/float32/ctor}
99-
*/
100-
setReadOnly( ns, 'Complex64', require( './../float32/ctor' ) );
101-
102-
/**
103-
* @name imagf
104-
* @memberof ns
105-
* @readonly
106-
* @type {Function}
107-
* @see {@link module:@stdlib/complex/float32/imag}
108-
*/
109-
setReadOnly( ns, 'imagf', require( './../float32/imag' ) );
110-
111-
/**
112-
* @name realf
113-
* @memberof ns
114-
* @readonly
115-
* @type {Function}
116-
* @see {@link module:@stdlib/complex/float32/real}
117-
*/
118-
setReadOnly( ns, 'realf', require( './../float32/real' ) );
119-
120-
/**
121-
* @name reimf
122-
* @memberof ns
123-
* @readonly
124-
* @type {Function}
125-
* @see {@link module:@stdlib/complex/float32/reim}
126-
*/
127-
setReadOnly( ns, 'reimf', require( './../float32/reim' ) );
128-
129-
/**
130-
* @name reviveComplex64
131-
* @memberof ns
132-
* @readonly
133-
* @type {Function}
134-
* @see {@link module:@stdlib/complex/float32/reviver}
135-
*/
136-
setReadOnly( ns, 'reviveComplex64', require( './../float32/reviver' ) );
137-
138-
/**
139-
* @name conj
140-
* @memberof ns
141-
* @readonly
142-
* @type {Function}
143-
* @see {@link module:@stdlib/complex/float64/conj}
144-
*/
145-
setReadOnly( ns, 'conj', require( './../float64/conj' ) );
146-
147-
/**
148-
* @name Complex128
149-
* @memberof ns
150-
* @readonly
151-
* @constructor
152-
* @see {@link module:@stdlib/complex/float64/ctor}
153-
*/
154-
setReadOnly( ns, 'Complex128', require( './../float64/ctor' ) );
155-
156-
/**
157-
* @name imag
158-
* @memberof ns
159-
* @readonly
160-
* @type {Function}
161-
* @see {@link module:@stdlib/complex/float64/imag}
162-
*/
163-
setReadOnly( ns, 'imag', require( './../float64/imag' ) );
164-
165-
/**
166-
* @name real
167-
* @memberof ns
168-
* @readonly
169-
* @type {Function}
170-
* @see {@link module:@stdlib/complex/float64/real}
171-
*/
172-
setReadOnly( ns, 'real', require( './../float64/real' ) );
173-
174-
/**
175-
* @name reim
176-
* @memberof ns
177-
* @readonly
178-
* @type {Function}
179-
* @see {@link module:@stdlib/complex/float64/reim}
88+
* @type {Namespace}
89+
* @see {@link module:@stdlib/complex/float32}
18090
*/
181-
setReadOnly( ns, 'reim', require( './../float64/reim' ) );
91+
setReadOnly( ns, 'float32', require( './../float32' ) );
18292

18393
/**
184-
* @name reviveComplex128
94+
* @name float64
18595
* @memberof ns
18696
* @readonly
187-
* @type {Function}
188-
* @see {@link module:@stdlib/complex/float64/reviver}
97+
* @type {Namespace}
98+
* @see {@link module:@stdlib/complex/float64}
18999
*/
190-
setReadOnly( ns, 'reviveComplex128', require( './../float64/reviver' ) );
100+
setReadOnly( ns, 'float64', require( './../float64' ) );
191101

192102
/**
193-
* @name complexPromotionRules
103+
* @name promotionRules
194104
* @memberof ns
195105
* @readonly
196106
* @type {Function}
197107
* @see {@link module:@stdlib/complex/promotion-rules}
198108
*/
199-
setReadOnly( ns, 'complexPromotionRules', require( './../promotion-rules' ) );
109+
setReadOnly( ns, 'promotionRules', require( './../promotion-rules' ) );
200110

201111
/**
202112
* @name reviveComplex

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"dependencies": {
3939
"@stdlib/array": "github:stdlib-js/array#main",
4040
"@stdlib/assert": "github:stdlib-js/assert#main",
41+
"@stdlib/math": "github:stdlib-js/math#main",
4142
"@stdlib/number": "github:stdlib-js/number#main",
4243
"@stdlib/string": "github:stdlib-js/string#main",
4344
"@stdlib/types": "github:stdlib-js/types#main",
@@ -46,7 +47,6 @@
4647
"devDependencies": {
4748
"@stdlib/bench": "github:stdlib-js/bench#main",
4849
"@stdlib/constants": "github:stdlib-js/constants#main",
49-
"@stdlib/math": "github:stdlib-js/math#main",
5050
"@stdlib/random": "github:stdlib-js/random#main",
5151
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
5252
"istanbul": "^0.4.1",

0 commit comments

Comments
 (0)