Skip to content

Commit

Permalink
refactor: use accessor utilities
Browse files Browse the repository at this point in the history
  • Loading branch information
kgryte committed Oct 8, 2023
1 parent 43bd26c commit 9e143f8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/node_modules/@stdlib/ndarray/base/empty-like/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
var strides2offset = require( '@stdlib/ndarray/base/strides2offset' );
var numel = require( '@stdlib/ndarray/base/numel' );
var getDType = require( '@stdlib/ndarray/base/dtype' );
var getShape = require( '@stdlib/ndarray/base/shape' );
var getOrder = require( '@stdlib/ndarray/base/order' );
var emptyArray = require( '@stdlib/array/empty' );
var allocUnsafe = require( '@stdlib/buffer/alloc-unsafe' );

Expand Down Expand Up @@ -60,9 +63,9 @@ function emptyLike( x ) {
var st;
var dt;

dt = x.dtype;
sh = x.shape;
ord = x.order;
dt = getDType( x );
sh = getShape( x );
ord = getOrder( x );

ndims = sh.length;
if ( ndims > 0 ) {
Expand Down

1 comment on commit 9e143f8

@stdlib-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage Report

Package Statements Branches Functions Lines
ndarray/base/broadcast-array $\color{green}211/211$
$\color{green}+100.00\%$
$\color{green}17/17$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}211/211$
$\color{green}+100.00\%$
ndarray/base/empty-like $\color{green}140/140$
$\color{green}+100.00\%$
$\color{green}9/9$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}140/140$
$\color{green}+100.00\%$

The above coverage report was generated for the changes in this push.

Please sign in to comment.