@stdlib/array-full-like 0.1.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/NOTICE +1 -1
- package/README.md +24 -3
- package/SECURITY.md +5 -0
- package/docs/types/index.d.ts +51 -51
- package/package.json +10 -43
- package/CITATION.cff +0 -30
package/NOTICE
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Copyright (c) 2016-
|
|
1
|
+
Copyright (c) 2016-2024 The Stdlib Authors.
|
package/README.md
CHANGED
|
@@ -158,6 +158,14 @@ for ( i = 0; i < dt.length; i++ ) {
|
|
|
158
158
|
|
|
159
159
|
<section class="related">
|
|
160
160
|
|
|
161
|
+
* * *
|
|
162
|
+
|
|
163
|
+
## See Also
|
|
164
|
+
|
|
165
|
+
- <span class="package-name">[`@stdlib/array-full`][@stdlib/array/full]</span><span class="delimiter">: </span><span class="description">create a filled array having a specified length.</span>
|
|
166
|
+
- <span class="package-name">[`@stdlib/array-ones-like`][@stdlib/array/ones-like]</span><span class="delimiter">: </span><span class="description">create an array filled with ones and having the same length and data type as a provided array.</span>
|
|
167
|
+
- <span class="package-name">[`@stdlib/array-zeros-like`][@stdlib/array/zeros-like]</span><span class="delimiter">: </span><span class="description">create a zero-filled array having the same length and data type as a provided array.</span>
|
|
168
|
+
|
|
161
169
|
</section>
|
|
162
170
|
|
|
163
171
|
<!-- /.related -->
|
|
@@ -188,7 +196,7 @@ See [LICENSE][stdlib-license].
|
|
|
188
196
|
|
|
189
197
|
## Copyright
|
|
190
198
|
|
|
191
|
-
Copyright © 2016-
|
|
199
|
+
Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
|
|
192
200
|
|
|
193
201
|
</section>
|
|
194
202
|
|
|
@@ -201,8 +209,8 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors].
|
|
|
201
209
|
[npm-image]: http://img.shields.io/npm/v/@stdlib/array-full-like.svg
|
|
202
210
|
[npm-url]: https://npmjs.org/package/@stdlib/array-full-like
|
|
203
211
|
|
|
204
|
-
[test-image]: https://github.com/stdlib-js/array-full-like/actions/workflows/test.yml/badge.svg?branch=v0.1
|
|
205
|
-
[test-url]: https://github.com/stdlib-js/array-full-like/actions/workflows/test.yml?query=branch:v0.1
|
|
212
|
+
[test-image]: https://github.com/stdlib-js/array-full-like/actions/workflows/test.yml/badge.svg?branch=v0.2.1
|
|
213
|
+
[test-url]: https://github.com/stdlib-js/array-full-like/actions/workflows/test.yml?query=branch:v0.2.1
|
|
206
214
|
|
|
207
215
|
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/array-full-like/main.svg
|
|
208
216
|
[coverage-url]: https://codecov.io/github/stdlib-js/array-full-like?branch=main
|
|
@@ -225,12 +233,25 @@ Copyright © 2016-2023. The Stdlib [Authors][stdlib-authors].
|
|
|
225
233
|
[es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
|
|
226
234
|
|
|
227
235
|
[deno-url]: https://github.com/stdlib-js/array-full-like/tree/deno
|
|
236
|
+
[deno-readme]: https://github.com/stdlib-js/array-full-like/blob/deno/README.md
|
|
228
237
|
[umd-url]: https://github.com/stdlib-js/array-full-like/tree/umd
|
|
238
|
+
[umd-readme]: https://github.com/stdlib-js/array-full-like/blob/umd/README.md
|
|
229
239
|
[esm-url]: https://github.com/stdlib-js/array-full-like/tree/esm
|
|
240
|
+
[esm-readme]: https://github.com/stdlib-js/array-full-like/blob/esm/README.md
|
|
230
241
|
[branches-url]: https://github.com/stdlib-js/array-full-like/blob/main/branches.md
|
|
231
242
|
|
|
232
243
|
[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/array-full-like/main/LICENSE
|
|
233
244
|
|
|
245
|
+
<!-- <related-links> -->
|
|
246
|
+
|
|
247
|
+
[@stdlib/array/full]: https://www.npmjs.com/package/@stdlib/array-full
|
|
248
|
+
|
|
249
|
+
[@stdlib/array/ones-like]: https://www.npmjs.com/package/@stdlib/array-ones-like
|
|
250
|
+
|
|
251
|
+
[@stdlib/array/zeros-like]: https://www.npmjs.com/package/@stdlib/array-zeros-like
|
|
252
|
+
|
|
253
|
+
<!-- </related-links> -->
|
|
254
|
+
|
|
234
255
|
</section>
|
|
235
256
|
|
|
236
257
|
<!-- /.links -->
|
package/SECURITY.md
ADDED
package/docs/types/index.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ import { ComplexLike } from '@stdlib/types/complex';
|
|
|
32
32
|
* @returns filled array
|
|
33
33
|
*
|
|
34
34
|
* @example
|
|
35
|
-
* var zeros = require(
|
|
35
|
+
* var zeros = require( '@stdlib/array-zeros' );
|
|
36
36
|
*
|
|
37
37
|
* var x = zeros( 2, 'float32' );
|
|
38
38
|
* // returns <Float32Array>[ 0.0, 0.0 ]
|
|
@@ -40,7 +40,7 @@ import { ComplexLike } from '@stdlib/types/complex';
|
|
|
40
40
|
* var y = fullLike( x, 1.0, 'float64' );
|
|
41
41
|
* // returns <Float64Array>[ 1.0, 1.0 ]
|
|
42
42
|
*/
|
|
43
|
-
declare function fullLike( x: AnyArray, value: number, dtype: 'float64' ): Float64Array;
|
|
43
|
+
declare function fullLike( x: AnyArray, value: number, dtype: 'float64' ): Float64Array;
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
46
|
* Creates a filled array having the same length as a provided input array.
|
|
@@ -51,7 +51,7 @@ declare function fullLike( x: AnyArray, value: number, dtype: 'float64' ): Float
|
|
|
51
51
|
* @returns filled array
|
|
52
52
|
*
|
|
53
53
|
* @example
|
|
54
|
-
* var zeros = require(
|
|
54
|
+
* var zeros = require( '@stdlib/array-zeros' );
|
|
55
55
|
*
|
|
56
56
|
* var x = zeros( 2, 'float64' );
|
|
57
57
|
* // returns <Float64Array>[ 0.0, 0.0 ]
|
|
@@ -59,7 +59,7 @@ declare function fullLike( x: AnyArray, value: number, dtype: 'float64' ): Float
|
|
|
59
59
|
* var y = fullLike( x, 1.0, 'float32' );
|
|
60
60
|
* // returns <Float32Array>[ 1.0, 1.0 ]
|
|
61
61
|
*/
|
|
62
|
-
declare function fullLike( x: AnyArray, value: number, dtype: 'float32' ): Float32Array;
|
|
62
|
+
declare function fullLike( x: AnyArray, value: number, dtype: 'float32' ): Float32Array;
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* Creates a filled array having the same length as a provided input array.
|
|
@@ -74,7 +74,7 @@ declare function fullLike( x: AnyArray, value: number, dtype: 'float32' ): Float
|
|
|
74
74
|
* @returns filled array
|
|
75
75
|
*
|
|
76
76
|
* @example
|
|
77
|
-
* var zeros = require(
|
|
77
|
+
* var zeros = require( '@stdlib/array-zeros' );
|
|
78
78
|
*
|
|
79
79
|
* var x = zeros( 2, 'float64' );
|
|
80
80
|
* // returns <Float64Array>[ 0.0, 0.0 ]
|
|
@@ -82,7 +82,7 @@ declare function fullLike( x: AnyArray, value: number, dtype: 'float32' ): Float
|
|
|
82
82
|
* var y = fullLike( x, 1.0, 'complex128' );
|
|
83
83
|
* // returns <Complex128Array>
|
|
84
84
|
*/
|
|
85
|
-
declare function fullLike( x: AnyArray, value: number | ComplexLike, dtype: 'complex128' ): Complex128Array;
|
|
85
|
+
declare function fullLike( x: AnyArray, value: number | ComplexLike, dtype: 'complex128' ): Complex128Array;
|
|
86
86
|
|
|
87
87
|
/**
|
|
88
88
|
* Creates a filled array having the same length as a provided input array.
|
|
@@ -97,7 +97,7 @@ declare function fullLike( x: AnyArray, value: number | ComplexLike, dtype: 'com
|
|
|
97
97
|
* @returns filled array
|
|
98
98
|
*
|
|
99
99
|
* @example
|
|
100
|
-
* var zeros = require(
|
|
100
|
+
* var zeros = require( '@stdlib/array-zeros' );
|
|
101
101
|
*
|
|
102
102
|
* var x = zeros( 2, 'float64' );
|
|
103
103
|
* // returns <Float64Array>[ 0.0, 0.0 ]
|
|
@@ -105,7 +105,7 @@ declare function fullLike( x: AnyArray, value: number | ComplexLike, dtype: 'com
|
|
|
105
105
|
* var y = fullLike( x, 1.0, 'complex64' );
|
|
106
106
|
* // returns <Complex64Array>
|
|
107
107
|
*/
|
|
108
|
-
declare function fullLike( x: AnyArray, value: number | ComplexLike, dtype: 'complex64' ): Complex64Array;
|
|
108
|
+
declare function fullLike( x: AnyArray, value: number | ComplexLike, dtype: 'complex64' ): Complex64Array;
|
|
109
109
|
|
|
110
110
|
/**
|
|
111
111
|
* Creates a filled array having the same length as a provided input array.
|
|
@@ -116,7 +116,7 @@ declare function fullLike( x: AnyArray, value: number | ComplexLike, dtype: 'com
|
|
|
116
116
|
* @returns filled array
|
|
117
117
|
*
|
|
118
118
|
* @example
|
|
119
|
-
* var zeros = require(
|
|
119
|
+
* var zeros = require( '@stdlib/array-zeros' );
|
|
120
120
|
*
|
|
121
121
|
* var x = zeros( 2, 'float64' );
|
|
122
122
|
* // returns <Float64Array>[ 0.0, 0.0 ]
|
|
@@ -124,7 +124,7 @@ declare function fullLike( x: AnyArray, value: number | ComplexLike, dtype: 'com
|
|
|
124
124
|
* var y = fullLike( x, 1, 'int32' );
|
|
125
125
|
* // returns <Int32Array>[ 1, 1 ]
|
|
126
126
|
*/
|
|
127
|
-
declare function fullLike( x: AnyArray, value: number, dtype: 'int32' ): Int32Array;
|
|
127
|
+
declare function fullLike( x: AnyArray, value: number, dtype: 'int32' ): Int32Array;
|
|
128
128
|
|
|
129
129
|
/**
|
|
130
130
|
* Creates a filled array having the same length as a provided input array.
|
|
@@ -135,7 +135,7 @@ declare function fullLike( x: AnyArray, value: number, dtype: 'int32' ): Int32Ar
|
|
|
135
135
|
* @returns filled array
|
|
136
136
|
*
|
|
137
137
|
* @example
|
|
138
|
-
* var zeros = require(
|
|
138
|
+
* var zeros = require( '@stdlib/array-zeros' );
|
|
139
139
|
*
|
|
140
140
|
* var x = zeros( 2, 'float64' );
|
|
141
141
|
* // returns <Float64Array>[ 0.0, 0.0 ]
|
|
@@ -143,7 +143,7 @@ declare function fullLike( x: AnyArray, value: number, dtype: 'int32' ): Int32Ar
|
|
|
143
143
|
* var y = fullLike( x, 1, 'int16' );
|
|
144
144
|
* // returns <Int16Array>[ 1, 1 ]
|
|
145
145
|
*/
|
|
146
|
-
declare function fullLike( x: AnyArray, value: number, dtype: 'int16' ): Int16Array;
|
|
146
|
+
declare function fullLike( x: AnyArray, value: number, dtype: 'int16' ): Int16Array;
|
|
147
147
|
|
|
148
148
|
/**
|
|
149
149
|
* Creates a filled array having the same length as a provided input array.
|
|
@@ -154,7 +154,7 @@ declare function fullLike( x: AnyArray, value: number, dtype: 'int16' ): Int16Ar
|
|
|
154
154
|
* @returns filled array
|
|
155
155
|
*
|
|
156
156
|
* @example
|
|
157
|
-
* var zeros = require(
|
|
157
|
+
* var zeros = require( '@stdlib/array-zeros' );
|
|
158
158
|
*
|
|
159
159
|
* var x = zeros( 2, 'float64' );
|
|
160
160
|
* // returns <Float64Array>[ 0.0, 0.0 ]
|
|
@@ -162,7 +162,7 @@ declare function fullLike( x: AnyArray, value: number, dtype: 'int16' ): Int16Ar
|
|
|
162
162
|
* var y = fullLike( x, 1, 'int8' );
|
|
163
163
|
* // returns <Int8Array>[ 1, 1 ]
|
|
164
164
|
*/
|
|
165
|
-
declare function fullLike( x: AnyArray, value: number, dtype: 'int8' ): Int8Array;
|
|
165
|
+
declare function fullLike( x: AnyArray, value: number, dtype: 'int8' ): Int8Array;
|
|
166
166
|
|
|
167
167
|
/**
|
|
168
168
|
* Creates a filled array having the same length as a provided input array.
|
|
@@ -173,7 +173,7 @@ declare function fullLike( x: AnyArray, value: number, dtype: 'int8' ): Int8Arra
|
|
|
173
173
|
* @returns filled array
|
|
174
174
|
*
|
|
175
175
|
* @example
|
|
176
|
-
* var zeros = require(
|
|
176
|
+
* var zeros = require( '@stdlib/array-zeros' );
|
|
177
177
|
*
|
|
178
178
|
* var x = zeros( 2, 'float64' );
|
|
179
179
|
* // returns <Float64Array>[ 0, 0 ]
|
|
@@ -181,7 +181,7 @@ declare function fullLike( x: AnyArray, value: number, dtype: 'int8' ): Int8Arra
|
|
|
181
181
|
* var y = fullLike( x, 1, 'uint32' );
|
|
182
182
|
* // returns <Uint32Array>[ 1, 1 ]
|
|
183
183
|
*/
|
|
184
|
-
declare function fullLike( x: AnyArray, value: number, dtype: 'uint32' ): Uint32Array;
|
|
184
|
+
declare function fullLike( x: AnyArray, value: number, dtype: 'uint32' ): Uint32Array;
|
|
185
185
|
|
|
186
186
|
/**
|
|
187
187
|
* Creates a filled array having the same length as a provided input array.
|
|
@@ -192,7 +192,7 @@ declare function fullLike( x: AnyArray, value: number, dtype: 'uint32' ): Uint32
|
|
|
192
192
|
* @returns filled array
|
|
193
193
|
*
|
|
194
194
|
* @example
|
|
195
|
-
* var zeros = require(
|
|
195
|
+
* var zeros = require( '@stdlib/array-zeros' );
|
|
196
196
|
*
|
|
197
197
|
* var x = zeros( 2, 'float64' );
|
|
198
198
|
* // returns <Float64Array>[ 0.0, 0.0 ]
|
|
@@ -200,7 +200,7 @@ declare function fullLike( x: AnyArray, value: number, dtype: 'uint32' ): Uint32
|
|
|
200
200
|
* var y = fullLike( x, 1, 'uint16' );
|
|
201
201
|
* // returns <Uint16Array>[ 1, 1 ]
|
|
202
202
|
*/
|
|
203
|
-
declare function fullLike( x: AnyArray, value: number, dtype: 'uint16' ): Uint16Array;
|
|
203
|
+
declare function fullLike( x: AnyArray, value: number, dtype: 'uint16' ): Uint16Array;
|
|
204
204
|
|
|
205
205
|
/**
|
|
206
206
|
* Creates a filled array having the same length as a provided input array.
|
|
@@ -211,7 +211,7 @@ declare function fullLike( x: AnyArray, value: number, dtype: 'uint16' ): Uint16
|
|
|
211
211
|
* @returns filled array
|
|
212
212
|
*
|
|
213
213
|
* @example
|
|
214
|
-
* var zeros = require(
|
|
214
|
+
* var zeros = require( '@stdlib/array-zeros' );
|
|
215
215
|
*
|
|
216
216
|
* var x = zeros( 2, 'float64' );
|
|
217
217
|
* // returns <Float64Array>[ 0.0, 0.0 ]
|
|
@@ -219,7 +219,7 @@ declare function fullLike( x: AnyArray, value: number, dtype: 'uint16' ): Uint16
|
|
|
219
219
|
* var y = fullLike( x, 1, 'uint8' );
|
|
220
220
|
* // returns <Uint8Array>[ 1, 1 ]
|
|
221
221
|
*/
|
|
222
|
-
declare function fullLike( x: AnyArray, value: number, dtype: 'uint8' ): Uint8Array;
|
|
222
|
+
declare function fullLike( x: AnyArray, value: number, dtype: 'uint8' ): Uint8Array;
|
|
223
223
|
|
|
224
224
|
/**
|
|
225
225
|
* Creates a filled array having the same length as a provided input array.
|
|
@@ -230,7 +230,7 @@ declare function fullLike( x: AnyArray, value: number, dtype: 'uint8' ): Uint8Ar
|
|
|
230
230
|
* @returns filled array
|
|
231
231
|
*
|
|
232
232
|
* @example
|
|
233
|
-
* var zeros = require(
|
|
233
|
+
* var zeros = require( '@stdlib/array-zeros' );
|
|
234
234
|
*
|
|
235
235
|
* var x = zeros( 2, 'float64' );
|
|
236
236
|
* // returns <Float64Array>[ 0.0, 0.0 ]
|
|
@@ -238,7 +238,7 @@ declare function fullLike( x: AnyArray, value: number, dtype: 'uint8' ): Uint8Ar
|
|
|
238
238
|
* var y = fullLike( x, 1, 'uint8c' );
|
|
239
239
|
* // returns <Uint8ClampedArray>[ 1, 1 ]
|
|
240
240
|
*/
|
|
241
|
-
declare function fullLike( x: AnyArray, value: number, dtype: 'uint8c' ): Uint8ClampedArray;
|
|
241
|
+
declare function fullLike( x: AnyArray, value: number, dtype: 'uint8c' ): Uint8ClampedArray;
|
|
242
242
|
|
|
243
243
|
/**
|
|
244
244
|
* Creates a filled array having the same length as a provided input array.
|
|
@@ -249,7 +249,7 @@ declare function fullLike( x: AnyArray, value: number, dtype: 'uint8c' ): Uint8C
|
|
|
249
249
|
* @returns filled array
|
|
250
250
|
*
|
|
251
251
|
* @example
|
|
252
|
-
* var zeros = require(
|
|
252
|
+
* var zeros = require( '@stdlib/array-zeros' );
|
|
253
253
|
*
|
|
254
254
|
* var x = zeros( 2, 'float64' );
|
|
255
255
|
* // returns <Float64Array>[ 0.0, 0.0 ]
|
|
@@ -257,7 +257,7 @@ declare function fullLike( x: AnyArray, value: number, dtype: 'uint8c' ): Uint8C
|
|
|
257
257
|
* var y = fullLike( x, 1.0, 'generic' );
|
|
258
258
|
* // returns [ 1.0, 1.0 ]
|
|
259
259
|
*/
|
|
260
|
-
declare function fullLike( x: AnyArray, value: any, dtype: 'generic' ): Array<any>;
|
|
260
|
+
declare function fullLike( x: AnyArray, value: any, dtype: 'generic' ): Array<any>;
|
|
261
261
|
|
|
262
262
|
/**
|
|
263
263
|
* Creates a filled array having the same length and data type as a provided input array.
|
|
@@ -283,7 +283,7 @@ declare function fullLike( x: AnyArray, value: any, dtype: 'generic' ): Array<an
|
|
|
283
283
|
* @returns filled array
|
|
284
284
|
*
|
|
285
285
|
* @example
|
|
286
|
-
* var zeros = require(
|
|
286
|
+
* var zeros = require( '@stdlib/array-zeros' );
|
|
287
287
|
*
|
|
288
288
|
* var x = zeros( 2, 'float64' );
|
|
289
289
|
* // returns <Float64Array>[ 0.0, 0.0 ]
|
|
@@ -291,7 +291,7 @@ declare function fullLike( x: AnyArray, value: any, dtype: 'generic' ): Array<an
|
|
|
291
291
|
* var y = fullLike( x, 1.0 );
|
|
292
292
|
* // returns <Float64Array>[ 1.0, 1.0 ]
|
|
293
293
|
*/
|
|
294
|
-
declare function fullLike( x: Float64Array, value: number, dtype?: DataType ): Float64Array;
|
|
294
|
+
declare function fullLike( x: Float64Array, value: number, dtype?: DataType ): Float64Array;
|
|
295
295
|
|
|
296
296
|
/**
|
|
297
297
|
* Creates a filled array having the same length and data type as a provided input array.
|
|
@@ -317,7 +317,7 @@ declare function fullLike( x: Float64Array, value: number, dtype?: DataType ): F
|
|
|
317
317
|
* @returns filled array
|
|
318
318
|
*
|
|
319
319
|
* @example
|
|
320
|
-
* var zeros = require(
|
|
320
|
+
* var zeros = require( '@stdlib/array-zeros' );
|
|
321
321
|
*
|
|
322
322
|
* var x = zeros( 2, 'float32' );
|
|
323
323
|
* // returns <Float32Array>[ 0.0, 0.0 ]
|
|
@@ -325,7 +325,7 @@ declare function fullLike( x: Float64Array, value: number, dtype?: DataType ): F
|
|
|
325
325
|
* var y = fullLike( x, 1.0 );
|
|
326
326
|
* // returns <Float32Array>[ 1.0, 1.0 ]
|
|
327
327
|
*/
|
|
328
|
-
declare function fullLike( x: Float32Array, value: number, dtype?: DataType ): Float32Array;
|
|
328
|
+
declare function fullLike( x: Float32Array, value: number, dtype?: DataType ): Float32Array;
|
|
329
329
|
|
|
330
330
|
/**
|
|
331
331
|
* Creates a filled array having the same length and data type as a provided input array.
|
|
@@ -355,7 +355,7 @@ declare function fullLike( x: Float32Array, value: number, dtype?: DataType ): F
|
|
|
355
355
|
* @returns filled array
|
|
356
356
|
*
|
|
357
357
|
* @example
|
|
358
|
-
* var zeros = require(
|
|
358
|
+
* var zeros = require( '@stdlib/array-zeros' );
|
|
359
359
|
*
|
|
360
360
|
* var x = zeros( 2, 'complex128' );
|
|
361
361
|
* // returns <Complex128Array>
|
|
@@ -363,7 +363,7 @@ declare function fullLike( x: Float32Array, value: number, dtype?: DataType ): F
|
|
|
363
363
|
* var y = fullLike( x, 1.0 );
|
|
364
364
|
* // returns <Complex128Array>
|
|
365
365
|
*/
|
|
366
|
-
declare function fullLike( x: Complex128Array, value: number | ComplexLike, dtype?: DataType ): Complex128Array;
|
|
366
|
+
declare function fullLike( x: Complex128Array, value: number | ComplexLike, dtype?: DataType ): Complex128Array;
|
|
367
367
|
|
|
368
368
|
/**
|
|
369
369
|
* Creates a filled array having the same length and data type as a provided input array.
|
|
@@ -393,7 +393,7 @@ declare function fullLike( x: Complex128Array, value: number | ComplexLike, dtyp
|
|
|
393
393
|
* @returns filled array
|
|
394
394
|
*
|
|
395
395
|
* @example
|
|
396
|
-
* var zeros = require(
|
|
396
|
+
* var zeros = require( '@stdlib/array-zeros' );
|
|
397
397
|
*
|
|
398
398
|
* var x = zeros( 2, 'complex64' );
|
|
399
399
|
* // returns <Complex64Array>
|
|
@@ -401,7 +401,7 @@ declare function fullLike( x: Complex128Array, value: number | ComplexLike, dtyp
|
|
|
401
401
|
* var y = fullLike( x, 1.0 );
|
|
402
402
|
* // returns <Complex64Array>
|
|
403
403
|
*/
|
|
404
|
-
declare function fullLike( x: Complex64Array, value: number | ComplexLike, dtype?: DataType ): Complex64Array;
|
|
404
|
+
declare function fullLike( x: Complex64Array, value: number | ComplexLike, dtype?: DataType ): Complex64Array;
|
|
405
405
|
|
|
406
406
|
/**
|
|
407
407
|
* Creates a filled array having the same length and data type as a provided input array.
|
|
@@ -427,7 +427,7 @@ declare function fullLike( x: Complex64Array, value: number | ComplexLike, dtype
|
|
|
427
427
|
* @returns filled array
|
|
428
428
|
*
|
|
429
429
|
* @example
|
|
430
|
-
* var zeros = require(
|
|
430
|
+
* var zeros = require( '@stdlib/array-zeros' );
|
|
431
431
|
*
|
|
432
432
|
* var x = zeros( 2, 'int32' );
|
|
433
433
|
* // returns <Int32Array>[ 0, 0 ]
|
|
@@ -435,7 +435,7 @@ declare function fullLike( x: Complex64Array, value: number | ComplexLike, dtype
|
|
|
435
435
|
* var y = fullLike( x, 1 );
|
|
436
436
|
* // returns <Int32Array>[ 1, 1 ]
|
|
437
437
|
*/
|
|
438
|
-
declare function fullLike( x: Int32Array, value: number, dtype?: DataType ): Int32Array;
|
|
438
|
+
declare function fullLike( x: Int32Array, value: number, dtype?: DataType ): Int32Array;
|
|
439
439
|
|
|
440
440
|
/**
|
|
441
441
|
* Creates a filled array having the same length and data type as a provided input array.
|
|
@@ -461,7 +461,7 @@ declare function fullLike( x: Int32Array, value: number, dtype?: DataType ): Int
|
|
|
461
461
|
* @returns filled array
|
|
462
462
|
*
|
|
463
463
|
* @example
|
|
464
|
-
* var zeros = require(
|
|
464
|
+
* var zeros = require( '@stdlib/array-zeros' );
|
|
465
465
|
*
|
|
466
466
|
* var x = zeros( 2, 'int16' );
|
|
467
467
|
* // returns <Int16Array>[ 0, 0 ]
|
|
@@ -469,7 +469,7 @@ declare function fullLike( x: Int32Array, value: number, dtype?: DataType ): Int
|
|
|
469
469
|
* var y = fullLike( x, 1 );
|
|
470
470
|
* // returns <Int16Array>[ 1, 1 ]
|
|
471
471
|
*/
|
|
472
|
-
declare function fullLike( x: Int16Array, value: number, dtype?: DataType ): Int16Array;
|
|
472
|
+
declare function fullLike( x: Int16Array, value: number, dtype?: DataType ): Int16Array;
|
|
473
473
|
|
|
474
474
|
/**
|
|
475
475
|
* Creates a filled array having the same length and data type as a provided input array.
|
|
@@ -495,7 +495,7 @@ declare function fullLike( x: Int16Array, value: number, dtype?: DataType ): Int
|
|
|
495
495
|
* @returns filled array
|
|
496
496
|
*
|
|
497
497
|
* @example
|
|
498
|
-
* var zeros = require(
|
|
498
|
+
* var zeros = require( '@stdlib/array-zeros' );
|
|
499
499
|
*
|
|
500
500
|
* var x = zeros( 2, 'int8' );
|
|
501
501
|
* // returns <Int8Array>[ 0, 0 ]
|
|
@@ -503,7 +503,7 @@ declare function fullLike( x: Int16Array, value: number, dtype?: DataType ): Int
|
|
|
503
503
|
* var y = fullLike( x, 1 );
|
|
504
504
|
* // returns <Int8Array>[ 1, 1 ]
|
|
505
505
|
*/
|
|
506
|
-
declare function fullLike( x: Int8Array, value: number, dtype?: DataType ): Int8Array;
|
|
506
|
+
declare function fullLike( x: Int8Array, value: number, dtype?: DataType ): Int8Array;
|
|
507
507
|
|
|
508
508
|
/**
|
|
509
509
|
* Creates a filled array having the same length and data type as a provided input array.
|
|
@@ -529,7 +529,7 @@ declare function fullLike( x: Int8Array, value: number, dtype?: DataType ): Int8
|
|
|
529
529
|
* @returns filled array
|
|
530
530
|
*
|
|
531
531
|
* @example
|
|
532
|
-
* var zeros = require(
|
|
532
|
+
* var zeros = require( '@stdlib/array-zeros' );
|
|
533
533
|
*
|
|
534
534
|
* var x = zeros( 2, 'uint32' );
|
|
535
535
|
* // returns <Uint32Array>[ 0, 0 ]
|
|
@@ -537,7 +537,7 @@ declare function fullLike( x: Int8Array, value: number, dtype?: DataType ): Int8
|
|
|
537
537
|
* var y = fullLike( x, 1 );
|
|
538
538
|
* // returns <Uint32Array>[ 1, 1 ]
|
|
539
539
|
*/
|
|
540
|
-
declare function fullLike( x: Uint32Array, value: number, dtype?: DataType ): Uint32Array;
|
|
540
|
+
declare function fullLike( x: Uint32Array, value: number, dtype?: DataType ): Uint32Array;
|
|
541
541
|
|
|
542
542
|
/**
|
|
543
543
|
* Creates a filled array having the same length and data type as a provided input array.
|
|
@@ -563,7 +563,7 @@ declare function fullLike( x: Uint32Array, value: number, dtype?: DataType ): Ui
|
|
|
563
563
|
* @returns filled array
|
|
564
564
|
*
|
|
565
565
|
* @example
|
|
566
|
-
* var zeros = require(
|
|
566
|
+
* var zeros = require( '@stdlib/array-zeros' );
|
|
567
567
|
*
|
|
568
568
|
* var x = zeros( 2, 'uint16' );
|
|
569
569
|
* // returns <Uint16Array>[ 0, 0 ]
|
|
@@ -571,7 +571,7 @@ declare function fullLike( x: Uint32Array, value: number, dtype?: DataType ): Ui
|
|
|
571
571
|
* var y = fullLike( x, 1 );
|
|
572
572
|
* // returns <Uint16Array>[ 1, 1 ]
|
|
573
573
|
*/
|
|
574
|
-
declare function fullLike( x: Uint16Array, value: number, dtype?: DataType ): Uint16Array;
|
|
574
|
+
declare function fullLike( x: Uint16Array, value: number, dtype?: DataType ): Uint16Array;
|
|
575
575
|
|
|
576
576
|
/**
|
|
577
577
|
* Creates a filled array having the same length and data type as a provided input array.
|
|
@@ -597,7 +597,7 @@ declare function fullLike( x: Uint16Array, value: number, dtype?: DataType ): Ui
|
|
|
597
597
|
* @returns filled array
|
|
598
598
|
*
|
|
599
599
|
* @example
|
|
600
|
-
* var zeros = require(
|
|
600
|
+
* var zeros = require( '@stdlib/array-zeros' );
|
|
601
601
|
*
|
|
602
602
|
* var x = zeros( 2, 'uint8' );
|
|
603
603
|
* // returns <Uint8Array>[ 0, 0 ]
|
|
@@ -605,7 +605,7 @@ declare function fullLike( x: Uint16Array, value: number, dtype?: DataType ): Ui
|
|
|
605
605
|
* var y = fullLike( x, 1 );
|
|
606
606
|
* // returns <Uint8Array>[ 1, 1 ]
|
|
607
607
|
*/
|
|
608
|
-
declare function fullLike( x: Uint8Array, value: number, dtype?: DataType ): Uint8Array;
|
|
608
|
+
declare function fullLike( x: Uint8Array, value: number, dtype?: DataType ): Uint8Array;
|
|
609
609
|
|
|
610
610
|
/**
|
|
611
611
|
* Creates a filled array having the same length and data type as a provided input array.
|
|
@@ -631,7 +631,7 @@ declare function fullLike( x: Uint8Array, value: number, dtype?: DataType ): Uin
|
|
|
631
631
|
* @returns filled array
|
|
632
632
|
*
|
|
633
633
|
* @example
|
|
634
|
-
* var zeros = require(
|
|
634
|
+
* var zeros = require( '@stdlib/array-zeros' );
|
|
635
635
|
*
|
|
636
636
|
* var x = zeros( 2, 'uint8c' );
|
|
637
637
|
* // returns <Uint8ClampedArray>[ 0, 0 ]
|
|
@@ -639,7 +639,7 @@ declare function fullLike( x: Uint8Array, value: number, dtype?: DataType ): Uin
|
|
|
639
639
|
* var y = fullLike( x, 1 );
|
|
640
640
|
* // returns <Uint8ClampedArray>[ 1, 1 ]
|
|
641
641
|
*/
|
|
642
|
-
declare function fullLike( x: Uint8ClampedArray, value: number, dtype?: DataType ): Uint8ClampedArray;
|
|
642
|
+
declare function fullLike( x: Uint8ClampedArray, value: number, dtype?: DataType ): Uint8ClampedArray;
|
|
643
643
|
|
|
644
644
|
/**
|
|
645
645
|
* Creates a filled array having the same length and data type as a provided input array.
|
|
@@ -665,7 +665,7 @@ declare function fullLike( x: Uint8ClampedArray, value: number, dtype?: DataType
|
|
|
665
665
|
* @returns filled array
|
|
666
666
|
*
|
|
667
667
|
* @example
|
|
668
|
-
* var zeros = require(
|
|
668
|
+
* var zeros = require( '@stdlib/array-zeros' );
|
|
669
669
|
*
|
|
670
670
|
* var x = zeros( 2, 'generic' );
|
|
671
671
|
* // returns [ 0, 0 ]
|
|
@@ -673,7 +673,7 @@ declare function fullLike( x: Uint8ClampedArray, value: number, dtype?: DataType
|
|
|
673
673
|
* var y = fullLike( x, 1.0 );
|
|
674
674
|
* // returns [ 1.0, 1.0 ]
|
|
675
675
|
*/
|
|
676
|
-
declare function fullLike( x: Array<any>, value: any, dtype?: DataType ): Array<any>;
|
|
676
|
+
declare function fullLike( x: Array<any>, value: any, dtype?: DataType ): Array<any>;
|
|
677
677
|
|
|
678
678
|
/**
|
|
679
679
|
* Creates a filled array having the same length and data type as a provided input array.
|
|
@@ -699,7 +699,7 @@ declare function fullLike( x: Array<any>, value: any, dtype?: DataType ): Array<
|
|
|
699
699
|
* @returns filled array
|
|
700
700
|
*
|
|
701
701
|
* @example
|
|
702
|
-
* var zeros = require(
|
|
702
|
+
* var zeros = require( '@stdlib/array-zeros' );
|
|
703
703
|
*
|
|
704
704
|
* var x = zeros( 2, 'float64' );
|
|
705
705
|
* // returns <Float64Array>[ 0.0, 0.0 ]
|
|
@@ -708,7 +708,7 @@ declare function fullLike( x: Array<any>, value: any, dtype?: DataType ): Array<
|
|
|
708
708
|
* // returns <Float64Array>[ 1.0, 1.0 ]
|
|
709
709
|
*
|
|
710
710
|
* @example
|
|
711
|
-
* var zeros = require(
|
|
711
|
+
* var zeros = require( '@stdlib/array-zeros' );
|
|
712
712
|
*
|
|
713
713
|
* var x = zeros( 2, 'float64' );
|
|
714
714
|
* // returns <Float64Array>[ 0.0, 0.0 ]
|
|
@@ -716,7 +716,7 @@ declare function fullLike( x: Array<any>, value: any, dtype?: DataType ): Array<
|
|
|
716
716
|
* var y = fullLike( x, 1.0, 'float32' );
|
|
717
717
|
* // returns <Float32Array>[ 1.0, 1.0 ]
|
|
718
718
|
*/
|
|
719
|
-
declare function fullLike( x: AnyArray, value: any, dtype?: DataType ): AnyArray;
|
|
719
|
+
declare function fullLike( x: AnyArray, value: any, dtype?: DataType ): AnyArray;
|
|
720
720
|
|
|
721
721
|
|
|
722
722
|
// EXPORTS //
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stdlib/array-full-like",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Create a filled array having the same length and data type as a provided array.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -15,19 +15,12 @@
|
|
|
15
15
|
],
|
|
16
16
|
"main": "./lib",
|
|
17
17
|
"directories": {
|
|
18
|
-
"benchmark": "./benchmark",
|
|
19
18
|
"doc": "./docs",
|
|
20
|
-
"example": "./examples",
|
|
21
19
|
"lib": "./lib",
|
|
22
|
-
"
|
|
20
|
+
"dist": "./dist"
|
|
23
21
|
},
|
|
24
22
|
"types": "./docs/types",
|
|
25
|
-
"scripts": {
|
|
26
|
-
"test": "make test",
|
|
27
|
-
"test-cov": "make test-cov",
|
|
28
|
-
"examples": "make examples",
|
|
29
|
-
"benchmark": "make benchmark"
|
|
30
|
-
},
|
|
23
|
+
"scripts": {},
|
|
31
24
|
"homepage": "https://stdlib.io",
|
|
32
25
|
"repository": {
|
|
33
26
|
"type": "git",
|
|
@@ -37,40 +30,14 @@
|
|
|
37
30
|
"url": "https://github.com/stdlib-js/stdlib/issues"
|
|
38
31
|
},
|
|
39
32
|
"dependencies": {
|
|
40
|
-
"@stdlib/array-dtype": "^0.1
|
|
41
|
-
"@stdlib/array-full": "^0.1
|
|
42
|
-
"@stdlib/complex-float32": "^0.1
|
|
43
|
-
"@stdlib/complex-float64": "^0.1
|
|
44
|
-
"@stdlib/string-format": "^0.1
|
|
45
|
-
"@stdlib/
|
|
46
|
-
"@stdlib/error-tools-fmtprodmsg": "^0.1.0"
|
|
47
|
-
},
|
|
48
|
-
"devDependencies": {
|
|
49
|
-
"@stdlib/array-complex128": "^0.1.0",
|
|
50
|
-
"@stdlib/array-complex64": "^0.1.0",
|
|
51
|
-
"@stdlib/array-dtypes": "^0.1.0",
|
|
52
|
-
"@stdlib/array-float32": "^0.1.0",
|
|
53
|
-
"@stdlib/array-float64": "^0.1.0",
|
|
54
|
-
"@stdlib/array-int16": "^0.1.0",
|
|
55
|
-
"@stdlib/array-int32": "^0.1.0",
|
|
56
|
-
"@stdlib/array-int8": "^0.1.0",
|
|
57
|
-
"@stdlib/array-uint16": "^0.1.0",
|
|
58
|
-
"@stdlib/array-uint32": "^0.1.0",
|
|
59
|
-
"@stdlib/array-uint8": "^0.1.0",
|
|
60
|
-
"@stdlib/array-uint8c": "^0.1.0",
|
|
61
|
-
"@stdlib/array-zeros": "^0.1.0",
|
|
62
|
-
"@stdlib/assert-instance-of": "^0.1.0",
|
|
63
|
-
"@stdlib/assert-is-array": "^0.1.0",
|
|
64
|
-
"@stdlib/assert-is-typed-array": "^0.1.0",
|
|
65
|
-
"@stdlib/assert-is-typed-array-like": "^0.1.0",
|
|
66
|
-
"@stdlib/bench": "^0.1.0",
|
|
67
|
-
"@stdlib/math-base-special-pow": "^0.1.0",
|
|
68
|
-
"@stdlib/strided-base-reinterpret-complex128": "^0.1.0",
|
|
69
|
-
"@stdlib/strided-base-reinterpret-complex64": "^0.1.0",
|
|
70
|
-
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
|
|
71
|
-
"istanbul": "^0.4.1",
|
|
72
|
-
"tap-min": "git+https://github.com/Planeshifter/tap-min.git"
|
|
33
|
+
"@stdlib/array-dtype": "^0.2.1",
|
|
34
|
+
"@stdlib/array-full": "^0.2.1",
|
|
35
|
+
"@stdlib/complex-float32": "^0.2.1",
|
|
36
|
+
"@stdlib/complex-float64": "^0.2.1",
|
|
37
|
+
"@stdlib/string-format": "^0.2.1",
|
|
38
|
+
"@stdlib/error-tools-fmtprodmsg": "^0.2.1"
|
|
73
39
|
},
|
|
40
|
+
"devDependencies": {},
|
|
74
41
|
"engines": {
|
|
75
42
|
"node": ">=0.10.0",
|
|
76
43
|
"npm": ">2.7.0"
|
package/CITATION.cff
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
cff-version: 1.2.0
|
|
2
|
-
title: stdlib
|
|
3
|
-
message: >-
|
|
4
|
-
If you use this software, please cite it using the
|
|
5
|
-
metadata from this file.
|
|
6
|
-
|
|
7
|
-
type: software
|
|
8
|
-
|
|
9
|
-
authors:
|
|
10
|
-
- name: The Stdlib Authors
|
|
11
|
-
url: https://github.com/stdlib-js/stdlib/graphs/contributors
|
|
12
|
-
|
|
13
|
-
repository-code: https://github.com/stdlib-js/stdlib
|
|
14
|
-
url: https://stdlib.io
|
|
15
|
-
|
|
16
|
-
abstract: |
|
|
17
|
-
Standard library for JavaScript and Node.js.
|
|
18
|
-
|
|
19
|
-
keywords:
|
|
20
|
-
- JavaScript
|
|
21
|
-
- Node.js
|
|
22
|
-
- TypeScript
|
|
23
|
-
- standard library
|
|
24
|
-
- scientific computing
|
|
25
|
-
- numerical computing
|
|
26
|
-
- statistical computing
|
|
27
|
-
|
|
28
|
-
license: Apache-2.0 AND BSL-1.0
|
|
29
|
-
|
|
30
|
-
date-released: 2016
|