Skip to content

Commit bbd8f0e

Browse files
committed
refactor: avoid unnecessary offset calculation
--- 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 8d3124d commit bbd8f0e

File tree

1 file changed

+1
-2
lines changed
  • lib/node_modules/@stdlib/ndarray/base/empty-like/lib

1 file changed

+1
-2
lines changed

lib/node_modules/@stdlib/ndarray/base/empty-like/lib/main.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
// MODULES //
2222

2323
var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
24-
var strides2offset = require( '@stdlib/ndarray/base/strides2offset' );
2524
var resolveStr = require( '@stdlib/ndarray/base/dtype-resolve-str' );
2625
var numel = require( '@stdlib/ndarray/base/numel' );
2726
var getDType = require( '@stdlib/ndarray/base/dtype' );
@@ -89,7 +88,7 @@ function emptyLike( x ) {
8988
}
9089
// FIXME: add support for struct dtypes. Will need to do something similar to `array/empty` in so far as allocating an uninitialized array buffer, performing byte alignment, and creating a StructArray view atop the buffer.
9190

92-
return new x.constructor( dt, buf, sh, st, strides2offset( sh, st ), ord );
91+
return new x.constructor( dt, buf, sh, st, 0, ord );
9392
}
9493

9594

0 commit comments

Comments
 (0)