Skip to content

Commit ed2d89f

Browse files
committed
refactor: use base assertion utility
--- 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent f84a4f9 commit ed2d89f

File tree

1 file changed

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

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ var strides2offset = require( '@stdlib/ndarray/base/strides2offset' );
3131
var strides2order = require( '@stdlib/ndarray/base/strides2order' );
3232
var numel = require( '@stdlib/ndarray/base/numel' );
3333
var ndarray = require( '@stdlib/ndarray/ctor' );
34+
var isColumnMajor = require( '@stdlib/ndarray/base/assert/is-column-major-string' );
3435
var isDataType = require( '@stdlib/ndarray/base/assert/is-data-type' );
3536
var isOrder = require( '@stdlib/ndarray/base/assert/is-order' );
3637
var isCastingMode = require( '@stdlib/ndarray/base/assert/is-casting-mode' );
@@ -321,7 +322,7 @@ function array() {
321322
}
322323
} else if ( buffer ) {
323324
if ( btype === 'generic' && opts.flatten && isArray( buffer ) ) {
324-
buffer = flatten( buffer, osh || arrayShape( buffer ), order === 'column-major' );
325+
buffer = flatten( buffer, osh || arrayShape( buffer ), isColumnMajor( order ) );
325326
}
326327
if ( buffer.length !== len ) {
327328
throw new RangeError( 'invalid arguments. Array shape is incompatible with provided data source. Number of data source elements does not match array shape.' );

0 commit comments

Comments
 (0)