Skip to content

Commit 6c6b466

Browse files
committed
refactor: use base constructor
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 9889c81 commit 6c6b466

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
3434
var strides2order = require( '@stdlib/ndarray/base/strides2order' );
3535
var flattenShape = require( '@stdlib/ndarray/base/flatten-shape' );
3636
var assign = require( '@stdlib/ndarray/base/assign' );
37+
var ndarray = require( '@stdlib/ndarray/base/ctor' );
3738
var emptyLike = require( '@stdlib/ndarray/empty-like' );
38-
var ndarray = require( '@stdlib/ndarray/ctor' );
3939
var format = require( '@stdlib/string/format' );
4040

4141

@@ -349,7 +349,7 @@ function flatten( x, options ) {
349349

350350
// Create a view on top of the output ndarray having the same shape as the input ndarray:
351351
st = ( xsh.length > 0 ) ? shape2strides( xsh, opts.order ) : [ 0 ];
352-
view = ndarray( opts.dtype, getData( y ), xsh, st, 0, opts.order );
352+
view = new ndarray( opts.dtype, getData( y ), xsh, st, 0, opts.order );
353353

354354
// Copy elements to the output ndarray:
355355
assign( [ x, view ] );

0 commit comments

Comments
 (0)