Skip to content

Commit e3db1cb

Browse files
committed
Auto-generated commit
1 parent ea44b41 commit e3db1cb

File tree

4 files changed

+24
-12
lines changed

4 files changed

+24
-12
lines changed

dist/index.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/main.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ var accessorSetter = require( '@stdlib/array-base-accessor-setter' );
2626
var getter = require( '@stdlib/array-base-getter' );
2727
var setter = require( '@stdlib/array-base-setter' );
2828
var numel = require( '@stdlib/ndarray-base-numel' );
29+
var getDType = require( '@stdlib/ndarray-base-dtype' );
30+
var getShape = require( '@stdlib/ndarray-base-shape' );
31+
var getStrides = require( '@stdlib/ndarray-base-strides' );
32+
var getOffset = require( '@stdlib/ndarray-base-offset' );
33+
var getOrder = require( '@stdlib/ndarray-base-order' );
34+
var getData = require( '@stdlib/ndarray-base-data-buffer' );
2935

3036

3137
// MAIN //
@@ -73,9 +79,9 @@ function ndarraylike2object( x ) {
7379
var sh;
7480
var dt;
7581

76-
xbuf = x.data;
77-
sh = x.shape;
78-
dt = x.dtype;
82+
xbuf = getData( x );
83+
sh = getShape( x );
84+
dt = getDType( x );
7985

8086
bool = isAccessorArray( xbuf );
8187

@@ -85,9 +91,9 @@ function ndarraylike2object( x ) {
8591
'data': xbuf,
8692
'length': numel( sh ),
8793
'shape': sh,
88-
'strides': x.strides,
89-
'offset': x.offset,
90-
'order': x.order,
94+
'strides': getStrides( x ),
95+
'offset': getOffset( x ),
96+
'order': getOrder( x ),
9197
'accessorProtocol': bool,
9298
'accessors': ( bool ) ?
9399
[ accessorGetter( dt ), accessorSetter( dt ) ] :

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,13 @@
4242
"@stdlib/array-base-assert-is-accessor-array": "^0.1.0",
4343
"@stdlib/array-base-getter": "^0.1.0",
4444
"@stdlib/array-base-setter": "^0.1.0",
45+
"@stdlib/ndarray-base-data-buffer": "github:stdlib-js/ndarray-base-data-buffer#main",
46+
"@stdlib/ndarray-base-dtype": "github:stdlib-js/ndarray-base-dtype#main",
4547
"@stdlib/ndarray-base-numel": "^0.1.1",
48+
"@stdlib/ndarray-base-offset": "github:stdlib-js/ndarray-base-offset#main",
49+
"@stdlib/ndarray-base-order": "github:stdlib-js/ndarray-base-order#main",
50+
"@stdlib/ndarray-base-shape": "github:stdlib-js/ndarray-base-shape#main",
51+
"@stdlib/ndarray-base-strides": "github:stdlib-js/ndarray-base-strides#main",
4652
"@stdlib/types": "^0.1.0"
4753
},
4854
"devDependencies": {

0 commit comments

Comments
 (0)