Skip to content

Commit 375b190

Browse files
authored
docs: document dtype option
Signed-off-by: Athan <[email protected]>
1 parent c860aae commit 375b190

File tree

1 file changed

+3
-2
lines changed
  • lib/node_modules/@stdlib/ndarray/flatten/lib

1 file changed

+3
-2
lines changed

lib/node_modules/@stdlib/ndarray/flatten/lib/main.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ var COL_MAJOR = 'column-major';
5454
* @param {Options} [options] - function options
5555
* @param {NonNegativeInteger} [options.depth] - maximum number of dimensions to flatten
5656
* @param {string} [options.order='row-major'] - order in which input ndarray elements should be flattened
57+
* @param {*} [options.dtype] - output ndarray data type
5758
* @throws {TypeError} first argument must be an ndarray-like object
5859
* @throws {TypeError} options argument must be an object
5960
* @throws {TypeError} must provide valid options
@@ -296,8 +297,8 @@ function flatten( x, options ) {
296297

297298
// Define default options:
298299
opts = {
299-
'depth': xsh.length, // by default, flatten to a one-dimensional ndarray
300-
'order': ROW_MAJOR, // by default, flatten in lexicographic order (i.e., trailing dimensions first; e.g., if `x` is a matrix, flatten row-by-row)
300+
'depth': xsh.length, // by default, flatten to a one-dimensional ndarray
301+
'order': ROW_MAJOR, // by default, flatten in lexicographic order (i.e., trailing dimensions first; e.g., if `x` is a matrix, flatten row-by-row)
301302
'dtype': getDType( x )
302303
};
303304

0 commit comments

Comments
 (0)