@stdlib/strided-base 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -95,6 +95,7 @@ The following functions are currently exported:
95
95
  - <span class="signature">[`offsetView( x, offset )`][@stdlib/strided/base/offset-view]</span><span class="delimiter">: </span><span class="description">return a typed array view having the same data type as a provided input typed array and starting at a specified index offset.</span>
96
96
  - <span class="signature">[`quaternary( arrays, shape, strides, fcn )`][@stdlib/strided/base/quaternary]</span><span class="delimiter">: </span><span class="description">apply a quaternary callback to strided input array elements and assign results to elements in a strided output array.</span>
97
97
  - <span class="signature">[`quinary( arrays, shape, strides, fcn )`][@stdlib/strided/base/quinary]</span><span class="delimiter">: </span><span class="description">apply a quinary callback to strided input array elements and assign results to elements in a strided output array.</span>
98
+ - <span class="signature">[`reinterpretComplex( x, offset )`][@stdlib/strided/base/reinterpret-complex]</span><span class="delimiter">: </span><span class="description">reinterpret a complex-valued floating-point array as a real-valued floating-point array having the same precision.</span>
98
99
  - <span class="signature">[`reinterpretComplex128( x, offset )`][@stdlib/strided/base/reinterpret-complex128]</span><span class="delimiter">: </span><span class="description">reinterpret a `Complex128Array` as a `Float64Array`.</span>
99
100
  - <span class="signature">[`reinterpretComplex64( x, offset )`][@stdlib/strided/base/reinterpret-complex64]</span><span class="delimiter">: </span><span class="description">reinterpret a `Complex64Array` as a `Float32Array`.</span>
100
101
  - <span class="signature">[`smap( N, x, strideX, y, strideY, fcn )`][@stdlib/strided/base/smap]</span><span class="delimiter">: </span><span class="description">apply a unary function to a single-precision floating-point strided input array and assign results to a single-precision floating-point strided output array.</span>
@@ -183,8 +184,8 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
183
184
  [npm-image]: http://img.shields.io/npm/v/@stdlib/strided-base.svg
184
185
  [npm-url]: https://npmjs.org/package/@stdlib/strided-base
185
186
 
186
- [test-image]: https://github.com/stdlib-js/strided-base/actions/workflows/test.yml/badge.svg?branch=v0.2.0
187
- [test-url]: https://github.com/stdlib-js/strided-base/actions/workflows/test.yml?query=branch:v0.2.0
187
+ [test-image]: https://github.com/stdlib-js/strided-base/actions/workflows/test.yml/badge.svg?branch=v0.2.1
188
+ [test-url]: https://github.com/stdlib-js/strided-base/actions/workflows/test.yml?query=branch:v0.2.1
188
189
 
189
190
  [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/strided-base/main.svg
190
191
  [coverage-url]: https://codecov.io/github/stdlib-js/strided-base?branch=main
@@ -272,6 +273,8 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
272
273
 
273
274
  [@stdlib/strided/base/quinary]: https://www.npmjs.com/package/@stdlib/strided-base-quinary
274
275
 
276
+ [@stdlib/strided/base/reinterpret-complex]: https://www.npmjs.com/package/@stdlib/strided-base-reinterpret-complex
277
+
275
278
  [@stdlib/strided/base/reinterpret-complex128]: https://www.npmjs.com/package/@stdlib/strided-base-reinterpret-complex128
276
279
 
277
280
  [@stdlib/strided/base/reinterpret-complex64]: https://www.npmjs.com/package/@stdlib/strided-base-reinterpret-complex64
@@ -47,6 +47,7 @@ import nullaryAddonDispatch = require( '@stdlib/strided-base-nullary-addon-dispa
47
47
  import offsetView = require( '@stdlib/strided-base-offset-view' );
48
48
  import quaternary = require( '@stdlib/strided-base-quaternary' );
49
49
  import quinary = require( '@stdlib/strided-base-quinary' );
50
+ import reinterpretComplex = require( '@stdlib/strided-base-reinterpret-complex' );
50
51
  import reinterpretComplex64 = require( '@stdlib/strided-base-reinterpret-complex64' );
51
52
  import reinterpretComplex128 = require( '@stdlib/strided-base-reinterpret-complex128' );
52
53
  import smap = require( '@stdlib/strided-base-smap' );
@@ -1047,6 +1048,25 @@ interface Namespace {
1047
1048
  */
1048
1049
  quinary: typeof quinary;
1049
1050
 
1051
+ /**
1052
+ * Reinterprets a `Complex128Array` as a `Float64Array`.
1053
+ *
1054
+ * @param x - input array
1055
+ * @param offset - starting index
1056
+ * @returns `Float64Array` view
1057
+ *
1058
+ * @example
1059
+ * var Complex128Array = require( '@stdlib/array-complex128' );
1060
+ *
1061
+ * var x = new Complex128Array( 10 );
1062
+ *
1063
+ * var out = ns.reinterpretComplex( x, 0 );
1064
+ * // returns <Float64Array>
1065
+ *
1066
+ * var bool = ( out.buffer === x.buffer );
1067
+ */
1068
+ reinterpretComplex: typeof reinterpretComplex;
1069
+
1050
1070
  /**
1051
1071
  * Reinterprets a `Complex64Array` as a `Float32Array`.
1052
1072
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stdlib/strided-base",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Base strided.",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -16,17 +16,11 @@
16
16
  "main": "./lib",
17
17
  "directories": {
18
18
  "doc": "./docs",
19
- "example": "./examples",
20
19
  "lib": "./lib",
21
- "test": "./test"
20
+ "dist": "./dist"
22
21
  },
23
22
  "types": "./docs/types",
24
- "scripts": {
25
- "test": "make test",
26
- "test-cov": "make test-cov",
27
- "examples": "make examples",
28
- "benchmark": "make benchmark"
29
- },
23
+ "scripts": {},
30
24
  "homepage": "https://stdlib.io",
31
25
  "repository": {
32
26
  "type": "git",
@@ -36,149 +30,50 @@
36
30
  "url": "https://github.com/stdlib-js/stdlib/issues"
37
31
  },
38
32
  "dependencies": {
39
- "@stdlib/strided-base-binary": "^0.2.0",
40
- "@stdlib/strided-base-binary-addon-dispatch": "^0.2.0",
41
- "@stdlib/strided-base-binary-dtype-signatures": "^0.2.0",
42
- "@stdlib/strided-base-binary-signature-callbacks": "^0.2.0",
43
- "@stdlib/strided-base-cmap": "^0.2.0",
44
- "@stdlib/strided-base-dmap": "^0.2.0",
45
- "@stdlib/strided-base-dmap2": "^0.2.0",
46
- "@stdlib/strided-base-dmskmap": "^0.2.0",
47
- "@stdlib/strided-base-dmskmap2": "^0.2.0",
48
- "@stdlib/strided-base-dtype-enum2str": "^0.2.0",
49
- "@stdlib/strided-base-dtype-resolve-enum": "^0.2.0",
50
- "@stdlib/strided-base-dtype-resolve-str": "^0.2.0",
51
- "@stdlib/strided-base-dtype-str2enum": "^0.2.0",
52
- "@stdlib/strided-base-map-by": "^0.2.0",
53
- "@stdlib/strided-base-map-by2": "^0.2.0",
54
- "@stdlib/strided-base-max-view-buffer-index": "^0.2.0",
55
- "@stdlib/strided-base-meta-data-props": "^0.2.0",
56
- "@stdlib/strided-base-min-view-buffer-index": "^0.2.0",
57
- "@stdlib/strided-base-mskunary": "^0.2.0",
58
- "@stdlib/strided-base-mskunary-addon-dispatch": "^0.2.0",
59
- "@stdlib/strided-base-mskunary-dtype-signatures": "^0.2.0",
60
- "@stdlib/strided-base-mskunary-signature-callbacks": "^0.2.0",
61
- "@stdlib/strided-base-nullary": "^0.2.0",
62
- "@stdlib/strided-base-nullary-addon-dispatch": "^0.2.0",
63
- "@stdlib/strided-base-offset-view": "^0.2.0",
64
- "@stdlib/strided-base-quaternary": "^0.2.0",
65
- "@stdlib/strided-base-quinary": "^0.2.0",
66
- "@stdlib/strided-base-reinterpret-complex": "github:stdlib-js/strided-base-reinterpret-complex#main",
67
- "@stdlib/strided-base-reinterpret-complex128": "^0.2.0",
33
+ "@stdlib/strided-base-binary": "^0.2.1",
34
+ "@stdlib/strided-base-binary-addon-dispatch": "^0.2.1",
35
+ "@stdlib/strided-base-binary-dtype-signatures": "^0.2.1",
36
+ "@stdlib/strided-base-binary-signature-callbacks": "^0.2.1",
37
+ "@stdlib/strided-base-cmap": "^0.2.1",
38
+ "@stdlib/strided-base-dmap": "^0.2.1",
39
+ "@stdlib/strided-base-dmap2": "^0.2.1",
40
+ "@stdlib/strided-base-dmskmap": "^0.2.1",
41
+ "@stdlib/strided-base-dmskmap2": "^0.2.1",
42
+ "@stdlib/strided-base-dtype-enum2str": "^0.2.1",
43
+ "@stdlib/strided-base-dtype-resolve-enum": "^0.2.1",
44
+ "@stdlib/strided-base-dtype-resolve-str": "^0.2.1",
45
+ "@stdlib/strided-base-dtype-str2enum": "^0.2.1",
46
+ "@stdlib/strided-base-map-by": "^0.2.1",
47
+ "@stdlib/strided-base-map-by2": "^0.2.1",
48
+ "@stdlib/strided-base-max-view-buffer-index": "^0.2.1",
49
+ "@stdlib/strided-base-meta-data-props": "^0.2.1",
50
+ "@stdlib/strided-base-min-view-buffer-index": "^0.2.1",
51
+ "@stdlib/strided-base-mskunary": "^0.2.1",
52
+ "@stdlib/strided-base-mskunary-addon-dispatch": "^0.2.1",
53
+ "@stdlib/strided-base-mskunary-dtype-signatures": "^0.2.1",
54
+ "@stdlib/strided-base-mskunary-signature-callbacks": "^0.2.1",
55
+ "@stdlib/strided-base-nullary": "^0.2.1",
56
+ "@stdlib/strided-base-nullary-addon-dispatch": "^0.2.1",
57
+ "@stdlib/strided-base-offset-view": "^0.2.1",
58
+ "@stdlib/strided-base-quaternary": "^0.2.1",
59
+ "@stdlib/strided-base-quinary": "^0.2.1",
60
+ "@stdlib/strided-base-reinterpret-complex": "^0.1.1",
61
+ "@stdlib/strided-base-reinterpret-complex128": "^0.2.1",
68
62
  "@stdlib/strided-base-reinterpret-complex64": "^0.2.0",
69
- "@stdlib/strided-base-smap": "^0.2.0",
70
- "@stdlib/strided-base-smap2": "^0.2.0",
71
- "@stdlib/strided-base-smskmap": "^0.2.0",
72
- "@stdlib/strided-base-smskmap2": "^0.2.0",
73
- "@stdlib/strided-base-ternary": "^0.2.0",
74
- "@stdlib/strided-base-unary": "^0.2.0",
75
- "@stdlib/strided-base-unary-addon-dispatch": "^0.2.0",
76
- "@stdlib/strided-base-unary-by": "^0.2.0",
77
- "@stdlib/strided-base-unary-dtype-signatures": "^0.2.0",
78
- "@stdlib/strided-base-unary-signature-callbacks": "^0.2.0",
79
- "@stdlib/strided-base-zmap": "^0.2.0",
80
- "@stdlib/utils-define-read-only-property": "^0.2.0"
81
- },
82
- "devDependencies": {
83
- "@stdlib/array-base-accessor-getter": "^0.2.0",
84
- "@stdlib/array-base-accessor-setter": "^0.2.0",
85
- "@stdlib/array-base-assert-is-accessor-array": "^0.2.0",
86
- "@stdlib/array-base-assert-is-complex128array": "^0.2.0",
87
- "@stdlib/array-base-assert-is-complex64array": "^0.2.0",
88
- "@stdlib/array-base-getter": "^0.2.0",
89
- "@stdlib/array-base-setter": "^0.2.0",
90
- "@stdlib/array-buffer": "^0.2.0",
91
- "@stdlib/array-complex128": "^0.1.0",
92
- "@stdlib/array-complex64": "^0.1.0",
93
- "@stdlib/array-dtype": "^0.1.0",
94
- "@stdlib/array-filled": "^0.1.0",
95
- "@stdlib/array-filled-by": "^0.1.0",
96
- "@stdlib/array-float32": "^0.2.0",
97
- "@stdlib/array-float64": "^0.2.0",
98
- "@stdlib/array-uint8": "^0.2.0",
99
- "@stdlib/assert-has-own-property": "^0.2.0",
100
- "@stdlib/assert-is-array": "^0.2.0",
101
- "@stdlib/assert-is-browser": "^0.2.0",
102
- "@stdlib/assert-is-complex128": "^0.2.0",
103
- "@stdlib/assert-is-complex64": "^0.2.0",
104
- "@stdlib/assert-is-complex64array": "^0.1.0",
105
- "@stdlib/assert-is-float32array": "^0.2.0",
106
- "@stdlib/assert-is-float64array": "^0.2.0",
107
- "@stdlib/assert-is-function": "^0.2.0",
108
- "@stdlib/assert-is-function-array": "^0.2.0",
109
- "@stdlib/assert-is-integer": "^0.2.0",
110
- "@stdlib/assert-is-integer-array": "^0.2.0",
111
- "@stdlib/assert-is-nonnegative-integer": "^0.2.0",
112
- "@stdlib/assert-is-string": "^0.2.0",
113
- "@stdlib/assert-is-string-array": "^0.2.0",
114
- "@stdlib/assert-is-typed-array": "^0.2.0",
115
- "@stdlib/assert-is-typed-array-like": "^0.2.0",
116
- "@stdlib/assert-is-uint8array": "^0.2.0",
117
- "@stdlib/complex-base-cast-return": "^0.2.0",
118
- "@stdlib/complex-base-wrap-function": "^0.2.0",
119
- "@stdlib/complex-float32": "^0.2.0",
120
- "@stdlib/complex-float64": "^0.2.0",
121
- "@stdlib/complex-imag": "^0.2.0",
122
- "@stdlib/complex-imagf": "^0.2.0",
123
- "@stdlib/complex-real": "^0.2.0",
124
- "@stdlib/complex-realf": "^0.2.0",
125
- "@stdlib/fs-read-dir": "^0.2.0",
126
- "@stdlib/fs-read-file": "^0.2.0",
127
- "@stdlib/fs-read-json": "^0.2.0",
128
- "@stdlib/fs-unlink": "^0.2.0",
129
- "@stdlib/fs-write-file": "^0.2.0",
130
- "@stdlib/math-base-assert-is-nan": "^0.2.0",
131
- "@stdlib/math-base-assert-is-nanf": "^0.2.0",
132
- "@stdlib/math-base-ops-add": "^0.2.0",
133
- "@stdlib/math-base-ops-add3": "^0.2.0",
134
- "@stdlib/math-base-ops-add4": "^0.2.0",
135
- "@stdlib/math-base-ops-add5": "^0.2.0",
136
- "@stdlib/math-base-ops-addf": "^0.2.0",
137
- "@stdlib/math-base-ops-cadd": "^0.2.0",
138
- "@stdlib/math-base-ops-caddf": "^0.2.0",
139
- "@stdlib/math-base-special-abs": "^0.2.0",
140
- "@stdlib/math-base-special-absf": "^0.2.0",
141
- "@stdlib/math-base-special-cceil": "^0.2.0",
142
- "@stdlib/math-base-special-cceilf": "^0.2.0",
143
- "@stdlib/math-base-special-ceil": "^0.2.0",
144
- "@stdlib/math-base-special-cidentity": "^0.2.0",
145
- "@stdlib/math-base-special-cidentityf": "^0.2.0",
146
- "@stdlib/math-base-special-floor": "^0.2.0",
147
- "@stdlib/math-base-special-identity": "^0.2.0",
148
- "@stdlib/math-base-special-identityf": "^0.2.0",
149
- "@stdlib/math-base-special-pow": "^0.2.0",
150
- "@stdlib/math-base-special-round": "^0.2.0",
151
- "@stdlib/ndarray-base-bytes-per-element": "^0.2.0",
152
- "@stdlib/ndarray-base-char2dtype": "^0.2.0",
153
- "@stdlib/ndarray-base-dtype-char": "^0.2.0",
154
- "@stdlib/ndarray-base-dtype-desc": "^0.2.0",
155
- "@stdlib/ndarray-base-dtype2c": "^0.2.0",
156
- "@stdlib/ndarray-base-dtypes2signatures": "^0.2.0",
157
- "@stdlib/ndarray-promotion-rules": "^0.2.0",
158
- "@stdlib/ndarray-safe-casts": "^0.2.0",
159
- "@stdlib/random-base-bernoulli": "^0.1.0",
160
- "@stdlib/random-base-discrete-uniform": "^0.1.0",
161
- "@stdlib/random-base-randu": "^0.1.0",
162
- "@stdlib/random-base-uniform": "^0.1.0",
163
- "@stdlib/strided-dtypes": "^0.2.0",
164
- "@stdlib/string-format": "^0.2.0",
165
- "@stdlib/string-replace": "^0.2.0",
166
- "@stdlib/string-substring-after": "^0.2.0",
167
- "@stdlib/string-substring-before": "^0.2.0",
168
- "@stdlib/string-uppercase": "^0.2.0",
169
- "@stdlib/time-current-year": "^0.2.0",
170
- "@stdlib/utils-constant-function": "^0.2.0",
171
- "@stdlib/utils-define-nonenumerable-read-only-accessor": "^0.2.0",
172
- "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.0",
173
- "@stdlib/utils-keys": "^0.2.0",
174
- "@stdlib/utils-noop": "^0.2.0",
175
- "@stdlib/utils-object-inverse": "^0.2.0",
176
- "tape": "git+https://github.com/kgryte/tape.git#fix/globby",
177
- "istanbul": "^0.4.1",
178
- "tap-min": "git+https://github.com/Planeshifter/tap-min.git",
179
- "@stdlib/bench-harness": "^0.2.0",
180
- "@stdlib/bench": "^0.3.1"
63
+ "@stdlib/strided-base-smap": "^0.2.1",
64
+ "@stdlib/strided-base-smap2": "^0.2.1",
65
+ "@stdlib/strided-base-smskmap": "^0.2.1",
66
+ "@stdlib/strided-base-smskmap2": "^0.2.1",
67
+ "@stdlib/strided-base-ternary": "^0.2.1",
68
+ "@stdlib/strided-base-unary": "^0.2.1",
69
+ "@stdlib/strided-base-unary-addon-dispatch": "^0.2.1",
70
+ "@stdlib/strided-base-unary-by": "^0.2.1",
71
+ "@stdlib/strided-base-unary-dtype-signatures": "^0.2.1",
72
+ "@stdlib/strided-base-unary-signature-callbacks": "^0.2.1",
73
+ "@stdlib/strided-base-zmap": "^0.2.1",
74
+ "@stdlib/utils-define-read-only-property": "^0.2.1"
181
75
  },
76
+ "devDependencies": {},
182
77
  "engines": {
183
78
  "node": ">=0.10.0",
184
79
  "npm": ">2.7.0"