Skip to content

Commit 096afc9

Browse files
committed
Auto-generated commit
1 parent 24b0647 commit 096afc9

File tree

5 files changed

+12
-19
lines changed

5 files changed

+12
-19
lines changed

NOTICE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Copyright (c) 2016-2021 The Stdlib Authors.
1+
Copyright (c) 2016-2022 The Stdlib Authors.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ arr = filledarray( 1, buf, 10, 4, 'int16' );
192192

193193
```javascript
194194
var discreteUniform = require( '@stdlib/random-base-discrete-uniform' );
195-
var dtypes = require( '@stdlib/array-typed-dtypes' );
195+
var dtypes = require( '@stdlib/array-typed-real-dtypes' );
196196
var filledarray = require( '@stdlib/array-filled' );
197197

198198
// Generate a random number:

docs/types/index.d.ts

+8-15
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
/// <reference types="@stdlib/types"/>
2222

23-
import { RealOrComplexTypedArray } from '@stdlib/types/array';
23+
import { RealOrComplexTypedArray, DataType } from '@stdlib/types/array';
2424
import { Collection } from '@stdlib/types/object';
2525
import { IterableIterator } from '@stdlib/types/iter';
2626

@@ -48,7 +48,6 @@ type ArrayOrTypedArray = Array<any> | RealOrComplexTypedArray;
4848
* - `generic`: generic JavaScript values
4949
*
5050
* @param dtype - data type (default: 'float64')
51-
* @throws must provide a recognized data type
5251
* @returns filled array
5352
*
5453
* @example
@@ -59,15 +58,14 @@ type ArrayOrTypedArray = Array<any> | RealOrComplexTypedArray;
5958
* var arr = filledarray( 'float32' );
6059
* // returns <Float32Array>
6160
*/
62-
declare function filledarray( dtype?: string ): ArrayOrTypedArray;
61+
declare function filledarray( dtype?: DataType ): ArrayOrTypedArray;
6362

6463
/**
6564
* Creates a filled array having a specified `length`.
6665
*
6766
* @param value - fill value
6867
* @param length - array length
6968
* @param dtype - data type (default: 'float64')
70-
* @throws must provide a recognized data type
7169
* @returns filled array
7270
*
7371
* @example
@@ -78,15 +76,14 @@ declare function filledarray( dtype?: string ): ArrayOrTypedArray;
7876
* var arr = filledarray( 1.0, 5, 'float32' );
7977
* // returns <Float32Array>[ 1.0, 1.0, 1.0, 1.0, 1.0 ]
8078
*/
81-
declare function filledarray( value: any, length: number, dtype?: string ): ArrayOrTypedArray; // tslint:disable-line:max-line-length
79+
declare function filledarray( value: any, length: number, dtype?: DataType ): ArrayOrTypedArray; // tslint:disable-line:max-line-length
8280

8381
/**
8482
* Creates a filled array from another `array`.
8583
*
8684
* @param value - fill value
8785
* @param array - typed array or array-like object
8886
* @param dtype - data type (default: 'float64')
89-
* @throws must provide a recognized data type
9087
* @returns filled array
9188
*
9289
* @example
@@ -97,15 +94,14 @@ declare function filledarray( value: any, length: number, dtype?: string ): Arra
9794
* var arr = filledarray( 1.0, [ 5.0, -3.0, 2.0 ], 'float32' );
9895
* // returns <Float32Array>[ 1.0, 1.0, 1.0 ]
9996
*/
100-
declare function filledarray( value: any, array: Collection, dtype?: string ): ArrayOrTypedArray; // tslint:disable-line:max-line-length unified-signatures
97+
declare function filledarray( value: any, array: Collection, dtype?: DataType ): ArrayOrTypedArray; // tslint:disable-line:max-line-length unified-signatures
10198

10299
/**
103100
* Creates a filled array from an iterable.
104101
*
105102
* @param value - fill value
106103
* @param iterable - iterable
107104
* @param dtype - data type (default: 'float64')
108-
* @throws must provide a recognized data type
109105
* @returns filled array
110106
*
111107
* @example
@@ -126,7 +122,7 @@ declare function filledarray( value: any, array: Collection, dtype?: string ): A
126122
* var arr = filledarray( 1.0, it, 'float32' );
127123
* // returns <Float32Array>[ 1.0, 1.0, 1.0 ]
128124
*/
129-
declare function filledarray( value: any, iterable: IterableIterator, dtype?: string ): ArrayOrTypedArray; // tslint:disable-line:max-line-length unified-signatures
125+
declare function filledarray( value: any, iterable: IterableIterator, dtype?: DataType ): ArrayOrTypedArray; // tslint:disable-line:max-line-length unified-signatures
130126

131127
/**
132128
* Returns a filled typed array view of an `ArrayBuffer`.
@@ -140,7 +136,6 @@ declare function filledarray( value: any, iterable: IterableIterator, dtype?: st
140136
* @param byteOffset - byte offset
141137
* @param length - view length
142138
* @param dtype - data type (default: 'float64')
143-
* @throws must provide a recognized data type
144139
* @returns filled array
145140
*
146141
* @example
@@ -157,7 +152,7 @@ declare function filledarray( value: any, iterable: IterableIterator, dtype?: st
157152
* var arr = filledarray( 1.0, buf, 8, 2, 'float32' );
158153
* // returns <Float32Array>[ 1.0, 1.0 ]
159154
*/
160-
declare function filledarray( value: any, buffer: ArrayBuffer, byteOffset: number, length: number, dtype?: string ): RealOrComplexTypedArray; // tslint:disable-line:max-line-length
155+
declare function filledarray( value: any, buffer: ArrayBuffer, byteOffset: number, length: number, dtype?: DataType ): RealOrComplexTypedArray; // tslint:disable-line:max-line-length
161156

162157
/**
163158
* Returns a filled typed array view of an `ArrayBuffer`.
@@ -170,7 +165,6 @@ declare function filledarray( value: any, buffer: ArrayBuffer, byteOffset: numbe
170165
* @param buffer - `ArrayBuffer`
171166
* @param byteOffset - byte offset
172167
* @param dtype - data type (default: 'float64')
173-
* @throws must provide a recognized data type
174168
* @returns filled array
175169
*
176170
* @example
@@ -187,7 +181,7 @@ declare function filledarray( value: any, buffer: ArrayBuffer, byteOffset: numbe
187181
* var arr = filledarray( 1.0, buf, 8, 'float32' );
188182
* // returns <Float32Array>[ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ]
189183
*/
190-
declare function filledarray( value: any, buffer: ArrayBuffer, byteOffset: number, dtype?: string ): RealOrComplexTypedArray; // tslint:disable-line:max-line-length
184+
declare function filledarray( value: any, buffer: ArrayBuffer, byteOffset: number, dtype?: DataType ): RealOrComplexTypedArray; // tslint:disable-line:max-line-length
191185

192186
/**
193187
* Returns a filled typed array view of an `ArrayBuffer`.
@@ -199,7 +193,6 @@ declare function filledarray( value: any, buffer: ArrayBuffer, byteOffset: numbe
199193
* @param value - fill value
200194
* @param buffer - `ArrayBuffer`
201195
* @param dtype - data type (default: 'float64')
202-
* @throws must provide a recognized data type
203196
* @returns filled array
204197
*
205198
* @example
@@ -216,7 +209,7 @@ declare function filledarray( value: any, buffer: ArrayBuffer, byteOffset: numbe
216209
* var arr = filledarray( 1.0, buf, 'float32' );
217210
* // returns <Float32Array>[ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ]
218211
*/
219-
declare function filledarray( value: any, buffer: ArrayBuffer, dtype?: string ): RealOrComplexTypedArray; // tslint:disable-line:max-line-length unified-signatures
212+
declare function filledarray( value: any, buffer: ArrayBuffer, dtype?: DataType ): RealOrComplexTypedArray; // tslint:disable-line:max-line-length unified-signatures
220213

221214

222215
// EXPORTS //

examples/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
'use strict';
2020

2121
var discreteUniform = require( '@stdlib/random-base-discrete-uniform' );
22-
var dtypes = require( '@stdlib/array-typed-dtypes' );
22+
var dtypes = require( '@stdlib/array-typed-real-dtypes' );
2323
var filledarray = require( './../lib' );
2424

2525
// Generate a random number:

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"@stdlib/array-int16": "^0.0.x",
6161
"@stdlib/array-int32": "^0.0.x",
6262
"@stdlib/array-int8": "^0.0.x",
63-
"@stdlib/array-typed-dtypes": "^0.0.x",
63+
"@stdlib/array-typed-real-dtypes": "^0.0.x",
6464
"@stdlib/array-uint16": "^0.0.x",
6565
"@stdlib/array-uint32": "^0.0.x",
6666
"@stdlib/array-uint8": "^0.0.x",

0 commit comments

Comments
 (0)