From 2760136ee774da9f894eddf32cc301128632eb51 Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Fri, 13 Oct 2023 03:15:18 +0000 Subject: [PATCH] Auto-generated commit --- array/package.json | 3 +- base/slice-dimension/README.md | 2 +- base/slice-dimension/docs/types/index.d.ts | 4 +- base/slice-dimension/docs/types/test.ts | 14 +- broadcast-array/package.json | 4 +- dist/index.js | 2 +- dist/index.js.map | 8 +- empty-like/package.json | 3 +- empty/package.json | 3 +- lib/index.js | 9 + slice-dimension/README.md | 238 ++++ slice-dimension/benchmark/benchmark.js | 1047 +++++++++++++++++ slice-dimension/docs/repl.txt | 51 + slice-dimension/docs/types/index.d.ts | 604 ++++++++++ slice-dimension/docs/types/test.ts | 170 +++ slice-dimension/examples/index.js | 85 ++ slice-dimension/lib/index.js | 66 ++ slice-dimension/lib/main.js | 125 ++ slice-dimension/package.json | 65 ++ slice-dimension/test/test.js | 1218 ++++++++++++++++++++ zeros-like/package.json | 3 +- zeros/package.json | 3 +- 22 files changed, 3706 insertions(+), 21 deletions(-) create mode 100644 slice-dimension/README.md create mode 100644 slice-dimension/benchmark/benchmark.js create mode 100644 slice-dimension/docs/repl.txt create mode 100644 slice-dimension/docs/types/index.d.ts create mode 100644 slice-dimension/docs/types/test.ts create mode 100644 slice-dimension/examples/index.js create mode 100644 slice-dimension/lib/index.js create mode 100644 slice-dimension/lib/main.js create mode 100644 slice-dimension/package.json create mode 100644 slice-dimension/test/test.js diff --git a/array/package.json b/array/package.json index 60eaeec2..01236820 100644 --- a/array/package.json +++ b/array/package.json @@ -61,7 +61,8 @@ "multidimensional", "dimensions", "dims", - "numpy.array" + "numpy.array", + "numpy.asarray" ], "__stdlib__": {} } diff --git a/base/slice-dimension/README.md b/base/slice-dimension/README.md index b94787a3..bd581ddf 100644 --- a/base/slice-dimension/README.md +++ b/base/slice-dimension/README.md @@ -18,7 +18,7 @@ limitations under the License. --> -# slice +# sliceDimension > Return a view of an input ndarray when sliced along a specified dimension. diff --git a/base/slice-dimension/docs/types/index.d.ts b/base/slice-dimension/docs/types/index.d.ts index b2a387b3..80d4f250 100644 --- a/base/slice-dimension/docs/types/index.d.ts +++ b/base/slice-dimension/docs/types/index.d.ts @@ -447,7 +447,7 @@ declare function sliceDimension( x: uint8cndarray, dim: number, s: Slice | numbe * // returns [ 3, 2 ] * * var s = new Slice( null, null, -1 ); -* // returns +* // returns * * var y = sliceDimension( x, 0, s, false, false ); * // returns @@ -485,7 +485,7 @@ declare function sliceDimension( x: complex128ndarray, dim: number, s: Slice | n * // returns [ 3, 2 ] * * var s = new Slice( null, null, -1 ); -* // returns +* // returns * * var y = sliceDimension( x, 0, s, false, false ); * // returns diff --git a/base/slice-dimension/docs/types/test.ts b/base/slice-dimension/docs/types/test.ts index 8d4c9bb9..f93d618b 100644 --- a/base/slice-dimension/docs/types/test.ts +++ b/base/slice-dimension/docs/types/test.ts @@ -129,13 +129,13 @@ import sliceDimension = require( './index' ); const x = empty( 'float64', [ 2, 2 ], 'row-major' ); const s = new Slice( null ); - sliceDimension( x, s, '5', false ); // $ExpectError - sliceDimension( x, s, 5, false ); // $ExpectError - sliceDimension( x, s, null, false ); // $ExpectError - sliceDimension( x, s, undefined, false ); // $ExpectError - sliceDimension( x, s, [ '5' ], false ); // $ExpectError - sliceDimension( x, s, {}, false ); // $ExpectError - sliceDimension( x, s, ( x: number ): number => x, false ); // $ExpectError + sliceDimension( x, 1, s, '5', false ); // $ExpectError + sliceDimension( x, 1, s, 5, false ); // $ExpectError + sliceDimension( x, 1, s, null, false ); // $ExpectError + sliceDimension( x, 1, s, undefined, false ); // $ExpectError + sliceDimension( x, 1, s, [ '5' ], false ); // $ExpectError + sliceDimension( x, 1, s, {}, false ); // $ExpectError + sliceDimension( x, 1, s, ( x: number ): number => x, false ); // $ExpectError } // The compiler throws an error if the function is provided a fifth argument which is not a boolean... diff --git a/broadcast-array/package.json b/broadcast-array/package.json index de184145..2c381deb 100644 --- a/broadcast-array/package.json +++ b/broadcast-array/package.json @@ -61,7 +61,9 @@ "utilities", "utility", "utils", - "util" + "util", + "broadcast_to", + "numpy.broadcast_to" ], "__stdlib__": {} } diff --git a/dist/index.js b/dist/index.js index 64cf69b2..8a824e04 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,4 +1,4 @@ -"use strict";var I=function(r,e){return function(){return e||r((e={exports:{}}).exports,e),e.exports}};var Ot=I(function(E9,Et){"use strict";function T3(r){var e,a,i,v;for(e=r.length,a=[],v=0;v=0;v--)a[v]=i,i*=r[v];return a}function I3(r){var e,a,i;for(e=[],a=1,i=0;i=0;v--)e[v]=i,i*=r[v];return e}function N3(r,e){var a,i;for(a=1,i=0;iv&&(i=!1),i||e)v=t;else return 0;return i&&e?3:i?1:2}Lt.exports=V3});var Ee=I(function(N9,Vt){"use strict";var P3=zt();Vt.exports=P3});var Mt=I(function(R9,Pt){"use strict";function M3(r){var e,a,i;if(e=r.length,e===0)return 0;for(a=1,i=0;i0?t+=s*(r[o]-1):s<0&&(v+=s*(r[o]-1))}return[v,t]}lv.exports=fh});var pv=I(function(X9,yv){"use strict";function dh(r,e,a,i){var v,t,s,o,u;for(v=r.length,t=a,s=a,u=0;u0?s+=o*(r[u]-1):o<0&&(t+=o*(r[u]-1))}return i[0]=t,i[1]=s,i}yv.exports=dh});var me=I(function(W9,qv){"use strict";var lh=require("@stdlib/utils/define-nonenumerable-read-only-property"),mv=cv(),ch=pv();lh(mv,"assign",ch);qv.exports=mv});var xv=I(function(Q9,gv){"use strict";var yh=me();function ph(r,e,a,i){var v=yh(e,a,i);return v[0]>=0&&v[1]=0;s--)t=r%a[s],r-=t,r/=a[s],v+=t*e[s];return this._accessors?this._buffer.get(v):this._buffer[v]}Lv.exports=Th});var Pv=I(function(uM,Vv){"use strict";function Ih(r,e){var a,i,v,t,s,o;if(v=this._ndims,v===0)return this._accessors?this._buffer.set(r,this._offset):this._buffer[this._offset]=r,this;if(this._flags.ROW_MAJOR_CONTIGUOUS||this._flags.COLUMN_MAJOR_CONTIGUOUS){if(this._iterationOrder===1)return this._accessors?this._buffer.set(e,this._offset+r):this._buffer[this._offset+r]=e,this;if(this._iterationOrder===-1)return this._accessors?this._buffer.set(e,this._offset-r):this._buffer[this._offset-r]=e,this}if(i=this._shape,a=this._strides,t=this._offset,this._order==="column-major"){for(o=0;o=0;o--)s=r%i[o],r-=s,r/=i[o],t+=s*a[o];return this._accessors?this._buffer.set(e,t):this._buffer[t]=e,this}Vv.exports=Ih});var Bv=I(function(fM,Mv){"use strict";function kh(){var r,e;for(r=this._offset,e=0;e=0;s--)t=this.iget(this._length-1-s),r+=vi(t)+", "+si(t),s>0&&(r+=", ");else for(s=2;s>=0;s--)r+=this.iget(this._length-1-s),s>0&&(r+=", ")}if(a=Lh[this.dtype],i+=Ch(a,"{{data}}",r),i+=", ",e===0?i+="[]":i+="[ "+this._shape.join(", ")+" ]",i+=", ",i+="[ ",e===0)i+="0";else for(s=0;se?e:r}ps.exports=A4});var ui=I(function(EM,qs){"use strict";var N4=ms();qs.exports=N4});var xs=I(function(OM,gs){"use strict";function R4(r,e){var a=e+1;return r<0?(r+=a,r<0&&(r%=a,r!==0&&(r+=a)),r):(r>e&&(r-=a,r>e&&(r%=a)),r)}gs.exports=R4});var fi=I(function(TM,hs){"use strict";var D4=xs();hs.exports=D4});var Ss=I(function(IM,bs){"use strict";var C4=ui(),L4=fi(),z4=require("@stdlib/string/format");function V4(r,e,a){if(a==="clamp")return C4(r,e);if(a==="wrap")return L4(r,e);if(r<0||r>e)throw new RangeError(z4("invalid argument. Index must be on the interval: [0, %d]. Value: `%d`.",e,r));return r}bs.exports=V4});var Le=I(function(kM,ws){"use strict";var P4=Ss();ws.exports=P4});var Es=I(function(AM,_s){"use strict";var M4=require("@stdlib/assert/is-integer").isPrimitive,B4=Le(),U4=ve(),F4=require("@stdlib/string/format"),js=U4.prototype.iget;function Y4(r){if(this._ndims>0){if(!M4(r))throw new TypeError(F4("invalid argument. Index must be an integer. Value: `%s`.",r));return r=B4(r,this._length-1,this._mode),js.call(this,r)}return js.call(this)}_s.exports=Y4});var Is=I(function(NM,Ts){"use strict";var K4=require("@stdlib/assert/is-integer").isPrimitive,G4=Le(),J4=ve(),Z4=require("@stdlib/string/format"),Os=J4.prototype.iset;function X4(r,e){if(this._flags.READONLY)throw new Error("invalid invocation. Cannot write to a read-only array.");if(this._ndims>0){if(!K4(r))throw new TypeError(Z4("invalid argument. Index must be an integer. Value: `%s`.",r));r=G4(r,this._length-1,this._mode),Os.call(this,r,e)}else Os.call(this,r);return this}Ts.exports=X4});var Ns=I(function(RM,As){"use strict";var W4=require("@stdlib/assert/is-integer").isPrimitive,Q4=Le(),ks=require("@stdlib/string/format");function H4(){var r,e,a,i;if(arguments.length!==this._ndims)throw new RangeError(ks("invalid arguments. Number of indices must match the number of dimensions. ndims: `%u`. nargs: `%u`.",this._ndims,arguments.length));for(r=this._offset,a=this._submode.length,i=0;i0))throw new TypeError(se("invalid argument. Third argument must be an array-like object containing nonnegative integers. Value: `%s`.",a));if(o=a.length,o>Zs)throw new RangeError(se("invalid argument. Number of dimensions must not exceed %u due to stack limits. Value: `%u`.",Zs,o));if(!cb(i))throw new TypeError(se("invalid argument. Fourth argument must be an array-like object containing integers. Value: `%s`.",i));if(o>0){if(i.length!==o)throw new RangeError(se("invalid argument. Fourth argument length must match the number of dimensions. Expected number of dimensions: `%u`. Strides length: `%u`.",o,i.length))}else{if(i.length!==1)throw new RangeError("invalid argument. Fourth argument length must be equal to 1 when creating a zero-dimensional ndarray.");if(i[0]!==0)throw new RangeError(se("invalid argument. Fourth argument must contain a single element equal to 0. Value: `%d`.",i[0]))}if(!lb(v))throw new TypeError(se("invalid argument. Fifth argument must be a nonnegative integer. Value: `%s`.",v));if(!yb(t))throw new TypeError(se("invalid argument. Sixth argument must be a supported order. Value: `%s`.",t));if(o>0&&!mb(e.length,a,i,v)&&qb(a)>0)throw new Error("invalid arguments. Input buffer is incompatible with the specified meta data. Ensure that the offset is valid with regard to the strides array and that the buffer has enough elements to satisfy the desired array shape.");if(u={},u.mode=_b,u.readonly=Eb,arguments.length>6&&(f=jb(u,s),f))throw f;return this._mode=u.mode,u.submode===void 0&&(u.submode=[this._mode]),this._submode=u.submode,n=Js(a,o),d=Js(i,o||1),Xs.call(this,r,e,n,d,v,t),this._flags.READONLY=u.readonly,this}xb(oe,Xs);Qe(oe,"name","ndarray");Qe(oe.prototype,"get",Sb);Qe(oe.prototype,"iget",hb);Qe(oe.prototype,"set",wb);Qe(oe.prototype,"iset",bb);Ws.exports=oe});var ne=I(function(MM,Hs){"use strict";var Ob=Qs();Hs.exports=Ob});var $s=I(function(BM,Tb){Tb.exports=["none","equiv","safe","same-kind","unsafe"]});var eo=I(function(UM,ro){"use strict";var Ib=$s();function kb(){return Ib.slice()}ro.exports=kb});var io=I(function(FM,ao){"use strict";function Ab(){return{none:0,equiv:1,safe:2,"same-kind":3,unsafe:4}}ao.exports=Ab});var li=I(function(YM,vo){"use strict";var Nb=require("@stdlib/utils/define-nonenumerable-read-only-property"),to=eo(),Rb=io();Nb(to,"enum",Rb);vo.exports=to});var no=I(function(KM,oo){"use strict";var Db=li(),so=Db(),Cb=so.length;function Lb(r){var e;for(e=0;e0}_o.exports=s6});var $e=I(function(iB,Oo){"use strict";var o6=Eo();Oo.exports=o6});var To=I(function(tB,n6){n6.exports={float64:{float64:1,float32:1,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,binary:0,generic:1},float32:{float64:1,float32:1,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,binary:0,generic:1},int32:{float64:1,float32:0,int32:1,int16:1,int8:1,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,binary:0,generic:1},int16:{float64:1,float32:1,int32:1,int16:1,int8:1,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,binary:0,generic:1},int8:{float64:1,float32:1,int32:1,int16:1,int8:1,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,binary:0,generic:1},uint32:{float64:1,float32:0,int32:0,int16:0,int8:0,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:0,binary:0,generic:1},uint16:{float64:1,float32:1,int32:1,int16:0,int8:0,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,binary:0,generic:1},uint8:{float64:1,float32:1,int32:1,int16:1,int8:0,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,binary:0,generic:1},uint8c:{float64:1,float32:1,int32:1,int16:1,int8:0,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,binary:0,generic:1},complex128:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,binary:0,generic:0},complex64:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,binary:0,generic:0},generic:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,binary:0,generic:1},binary:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,binary:1,generic:0}}});var Ao=I(function(vB,ko){"use strict";var Io=require("@stdlib/utils/keys"),u6=require("@stdlib/assert/has-own-property"),f6=ue(),Sa=To(),ba;function d6(){var r,e,a,i,v,t,s,o,u;for(a={},r=Io(Sa),e=r.length,u=0;u0}Ro.exports=q6});var wa=I(function(nB,Co){"use strict";var g6=Do();Co.exports=g6});var zo=I(function(uB,Lo){"use strict";var x6=$e(),h6=wa();function b6(r,e,a){return a==="unsafe"||r===e?!0:a==="none"||a==="equiv"?!1:a==="safe"?x6(r,e):h6(r,e)}Lo.exports=b6});var mi=I(function(fB,Vo){"use strict";var S6=zo();Vo.exports=S6});var Mo=I(function(dB,Po){"use strict";var w6=require("@stdlib/buffer/ctor"),j6=require("@stdlib/array/float64"),_6=require("@stdlib/array/float32"),E6=require("@stdlib/array/int16"),O6=require("@stdlib/array/int32"),T6=require("@stdlib/array/int8"),I6=require("@stdlib/array/uint16"),k6=require("@stdlib/array/uint32"),A6=require("@stdlib/array/uint8"),N6=require("@stdlib/array/uint8c"),R6=require("@stdlib/array/complex64"),D6=require("@stdlib/array/complex128"),C6={binary:w6,float64:j6,float32:_6,generic:Array,int16:E6,int32:O6,int8:T6,uint16:I6,uint32:k6,uint8:A6,uint8c:N6,complex64:R6,complex128:D6};Po.exports=C6});var Uo=I(function(lB,Bo){"use strict";var L6=Mo();function z6(r){return L6[r]||null}Bo.exports=z6});var ra=I(function(cB,Fo){"use strict";var V6=Uo();Fo.exports=V6});var Ko=I(function(yB,Yo){"use strict";function P6(r){var e;for(e=0;e=0&&r.length=RS(e)}eu.exports=DS});var tu=I(function(KB,iu){"use strict";var CS=au();iu.exports=CS});var ou=I(function(GB,su){"use strict";var vu=require("@stdlib/math/base/special/abs");function LS(r){var e,a,i,v;if(e=r.length,e===0)return!1;for(a=vu(r[0]),v=1;va)return!1;a=i}return!0}Uu.exports=ww});var _i=I(function(pU,Yu){"use strict";var jw=Fu();Yu.exports=jw});var Gu=I(function(mU,Ku){"use strict";var _w=ia(),Ew=de(),Ow=_i();function Tw(r,e,a){return Ew(e)!==0&&Ow(e)&&_w(r,e,a)}Ku.exports=Tw});var Zu=I(function(qU,Ju){"use strict";var Iw=Gu();Ju.exports=Iw});var Wu=I(function(gU,Xu){"use strict";var kw=require("@stdlib/array/base/assert/contains").factory,Aw=Fr(),Nw=kw(Aw("signed_integer"));Xu.exports=Nw});var Ia=I(function(xU,Qu){"use strict";var Rw=Wu();Qu.exports=Rw});var $u=I(function(hU,Hu){"use strict";var Dw=require("@stdlib/array/base/assert/contains").factory,Cw=Fr(),Lw=Dw(Cw("unsigned_integer"));Hu.exports=Lw});var ka=I(function(bU,rf){"use strict";var zw=$u();rf.exports=zw});var af=I(function(SU,ef){"use strict";var Vr=require("@stdlib/utils/define-read-only-property"),zr={};Vr(zr,"isAllowedDataTypeCast",mi());Vr(zr,"isBufferLengthCompatible",ti());Vr(zr,"isBufferLengthCompatibleShape",tu());Vr(zr,"isCastingMode",ci());Vr(zr,"isColumnMajor",bi());Vr(zr,"isColumnMajorContiguous",pu());Vr(zr,"isComplexFloatingPointDataType",ta());Vr(zr,"isContiguous",Su());Vr(zr,"isDataType",Ce());Vr(zr,"isFloatingPointDataType",va());Vr(zr,"isIndexMode",We());Vr(zr,"isIntegerDataType",Si());Vr(zr,"isNumericDataType",wi());Vr(zr,"isOrder",$r());Vr(zr,"isReadOnly",he());Vr(zr,"isRealDataType",Ta());Vr(zr,"isRealFloatingPointDataType",ji());Vr(zr,"isRowMajor",_i());Vr(zr,"isRowMajorContiguous",Zu());Vr(zr,"isSafeDataTypeCast",$e());Vr(zr,"isSameKindDataTypeCast",wa());Vr(zr,"isSignedIntegerDataType",Ia());Vr(zr,"isSingleSegmentCompatible",ia());Vr(zr,"isUnsignedIntegerDataType",ka());ef.exports=zr});var vf=I(function(wU,tf){"use strict";function Vw(r,e){var a,i,v,t,s,o,u,f,n,d;for(v=1,t=1,d=1;d=0&&(n=r[s],i=n<0?-n:n,!(i<=a));)r[s+1]=n,e[o+1]=e[o],s-=1,o-=1;r[s+1]=u,e[o+1]=f,v+=1,t+=1}}tf.exports=Vw});var nf=I(function(jU,of){"use strict";var Pw=require("@stdlib/array/base/zero-to"),Mw=require("@stdlib/array/base/copy-indexed"),Aa=require("@stdlib/array/base/take"),Bw=require("@stdlib/array/base/filled"),Ei=Ee(),Uw=vf(),sf=3;function Fw(r,e,a,i){var v,t,s,o,u,f,n,d,y,q;if(v=Pw(r.length),f=Ei(e),n=Ei(a),d=Ei(i),t=Bw([],4),t[f].push(e),t[n].push(a),t[d].push(i),s=t[0].length,s===sf)u=e;else if(s===sf-1){for(y=1;y<4;y++)if(t[y].length){u=t[y][0];break}}else{for(q=0,y=1;y<4;y++)o=t[y].length,o>=s&&(s=o,q=y);u=t[q][0]}return u=Mw(u),Uw(u,v),r=Aa(r,v),e=e===u?u:Aa(e,v),a=a===u?u:Aa(a,v),i=i===u?u:Aa(i,v),{sh:r,sx:e,sy:a,sz:i}}of.exports=Fw});var ff=I(function(_U,uf){"use strict";var Yw=nf();uf.exports=Yw});var lf=I(function(EU,df){"use strict";var Kw={BLOCK_SIZE_IN_BYTES:64,BLOCK_SIZE_IN_ELEMENTS:8};df.exports=Kw});var yf=I(function(OU,cf){"use strict";var Oi=qe(),Na=lf();function Gw(r,e,a){var i,v,t;return i=Oi(r),v=Oi(e),t=Oi(a),i===null||v===null||t===null?Na.BLOCK_SIZE_IN_ELEMENTS:i>v&&i>t?Na.BLOCK_SIZE_IN_BYTES/i|0:v>t?Na.BLOCK_SIZE_IN_BYTES/v|0:Na.BLOCK_SIZE_IN_BYTES/t|0}cf.exports=Gw});var mf=I(function(TU,pf){"use strict";var Jw=yf();pf.exports=Jw});var xf=I(function(IU,gf){"use strict";var Zw=require("@stdlib/string/format"),Ra=require("@stdlib/math/base/special/trunc"),qf=require("@stdlib/math/base/special/abs");function Xw(r,e,a,i,v,t){var s,o,u,f,n,d;for(s=r.length,o=1,d=0;d=o&&(v=o-1);else if(t==="wrap")v<0?(v+=o,v<0&&(v%=o,v!==0&&(v+=o))):v>=o&&(v-=o,v>=o&&(v%=o));else if(v<0||v>=o)throw new RangeError(Zw("invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.",o,v));if(u=0,i==="column-major"){for(d=s-1;d>=0;d--)n=e[d],n<0?(f=Ra(v/n),v-=f*n,f+=r[d]-1):(f=Ra(v/n),v-=f*n),u+=f*qf(n);return u}for(d=0;d=0;f--)if(n=o-s+f,!(n<0)){if(u=v[n],i=e[f],i!==0&&if&&(f=e[n]);for(n=0;n=0;){for(t=e[0]-f+n,t>=0?i=v[t]:i=1,d=1;d=0?o=r[d][s]:o=1,i===1){i=o;continue}if(!(o===1||i===o))return null}a[n]=i,n-=1}return a}Zf.exports=D8});var Qf=I(function(ZU,Wf){"use strict";var C8=Xf();Wf.exports=C8});var $f=I(function(XU,Hf){"use strict";var L8=He(),z8=ja();function V8(r){var e=z8(r);return e?L8(e):null}Hf.exports=V8});var ed=I(function(WU,rd){"use strict";var P8=$f();rd.exports=P8});var id=I(function(QU,ad){"use strict";function M8(){return{binary:"r",bool:"x",complex64:"c",complex128:"z",float16:"h",bfloat16:"e",float32:"f",float64:"d",float128:"g",generic:"o",int8:"s",int16:"k",int32:"i",int64:"l",int128:"m",int256:"n",uint8:"b",uint8c:"a",uint16:"t",uint32:"u",uint64:"v",uint128:"w",uint256:"y"}}ad.exports=M8});var sd=I(function(HU,vd){"use strict";var B8=ue(),td=id(),Ii;function U8(r){return arguments.length===0?td():(Ii===void 0&&(Ii=td()),Ii[B8(r)]||null)}vd.exports=U8});var ki=I(function($U,od){"use strict";var F8=sd();od.exports=F8});var dd=I(function(rF,fd){"use strict";var nd=require("@stdlib/utils/object-inverse"),ud=ki(),Ai;function Y8(r){return arguments.length===0?nd(ud()):(Ai===void 0&&(Ai=nd(ud())),Ai[r]||null)}fd.exports=Y8});var cd=I(function(eF,ld){"use strict";var K8=dd();ld.exports=K8});var pd=I(function(aF,yd){"use strict";function G8(){return{binary:"byte",bool:"boolean",complex64:"single-precision floating-point complex number",complex128:"double-precision floating-point complex number",float16:"half-precision floating-point number",bfloat16:"brain floating-point number",float32:"single-precision floating-point number",float64:"double-precision floating-point number",float128:"quadruple-precision floating-point number",generic:"generic array value",int8:"signed 8-bit integer",int16:"signed 16-bit integer",int32:"signed 32-bit integer",int64:"signed 64-bit integer",int128:"signed 128-bit integer",int256:"signed 256-bit integer",uint8:"unsigned 8-bit integer",uint8c:"unsigned 8-bit integer (clamped)",uint16:"unsigned 16-bit integer",uint32:"unsigned 32-bit integer",uint64:"unsigned 64-bit integer",uint128:"unsigned 128-bit integer",uint256:"unsigned 256-bit integer"}}yd.exports=G8});var gd=I(function(iF,qd){"use strict";var J8=ue(),md=pd(),Ni;function Z8(r){return arguments.length===0?md():(Ni===void 0&&(Ni=md()),Ni[J8(r)]||null)}qd.exports=Z8});var hd=I(function(tF,xd){"use strict";var X8=gd();xd.exports=X8});var Sd=I(function(vF,bd){"use strict";var W8=ga(),Q8=He();function H8(r){var e=typeof r;return e==="number"?W8(r)?r:null:e==="string"?Q8(r):null}bd.exports=H8});var Ri=I(function(sF,wd){"use strict";var $8=Sd();wd.exports=$8});var jd=I(function(oF,rj){rj.exports={binary:null,bool:"bool",complex64:"stdlib_complex64_t",complex128:"stdlib_complex128_t",float16:null,bfloat16:null,float32:"float",float64:"double",float128:null,generic:null,int8:"int8_t",int16:"int16_t",int32:"int32_t",int64:"int64_t",int128:null,int256:null,uint8:"uint8_t",uint8c:null,uint16:"uint16_t",uint32:"uint32_t",uint64:"uint64_t",uint128:null,uint256:null}});var Ed=I(function(nF,_d){"use strict";var ej=ue(),aj=jd();function ij(r){return aj[ej(r)]||null}_d.exports=ij});var Td=I(function(uF,Od){"use strict";var tj=Ed();Od.exports=tj});var Ad=I(function(fF,kd){"use strict";var vj=require("@stdlib/assert/is-array-like-object"),Id=require("@stdlib/assert/is-nonnegative-integer").isPrimitive,sj=ue(),Di=require("@stdlib/string/format");function oj(r,e,a){var i,v,t,s,o,u,f,n;if(!vj(r))throw new TypeError(Di("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(!Id(e))throw new TypeError(Di("invalid argument. Second argument must be a nonnegative integer. Value: `%s`.",e));if(!Id(a))throw new TypeError(Di("invalid argument. Third argument must be a nonnegative integer. Value: `%s`.",a));if(i=r.length,i===0)throw new RangeError("invalid argument. First argument must contain at least one element.");if(o=e+a,i%o!==0)throw new RangeError("invalid arguments. Length of the first argument is incompatible with the second and third arguments.");for(v=[],t=[],u=2*o,n=2*e,f=0;f<=u;f++)f===0?f===n?t.push("() => ("):t.push("("):f===u?f===n?t.push(") => ()"):t.push(")"):f===n?t.push(") => ("):f%2===1?t.push(""):t.push(", ");for(f=0;f0?(t=lj(e),s=uj(e,a)):(t=1,s=[0]),r==="binary"?v=yj(t):v=cj(t,r),new dj(r,v,e,s,fj(e,s),a)}Rd.exports=pj});var Ld=I(function(cF,Cd){"use strict";var mj=Dd();Cd.exports=mj});var Vd=I(function(yF,zd){"use strict";var qj=Yr(),gj=Gr(),xj=Cr(),hj=Jr(),bj=Kr(),Sj=Xr(),wj=require("@stdlib/array/empty"),jj=require("@stdlib/buffer/alloc-unsafe");function _j(r){var e,a,i,v,t,s,o;return o=hj(r),t=bj(r,!0),v=Sj(r),e=t.length,e>0?(a=xj(t),s=qj(t,v)):(a=1,s=[0]),o==="binary"?i=jj(a):i=wj(a,o),new r.constructor(o,i,t,s,gj(t,s),v)}zd.exports=_j});var Md=I(function(pF,Pd){"use strict";var Ej=Vd();Pd.exports=Ej});var Gd=I(function(mF,Kd){"use strict";var Oj=he(),Bd=Jr(),Tj=Kr(),Ij=te(),Ud=fe(),kj=Xr(),Fd=ce(),Yd=require("@stdlib/string/format");function Aj(r,e){var a,i,v,t,s,o,u;if(t=Tj(r,!1),s=Ij(r,!1),v=kj(r),o=t.length,a=[],i=[],e<0){if(e<-o-1)throw new RangeError(Yd("invalid argument. Specified axis is out-of-bounds. Must be on the interval: [-%u-1, %u]. Value: `%d`.",o,o,e));e+=o+1}else if(e>o)throw new RangeError(Yd("invalid argument. Specified axis is out-of-bounds. Must be on the interval: [-%u-1, %u]. Value: `%d`.",o,o,e));if(e===0)for(i.push(1),a.push(s[0]),u=0;u=u&&(v=u-1);else if(t==="wrap")v<0?(v+=u,v<0&&(v%=u,v!==0&&(v+=u))):v>=u&&(v-=u,v>=u&&(v%=u));else if(v<0||v>=u)throw new RangeError(Bj("invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.",u,v));if(a===0){if(i==="column-major"){for(d=0;d=0;d--)n=v%r[d],v-=n,v/=r[d],s[d]=n;return s}if(i==="column-major"){for(d=o-1;d>=0;d--)n=e[d],n<0?(f=Ca(v/n),v-=f*n,s[d]=r[d]-1+f):(f=Ca(v/n),v-=f*n,s[d]=f);return s}for(d=0;d0&&(v+=e[t]*(r[t]-1))}return v}t0.exports=Jj});var o0=I(function(jF,s0){"use strict";var Zj=v0();s0.exports=Zj});var f0=I(function(_F,u0){"use strict";var n0=Da(),Xj=Kr();function Wj(r,e){var a,i,v;if(i=e.length,a=Xj(r,!1),a.length===i){for(v=0;vi;t--)v[t]=a[t];for(t=i;t>=0&&(s=(a[t]+1)%e[t],v[t]=s,!(s>0));t--);for(t-=1;t>=0;t--)v[t]=a[t];return v}function S_(r,e,a,i,v){var t,s;for(t=0;t0));t++);for(t+=1;t=t)return null;return e===h_?b_(t,r,a,i,v):S_(t,r,a,i,v)}O0.exports=w_});var I0=I(function(LF,T0){"use strict";var j_=require("@stdlib/array/base/zeros"),__=Pi();function E_(r,e,a,i){return __(r,e,a,i,j_(r.length))}T0.exports=E_});var Ae=I(function(zF,A0){"use strict";var O_=require("@stdlib/utils/define-nonenumerable-read-only-property"),k0=I0(),T_=Pi();O_(k0,"assign",T_);A0.exports=k0});var R0=I(function(VF,N0){"use strict";function I_(r){var e,a;for(e=0,a=0;a=0&&(n=r[s],i=n<0?-n:n,!(i<=a));)r[s+1]=n,e[o+1]=e[o],s-=1,o-=1;r[s+1]=u,e[o+1]=f,v+=1,t+=1}}L0.exports=A_});var P0=I(function(BF,V0){"use strict";var N_=require("@stdlib/array/base/zero-to"),R_=require("@stdlib/array/base/copy-indexed"),D_=require("@stdlib/array/base/take"),C_=z0();function L_(r,e){var a;return a=N_(r.length),e=R_(e),C_(e,a),r=D_(r,a),{sh:r,sx:e}}V0.exports=L_});var Mr=I(function(UF,M0){"use strict";var z_=P0();M0.exports=z_});var U0=I(function(FF,B0){"use strict";var V_={BLOCK_SIZE_IN_BYTES:64,BLOCK_SIZE_IN_ELEMENTS:8};B0.exports=V_});var K0=I(function(YF,Y0){"use strict";var P_=qe(),F0=U0();function M_(r){var e=P_(r);return e===null?F0.BLOCK_SIZE_IN_ELEMENTS:F0.BLOCK_SIZE_IN_BYTES/e|0}Y0.exports=M_});var Br=I(function(KF,G0){"use strict";var B_=K0();G0.exports=B_});var Z0=I(function(GF,J0){"use strict";var U_=Mr(),F_=Br();function Y_(r,e){var a,i,v,t,s,o,u,f,n,d,y,q,x,m,h,p,b;for(b=U_(r.shape,r.strides),u=b.sh,d=b.sx,a=F_(r.dtype),y=r.offset,i=r.data,t=d[0],v=r.accessors[1],p=u[1];p>0;)for(p0;)for(h0;)for(E0;)for(g0;)for(S0;)for(w0;)for(O0;)for(l0;)for(_0;)for(k0;)for(R0;)for(N0;)for(T0;)for(A0;)for(P0;)for(z0;)for(D0;)for(L0;)for(C0;)for(k0;)for(F0;)for(U0;)for(B0;)for(M0;)for(V0;)for(P0;)for(z0;)for(G0;)for(Z0;)for(K0;)for(J0;)for(Y0;)for(F0;)for(U0;)for(B0;)for(H0;)for($0;)for(W0;)for(Q0;)for(X0;)for(G0;)for(Z0;)for(K0;)for(J0;)for(ar0;)for(vr0;)for(er0;)for(ir0;)for(rr0;)for(H0;)for($0;)for(W0;)for(Q0;)for(X0;)for(h0;)for(m0;)for(g0;)for(S0;)for(j0;)for(O0;)for(l0;)for(_0;)for(c0;)for(R0;)for(N0;)for(T0;)for(A0;)for(w0;)for(z0;)for(D0;)for(L0;)for(C0;)for(k0;)for(R0;)for(U0;)for(B0;)for(M0;)for(V0;)for(P0;)for(z0;)for(D0;)for(Z0;)for(K0;)for(J0;)for(Y0;)for(F0;)for(U0;)for(B0;)for(M0;)for($0;)for(W0;)for(Q0;)for(X0;)for(G0;)for(Z0;)for(K0;)for(J0;)for(Y0;)for(vr0;)for(er0;)for(ir0;)for(rr0;)for(H0;)for($0;)for(W0;)for(Q0;)for(X0;)for(G=o&&(v=o-1);else if(t==="wrap")v<0?(v+=o,v<0&&(v%=o,v!==0&&(v+=o))):v>=o&&(v-=o,v>=o&&(v%=o));else if(v<0||v>=o)throw new RangeError($E("invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.",o,v));if(u=a,i==="column-major"){for(n=0;n=0;n--)f=v%r[n],v-=f,v/=r[n],u+=f*e[n];return u}Ql.exports=r7});var be=I(function(SY,$l){"use strict";var e7=Hl();$l.exports=e7});var ec=I(function(wY,rc){"use strict";var a7=Cr(),i7=be(),t7="throw";function v7(r,e){var a,i,v,t,s,o,u,f,n;for(s=r.shape,v=a7(s),a=r.data,o=r.strides,u=r.offset,i=r.order,t=r.accessors[1],n=0;n0&&(y=VT(y.length))}else y=C1(q);return L1(y)===0?GT(d,s,Fi(y,f),u,!i):(t=YT(q,v,t),y=Fi(y,f),y.length===0?new d(s,Yi(r),[],[0],t,u,{readonly:!i}):(v=KT(q,v,f),new d(s,Yi(r),y,v,t,u,{readonly:!i})))}V1.exports=JT});var we=I(function(fK,M1){"use strict";var ZT=P1();M1.exports=ZT});var U1=I(function(dK,B1){"use strict";function XT(r,e){var a,i,v,t,s,o,u,f,n,d;for(v=1,t=1,d=1;d=0&&(n=r[s],i=n<0?-n:n,!(i<=a));)r[s+1]=n,e[o+1]=e[o],s-=1,o-=1;r[s+1]=u,e[o+1]=f,v+=1,t+=1}}B1.exports=XT});var K1=I(function(lK,Y1){"use strict";var WT=require("@stdlib/array/base/zero-to"),QT=require("@stdlib/array/base/copy-indexed"),F1=require("@stdlib/array/base/take"),HT=U1();function $T(r,e,a){var i;return i=WT(r.length),e=QT(e),HT(e,i),r=F1(r,i),a=F1(a,i),{sh:r,sx:e,sy:a}}Y1.exports=$T});var kr=I(function(cK,G1){"use strict";var rI=K1();G1.exports=rI});var Z1=I(function(yK,J1){"use strict";var eI={BLOCK_SIZE_IN_BYTES:64,BLOCK_SIZE_IN_ELEMENTS:8};J1.exports=eI});var Q1=I(function(pK,W1){"use strict";var X1=qe(),Ki=Z1();function aI(r,e){var a,i;return a=X1(r),i=X1(e),a===null||i===null?Ki.BLOCK_SIZE_IN_ELEMENTS:a>i?Ki.BLOCK_SIZE_IN_BYTES/a|0:Ki.BLOCK_SIZE_IN_BYTES/i|0}W1.exports=aI});var Ar=I(function(mK,H1){"use strict";var iI=Q1();H1.exports=iI});var ry=I(function(qK,$1){"use strict";var tI=kr(),vI=Ar();function sI(r,e,a){var i,v,t,s,o,u,f,n,d,y,q,x,m,h,p,b,j,S,g,E,c,_,l,O,w;for(w=tI(r.shape,r.strides,e.strides),x=w.sh,p=w.sx,b=w.sy,i=vI(r.dtype,e.dtype),j=r.offset,S=e.offset,v=r.data,t=e.data,u=p[0],n=b[0],s=r.accessors[0],o=e.accessors[1],O=x[1];O>0;)for(O0;)for(l0;)for(C0;)for(k0;)for(R0;)for(B0;)for(M0;)for(V0;)for(P0;)for(G0;)for(Z0;)for(K0;)for(J0;)for(Y0;)for(ir0;)for(rr0;)for(H0;)for($0;)for(W0;)for(Q0;)for(nr0;)for(or0;)for(sr0;)for(tr0;)for(ar0;)for(vr0;)for(er0;)for(qr0;)for(lr0;)for(yr0;)for(cr0;)for(dr0;)for(fr0;)for(ur0;)for(nr0;)for(wr0;)for(Sr0;)for(xr0;)for(jr0;)for(hr0;)for(br0;)for(gr0;)for(qr0;)for(lr0;)for(Lr0;)for(Dr0;)for(Ir0;)for(Tr0;)for(Or0;)for(Er0;)for(_r0;)for(wr0;)for(Sr0;)for(xr0;)for(_0;)for(c0;)for(R0;)for(N0;)for(T0;)for(V0;)for(P0;)for(z0;)for(D0;)for(K0;)for(J0;)for(Y0;)for(F0;)for(U0;)for(H0;)for($0;)for(W0;)for(Q0;)for(X0;)for(G0;)for(sr0;)for(tr0;)for(ar0;)for(vr0;)for(er0;)for(ir0;)for(rr0;)for(yr0;)for(cr0;)for(dr0;)for(fr0;)for(ur0;)for(nr0;)for(or0;)for(sr0;)for(xr0;)for(jr0;)for(hr0;)for(br0;)for(gr0;)for(qr0;)for(lr0;)for(yr0;)for(cr0;)for(Ir0;)for(Tr0;)for(Or0;)for(Er0;)for(_r0;)for(wr0;)for(Sr0;)for(xr0;)for(jr0;)for(hr=s)throw new RangeError(Zi("invalid argument. Dimension index exceeds the number of dimensions. Number of dimensions: %d. Value: `%d`.",s,e));return t=PA(null,s),t[o]=a,a=LA.apply(null,t),VA(r,a,i,v)}Yp.exports=MA});var Jp=I(function(fG,Gp){"use strict";var BA=Kp();Gp.exports=BA});var Xp=I(function(dG,Zp){"use strict";var UA=require("@stdlib/string/format");function FA(){var r,e,a,i,v,t,s,o,u,f,n,d;for(i=arguments[0],r=arguments[1],e=arguments[2],v=i.length,t=arguments[3+v],a=t.length,o=e,d=0;d=u&&(n=u-1);else if(s==="wrap")n<0?(n+=u,n<0&&(n%=u,n!==0&&(n+=u))):n>=u&&(n-=u,n>=u&&(n%=u));else if(n<0||n>=u)throw new RangeError(UA("invalid argument. Subscripts must not exceed array dimensions. Subscript: `%u`. Value: `%d`.",d,n));f=r[d],f<0&&e===0?o-=n*f:o+=n*f}return o}Zp.exports=FA});var Xi=I(function(lG,Wp){"use strict";var YA=Xp();Wp.exports=YA});var $p=I(function(cG,Hp){"use strict";function Qp(r,e,a,i,v,t){var s,o,u,f,n;if(t>=e.length)return r.accessors[0](r.data,i);for(u=[],f=e[t],s=a[t],n=0;n0;)for(A0;)for(w0;)for(D0;)for(L0;)for(C0;)for(F0;)for(U0;)for(B0;)for(M0;)for(Q0;)for(X0;)for(G0;)for(Z0;)for(K0;)for(vr0;)for(er0;)for(ir0;)for(rr0;)for(H0;)for($0;)for(fr0;)for(ur0;)for(nr0;)for(or0;)for(sr0;)for(tr0;)for(ar0;)for(br0;)for(gr0;)for(qr0;)for(lr0;)for(yr0;)for(cr0;)for(dr0;)for(fr0;)for(Er0;)for(_r0;)for(wr0;)for(Sr0;)for(xr0;)for(jr0;)for(hr0;)for(br0;)for(gr0;)for(Wr0;)for(Ur0;)for(Lr0;)for(Dr0;)for(Ir0;)for(Tr0;)for(Or0;)for(Er0;)for(_r0;)for(wr0;)for(O0;)for(l0;)for(C0;)for(k0;)for(R0;)for(B0;)for(M0;)for(V0;)for(P0;)for(G0;)for(Z0;)for(K0;)for(J0;)for(Y0;)for(ir0;)for(rr0;)for(H0;)for($0;)for(W0;)for(Q0;)for(nr0;)for(or0;)for(sr0;)for(tr0;)for(ar0;)for(vr0;)for(er0;)for(qr0;)for(lr0;)for(yr0;)for(cr0;)for(dr0;)for(fr0;)for(ur0;)for(nr0;)for(wr0;)for(Sr0;)for(xr0;)for(jr0;)for(hr0;)for(br0;)for(gr0;)for(qr0;)for(lr0;)for(Lr0;)for(Dr0;)for(Ir0;)for(Tr0;)for(Or0;)for(Er0;)for(_r0;)for(wr0;)for(Sr0;)for(xr0?(t=MD(e),s=CD(e,a)):(t=1,s=[0]),v=zD(r,t),v===null)throw new TypeError(VD("invalid argument. First argument must be a recognized data type. Value: `%s`.",r));return new PD(r,v,e,s,LD(e,s),a)}$m.exports=BD});var aq=I(function(dJ,eq){"use strict";var UD=rq();eq.exports=UD});var tq=I(function(lJ,iq){"use strict";var FD=Yr(),YD=Gr(),KD=ee(),GD=Cr(),JD=Jr(),ZD=Kr(),XD=Xr(),WD=require("@stdlib/string/format");function QD(r){var e,a,i,v,t,s,o;if(o=JD(r),t=ZD(r,!0),v=XD(r),e=t.length,e>0?(a=GD(t),s=FD(t,v)):(a=1,s=[0]),i=KD(o,a),i===null)throw new TypeError(WD("invalid argument. First argument must have a recognized data type. Value: `%s`.",o));return new r.constructor(o,i,t,s,YD(t,s),v)}iq.exports=QD});var sq=I(function(cJ,vq){"use strict";var HD=tq();vq.exports=HD});var nq=I(function(yJ,oq){"use strict";var mr=require("@stdlib/utils/define-read-only-property"),pr={};mr(pr,"assert",af());mr(pr,"binaryLoopOrder",ff());mr(pr,"binaryBlockSize",mf());mr(pr,"bind2vind",bf());mr(pr,"broadcastArray",Da());mr(pr,"broadcastScalar",Jf());mr(pr,"broadcastShapes",Qf());mr(pr,"buffer",ee());mr(pr,"bufferCtors",ra());mr(pr,"bufferDataType",ja());mr(pr,"bufferDataTypeEnum",ed());mr(pr,"bytesPerElement",qe());mr(pr,"char2dtype",cd());mr(pr,"clampIndex",ui());mr(pr,"ndarray",ve());mr(pr,"data",ce());mr(pr,"dtype",Jr());mr(pr,"dtypeChar",ki());mr(pr,"dtypeDesc",hd());mr(pr,"dtypeEnum2Str",ga());mr(pr,"dtypeResolveEnum",Ri());mr(pr,"dtypeResolveStr",ue());mr(pr,"dtypeStr2Enum",He());mr(pr,"dtype2c",Td());mr(pr,"dtypes2signatures",Ci());mr(pr,"empty",Ld());mr(pr,"emptyLike",Md());mr(pr,"expandDimensions",Zd());mr(pr,"scalar2ndarray",Hd());mr(pr,"ind",Le());mr(pr,"ind2sub",La());mr(pr,"iterationOrder",de());mr(pr,"maxViewBufferIndex",o0());mr(pr,"maybeBroadcastArray",l0());mr(pr,"metaDataProps",m0());mr(pr,"minViewBufferIndex",h0());mr(pr,"minmaxViewBufferIndex",me());mr(pr,"ndarraylike2object",oa());mr(pr,"ndims",Vi());mr(pr,"nextCartesianIndex",Ae());mr(pr,"nonsingletonDimensions",C0());mr(pr,"nullary",kc());mr(pr,"nullaryLoopOrder",Mr());mr(pr,"nullaryBlockSize",Br());mr(pr,"numel",Cr());mr(pr,"offset",fe());mr(pr,"order",Xr());mr(pr,"outputPolicyEnum2Str",Va());mr(pr,"outputPolicyResolveEnum",Xc());mr(pr,"outputPolicyResolveStr",$c());mr(pr,"outputPolicyStr2Enum",Pa());mr(pr,"prependSingletonDimensions",o1());mr(pr,"removeSingletonDimensions",p1());mr(pr,"serializeMetaData",w1());mr(pr,"shape",Kr());mr(pr,"shape2strides",Yr());mr(pr,"singletonDimensions",O1());mr(pr,"slice",we());mr(pr,"sliceAssign",Ma());mr(pr,"sliceDimension",Jp());mr(pr,"strides",te());mr(pr,"strides2offset",Gr());mr(pr,"strides2order",Ee());mr(pr,"sub2ind",Xi());mr(pr,"ndarray2array",Wi());mr(pr,"transpose",s2());mr(pr,"unary",Gi());mr(pr,"unaryBy",Zm());mr(pr,"unaryLoopOrder",kr());mr(pr,"unaryOutputDataType",Hm());mr(pr,"unaryBlockSize",Ar());mr(pr,"vind2bind",be());mr(pr,"wrapIndex",fi());mr(pr,"zeros",aq());mr(pr,"zerosLike",sq());oq.exports=pr});var fq=I(function(pJ,uq){"use strict";var $D=require("@stdlib/assert/is-ndarray-like"),rC=require("@stdlib/assert/is-collection"),eC=require("@stdlib/assert/is-nonnegative-integer").isPrimitive,ca=require("@stdlib/array/base/copy-indexed"),aC=Ie(),iC=Zr(),tC=Ve(),vC=ea(),sC=ke(),oC=aa(),ya=require("@stdlib/string/format");function nC(r,e){var a,i,v,t,s,o,u,f,n;if(!$D(r))throw new TypeError(ya("invalid argument. First argument must be an ndarray. Value: `%s`.",r));if(!rC(e))throw new TypeError(ya("invalid argument. Second argument must be an array of nonnegative integers. Value: `%s`.",e));if(s=e.length,v=iC(r),o=v.length,s=0;f--)if(n=o-s+f,!(n<0)){if(u=v[n],i=e[f],!eC(i))throw new TypeError(ya("invalid argument. Second argument must be an array of nonnegative integers. Value: `%s`.","["+e.join(",")+"]"));if(i!==0&&i1){if(e=arguments[1],!bC(e))throw new TypeError(Hi("invalid argument. Options argument must be an object. Value: `%s`.",e));Ba(e,"dtype")?a=e.dtype:a=bq,Ba(e,"order")?i=e.order:i=Sq,Ba(e,"mode")&&(t.mode=e.mode),Ba(e,"submode")&&(t.submode=e.submode)}else a=bq,i=Sq;if(typeof r=="number")f=[r];else if(SC(r))f=r;else throw new TypeError(Hi("invalid argument. First argument must be either a nonnegative integer or an array of nonnegative integers. Value: `%s`.",r));if(v=f.length,v>0){if(o=OC(f),o!==o||o<0)throw new TypeError(Hi("invalid argument. First argument must be either a nonnegative integer or an array of nonnegative integers. Value: `%s`.",r));u=wC(f,i)}else o=1,u=[0];return a==="binary"?s=EC(o):s=_C(o,a),new TC(a,s,f,u,jC(f,u),i,t)}jq.exports=IC});var Oq=I(function(bJ,Eq){"use strict";var kC=_q();Eq.exports=kC});var Nq=I(function(SJ,Aq){"use strict";var AC=require("@stdlib/assert/is-ndarray-like"),NC=require("@stdlib/assert/is-plain-object"),RC=require("@stdlib/assert/is-nonnegative-integer-array").primitives,pa=require("@stdlib/assert/has-own-property"),DC=Yr(),CC=Gr(),LC=Cr(),Tq=Ie(),Iq=Zr(),kq=ke(),zC=ne(),VC=require("@stdlib/array/empty"),PC=require("@stdlib/buffer/alloc-unsafe"),$i=require("@stdlib/string/format");function MC(r){var e,a,i,v,t,s,o,u,f;if(!AC(r))throw new TypeError($i("invalid argument. First argument must be an ndarray-like object. Value: `%s`.",r));if(t={},arguments.length>1){if(e=arguments[1],!NC(e))throw new TypeError($i("invalid argument. Options argument must be an object. Value: `%s`.",e));if(pa(e,"dtype")?a=e.dtype:a=Tq(r),pa(e,"shape")){if(f=e.shape,typeof f=="number"&&(f=[f]),!RC(f))throw new TypeError($i("invalid option. `%s` option must be a nonnegative integer or an array of nonnegative integers. Option: `%s`.","shape",f))}else f=Iq(r);pa(e,"order")?i=e.order:i=kq(r),pa(e,"mode")&&(t.mode=e.mode),pa(e,"submode")&&(t.submode=e.submode)}else a=Tq(r),f=Iq(r),i=kq(r);return v=f.length,v>0?(o=LC(f),u=DC(f,i)):(o=1,u=[0]),a==="binary"?s=PC(o):s=VC(o,a),new zC(a,s,f,u,CC(f,u),i,t)}Aq.exports=MC});var Dq=I(function(wJ,Rq){"use strict";var BC=Nq();Rq.exports=BC});var rt=I(function(jJ,Cq){"use strict";var UC=/^-?[0-9]+$/;Cq.exports=UC});var et=I(function(_J,Lq){"use strict";var FC=/:/;Lq.exports=FC});var Vq=I(function(EJ,zq){"use strict";var YC=require("@stdlib/string/base/trim"),KC=require("@stdlib/string/base/replace"),at=require("@stdlib/slice/multi"),GC=require("@stdlib/slice/base/str2multislice"),JC=require("@stdlib/slice/base/seq2multislice"),ZC=require("@stdlib/slice/base/str2slice"),Ne=require("@stdlib/string/format"),XC=rt(),WC=et();function QC(r,e){var a,i,v,t;if(i=YC(e),v=i[0],v==="S"){if(t=ZC(e),t===null)throw new Error(Ne("invalid operation. Unsupported slice operation. Value: `%s`.",e));t=new at(t)}else if(v==="M"){if(t=GC(i),t===null)throw new Error(Ne("invalid operation. Unsupported slice operation. Value: `%s`.",e))}else if(XC.test(i))t=parseInt(i,10),t=new at(t);else if(WC.test(i)){if(a=r.shape,t=JC(i,a,!0),t.code)throw t.code==="ERR_SLICE_INVALID_INCREMENT"?new Error(Ne("invalid operation. A subsequence increment must be a non-zero integer. Value: `%s`.",e)):t.code==="ERR_SLICE_INVALID_ELLIPSIS"?new Error(Ne("invalid operation. A subsequence may only include a single ellipsis. Value: `%s`.",e)):t.code==="ERR_SLICE_INVALID_SUBSEQUENCE"?new Error(Ne("invalid operation. Unsupported slice operation. Value: `%s`.",e)):new RangeError(Ne("invalid operation. Number of slice dimensions does not match the number of array dimensions. Array shape: (%s). Slice dimensions: %u.",a.join(","),KC(i,/\.\.\.,/,"").split(",").length))}else if(i.length===0||i==="...")t=new at;else throw new Error(Ne("invalid operation. Unsupported slice operation. Value: `%s`.",e));return t}zq.exports=QC});var Uq=I(function(OJ,Bq){"use strict";var HC=require("@stdlib/string/base/trim"),$C=require("@stdlib/string/base/replace"),Pq=require("@stdlib/slice/multi"),rL=require("@stdlib/slice/base/str2multislice"),Mq=require("@stdlib/slice/base/seq2multislice"),eL=require("@stdlib/slice/base/str2slice"),_e=require("@stdlib/string/format"),aL=rt();function iL(r,e,a){var i,v,t,s;if(v=HC(e),t=v[0],t==="S"){if(s=eL(e),s===null)throw new Error(_e("invalid operation. Unsupported slice operation. Value: `%s`.",e));s=new Pq(s)}else if(t==="M"){if(s=rL(v),s===null)throw new Error(_e("invalid operation. Unsupported slice operation. Value: `%s`.",e))}else if(aL.test(v))s=parseInt(v,10),s=new Pq(s);else if(v.length>0){if(i=r.shape,s=Mq(v,i,!0),s.code){if(s.code==="ERR_SLICE_INVALID_INCREMENT")throw new Error(_e("invalid operation. A subsequence increment must be a non-zero integer. Value: `%s`.",e));if(s.code==="ERR_SLICE_INVALID_ELLIPSIS")throw new Error(_e("invalid operation. A subsequence may only include a single ellipsis. Value: `%s`.",e));if(s.code==="ERR_SLICE_INVALID_SUBSEQUENCE")throw new Error(_e("invalid operation. Unsupported slice operation. Value: `%s`.",e));if(s.code==="ERR_SLICE_TOO_MANY_DIMENSIONS")throw new RangeError(_e("invalid operation. Number of slice dimensions does not match the number of array dimensions. Array shape: (%s). Slice dimensions: %u.",r.shape.join(","),$C(v,/\.\.\.,/,"").split(",").length));if(s.code==="ERR_SLICE_OUT_OF_BOUNDS"){if(a)throw new RangeError(_e("invalid operation. Slice exceeds array bounds. Array shape: (%s).",i.join(",")));s=Mq(v,i,!1)}}}else throw new RangeError(_e("invalid operation. Number of slice dimensions does not match the number of array dimensions. Array shape: (%s). Slice dimensions: %u.",r.shape.join(","),0));return s}Bq.exports=iL});var Kq=I(function(TJ,Yq){"use strict";var tL=require("@stdlib/string/base/trim"),vL=require("@stdlib/slice/base/str2multislice"),Fq=require("@stdlib/slice/base/seq2multislice"),sL=require("@stdlib/slice/base/sargs2multislice"),Ue=require("@stdlib/string/format"),oL=et();function nL(r,e,a){var i,v,t,s;if(v=tL(e),t=v[0],t==="M"){if(s=vL(v),s===null)throw new Error(Ue("invalid operation. Unsupported slice operation. Value: `%s`.",e))}else if(oL.test(v)||v==="..."){if(i=r.shape,s=Fq(v,i,!0),s.code){if(s.code==="ERR_SLICE_INVALID_INCREMENT")throw new Error(Ue("invalid operation. A subsequence increment must be a non-zero integer. Value: `%s`.",e));if(s.code==="ERR_SLICE_INVALID_ELLIPSIS")throw new Error(Ue("invalid operation. A subsequence may only include a single ellipsis. Value: `%s`.",e));if(s.code==="ERR_SLICE_INVALID_SUBSEQUENCE")throw new Error(Ue("invalid operation. Unsupported slice operation. Value: `%s`.",e));if(s.code==="ERR_SLICE_OUT_OF_BOUNDS"){if(a)throw new RangeError(Ue("invalid operation. Slice exceeds array bounds. Array shape: (%s).",i.join(",")));s=Fq(v,i,!1)}}}else if(s=sL(v),s===null)throw new Error(Ue("invalid operation. Unsupported slice operation. Value: `%s`.",e));return s}Yq.exports=nL});var it=I(function(IJ,Gq){"use strict";var uL=require("@stdlib/utils/properties-in"),fL=require("@stdlib/array/base/assert/contains").factory,dL=ne(),lL=le(),cL=fL(uL(new dL("generic",[0],[],[0],0,lL.get("order"))));Gq.exports=cL});var Zq=I(function(kJ,Jq){"use strict";var yL=require("@stdlib/assert/is-function");function pL(r,e,a){var i=r[e];if(yL(i))return v;return i;function v(){var t,s;for(t=[],s=0;s=DL&&r<=RL?"float32":"float64":r>-Ua&&r=CL?"int8":r>=LL?"int16":r>=zL?"int32":"float64":r<=VL?"uint8":r<=PL?"uint16":r<=ML?"uint32":"float64":r>-Ua&&r1){if(e=arguments[1],!FL(e))throw new TypeError(fg("invalid argument. Options argument must be an object. Value: `%s`.",e));ot(e,"dtype")&&(a.dtype=e.dtype),ot(e,"order")&&(a.order=e.order),ot(e,"readonly")&&(a.readonly=e.readonly)}if(v=YL(r),a.dtype===""?v?s="float64":KL(r)?s="complex128":s="generic":s=a.dtype,i=XL(s,1),i===null)throw new TypeError(fg("invalid option. `%s` option must be a recognized data type. Option: `%s`.","dtype",s));return/^complex/.test(s)&&v?o=[r,0]:o=r,GL(i)?t=JL(s):t=ZL(s),t(i,0,o),new WL(s,i,[],[0],0,a.order,a)}dg.exports=$L});var nt=I(function(PJ,cg){"use strict";var rz=lg();cg.exports=rz});var mg=I(function(MJ,pg){"use strict";var ez=Ma(),az=require("@stdlib/assert/is-ndarray-like"),iz=require("@stdlib/assert/is-number").isPrimitive,tz=require("@stdlib/assert/is-integer").isPrimitive,vz=require("@stdlib/assert/is-complex-like"),sz=ta(),oz=va(),nz=ka(),uz=Ia(),yg=$e(),fz=require("@stdlib/constants/int8/max"),dz=require("@stdlib/constants/int16/max"),lz=require("@stdlib/constants/int32/max"),Fa=st(),cz=require("@stdlib/complex/dtype"),Fe=nt(),Re=require("@stdlib/string/format"),yz=tt(),pz=vt();function Ye(r){return{dtype:r}}function mz(r,e,a,i,v){var t,s,o,u,f;if(!az(a))if(o=r.dtype,o==="generic")a=Fe(a,Ye(o));else if(iz(a))if(oz(o))a=Fe(a,Ye(o));else if(nz(o))if(s=Fa(a),yg(s,o))a=Fe(a,Ye(o));else throw new TypeError(Re("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",s,o));else if(uz(o)){if(!tz(a))throw new TypeError(Re("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",Fa(a),o));if(a<0?s=Fa(a):a<=fz?s="int8":a<=dz?s="int16":a<=lz?s="int32":s="float64",yg(s,o))a=Fe(a,Ye(o));else throw new TypeError(Re("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",s,o))}else if(o==="binary")if(s=Fa(a),s==="uint8")a=Fe(a,Ye(o));else throw new TypeError(Re("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",s,o));else throw new TypeError(Re("invalid operation. Unsupported target array data type. Data type: `%s`.",o));else if(vz(a)){if(!sz(o))throw new TypeError(Re("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",cz(a),o));a=Fe(a,Ye(o))}else throw new TypeError(Re("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",typeof a,o));t=!1,f=v(r,e,t);try{return ez(a,i,f,t),!0}catch(n){throw u=pz(n),new u(yz(n.message))}}pg.exports=mz});var gg=I(function(BJ,qg){"use strict";var qz=it(),gz=ag(),xz=mg();function hz(r){return e;function e(a,i,v,t){return qz(i)?gz(a,i,v):xz(a,i,v,t,r)}}qg.exports=hz});var _g=I(function(UJ,jg){"use strict";var bz=require("@stdlib/utils/define-nonenumerable-read-only-property"),hg=ne(),Sz=require("@stdlib/utils/inherit"),xg=require("@stdlib/proxy/ctor"),bg=Vq(),Sg=Uq(),wg=Kq(),ut=rg(),ft=gg(),wz=ut(bg),jz=ft(bg),_z=ut(Sg),Ez=ft(Sg),Oz=ut(wg),Tz=ft(wg);function Ke(r,e,a,i,v,t,s){var o,u,f;return u=arguments.length,this instanceof Ke?(hg.call(this,r,e,a,i,v,t,u<7?{}:s),xg?(f=a.length,o={},f===0?(o.get=wz,o.set=jz):f===1?(o.get=_z,o.set=Ez):(o.get=Oz,o.set=Tz),new xg(this,o)):(console.warn("WARNING: Proxy objects are not supported in the current environment. Some `FancyArray` functionality may not be available."),this)):u<7?new Ke(r,e,a,i,v,t):new Ke(r,e,a,i,v,t,s)}Sz(Ke,hg);bz(Ke,"name","ndarray");jg.exports=Ke});var Og=I(function(FJ,Eg){"use strict";var Iz=_g();Eg.exports=Iz});var dt=I(function(YJ,kz){kz.exports={mode:"throw",order:"row-major"}});var ct=I(function(KJ,Ig){"use strict";var Az=require("@stdlib/assert/is-plain-object"),Tg=require("@stdlib/assert/has-own-property"),Nz=$r(),Rz=We(),lt=require("@stdlib/string/format");function Dz(r,e){return Az(e)?Tg(e,"mode")&&(r.mode=e.mode,!Rz(r.mode))?new TypeError(lt("invalid option. `%s` option must be a supported/recognized mode. Option: `%s`.","mode",r.mode)):Tg(e,"order")&&(r.order=e.order,!Nz(r.order))?new TypeError(lt("invalid option. `%s` option must be a supported/recognized order. Option: `%s`.","order",r.order)):null:new TypeError(lt("invalid argument. Options argument must be an object. Value: `%s`.",e))}Ig.exports=Dz});var Rg=I(function(GJ,Ng){"use strict";var Cz=require("@stdlib/assert/is-nonnegative-integer-array").primitives,Lz=require("@stdlib/assert/is-integer").isPrimitive,zz=Yr(),Vz=La(),kg=require("@stdlib/string/format"),Ag=dt(),Pz=ct();function Mz(r,e,a){var i,v;if(i={},i.mode=Ag.mode,i.order=Ag.order,arguments.length>2&&(v=Pz(i,a),v))throw v;if(!Cz(r))throw new TypeError(kg("invalid argument. Shape argument must be an array-like object containing nonnegative integers. Value: `%s`.",r));if(!Lz(e))throw new TypeError(kg("invalid argument. Linear index must be integer valued. Value: `%s`.",e));return Vz(r,zz(r,i.order),0,i.order,e,i.mode)}Ng.exports=Mz});var Lg=I(function(JJ,Cg){"use strict";var Bz=require("@stdlib/assert/is-nonnegative-integer-array").primitives,Uz=require("@stdlib/assert/is-integer").isPrimitive,Fz=Yr(),Yz=La().assign,Ya=require("@stdlib/string/format"),Dg=dt(),Kz=ct();function Gz(r,e,a,i){var v,t,s;if(v={},v.mode=Dg.mode,v.order=Dg.order,arguments.length===4){if(s=Kz(v,arguments[2]),s)throw s;if(typeof i!="object"||i===null)throw new TypeError(Ya("invalid argument. Output argument must be either an array, typed array, or object. Value: `%s`.",i));t=i}else if(t=a,typeof t!="object"||t===null)throw new TypeError(Ya("invalid argument. Output argument must be either an array, typed array, or object. Value: `%s`.",t));if(!Bz(r))throw new TypeError(Ya("invalid argument. Shape argument must be an array-like object containing nonnegative integers. Value: `%s`.",r));if(!Uz(e))throw new TypeError(Ya("invalid argument. Linear index must be integer valued. Value: `%s`.",e));return Yz(r,Fz(r,v.order),0,v.order,e,v.mode,t)}Cg.exports=Gz});var Pg=I(function(ZJ,Vg){"use strict";var Jz=require("@stdlib/utils/define-nonenumerable-read-only-property"),zg=Rg(),Zz=Lg();Jz(zg,"assign",Zz);Vg.exports=zg});var Fg=I(function(XJ,Ug){"use strict";var yt=require("@stdlib/utils/define-nonenumerable-read-only-property"),Xz=require("@stdlib/assert/is-plain-object"),Wz=require("@stdlib/assert/is-boolean").isPrimitive,Qz=require("@stdlib/assert/is-ndarray-like"),Hz=he(),$z=require("@stdlib/assert/has-own-property"),Mg=require("@stdlib/symbol/iterator"),rV=require("@stdlib/array/base/zeros"),eV=Zr(),aV=Cr(),iV=we(),tV=Ae().assign,vV=require("@stdlib/slice/multi"),Ka=require("@stdlib/string/format");function Bg(r){var e,a,i,v,t,s,o,u,f,n,d;if(!Qz(r))throw new TypeError(Ka("invalid argument. First argument must be an ndarray. Value: `%s`.",r));if(v={writable:!1},arguments.length>1){if(e=arguments[1],!Xz(e))throw new TypeError(Ka("invalid argument. Options argument must be an object. Value: `%s`.",e));if($z(e,"readonly")){if(!Wz(e.readonly))throw new TypeError(Ka("invalid option. `%s` option must be a boolean. Option: `%s`.","readonly",e.readonly));if(v.writable=!e.readonly,v.writable&&Hz(r))throw new Error(Ka("invalid option. Cannot write to read-only array."))}}if(a=eV(r),i=a.length,i<2)throw new TypeError("invalid argument. First argument must be an ndarray having at least two dimensions.");return n=aV(a),n===0&&(s=!0),n/=a[i-2],u=i-1,f=a[u],d=-1,o=rV(i),o[i-2]=null,t={},yt(t,"next",y),yt(t,"return",q),Mg&&yt(t,Mg,x),t;function y(){var m,h;return d+=1,s||d>=n?{done:!0}:(m=vV.apply(null,o),h=(o[u]+1)%f,o[u]=h,h===0&&(o=tV(a,"row-major",o,u-2,o)),{value:iV(r,m,!0,v.writable),done:!1})}function q(m){return s=!0,arguments.length?{value:m,done:!0}:{done:!0}}function x(){return Bg(r,v)}}Ug.exports=Bg});var Kg=I(function(WJ,Yg){"use strict";var sV=Fg();Yg.exports=sV});var Xg=I(function(QJ,Zg){"use strict";var pt=require("@stdlib/utils/define-nonenumerable-read-only-property"),oV=require("@stdlib/assert/is-plain-object"),nV=$r(),uV=require("@stdlib/assert/is-ndarray-like"),fV=require("@stdlib/assert/has-own-property"),Gg=require("@stdlib/symbol/iterator"),dV=require("@stdlib/array/base/zeros"),lV=Zr(),cV=Cr(),yV=Ae().assign,mt=require("@stdlib/string/format");function Jg(r){var e,a,i,v,t,s,o,u,f,n;if(!uV(r))throw new TypeError(mt("invalid argument. First argument must be an ndarray. Value: `%s`.",r));if(v={order:r.order},arguments.length>1){if(e=arguments[1],!oV(e))throw new TypeError(mt("invalid argument. Options argument must be an object. Value: `%s`.",e));if(fV(e,"order")){if(!nV(e.order))throw new TypeError(mt("invalid option. `%s` option must be a recognized order. Option: `%s`.","order",e.order));v.order=e.order}}return a=lV(r),i=a.length,f=cV(a),f===0&&(s=!0),v.order==="row-major"?u=i-1:u=0,n=-1,o=dV(i),t={},pt(t,"next",d),pt(t,"return",y),Gg&&pt(t,Gg,q),t;function d(){return n+=1,s||n>=f?{done:!0}:(n>0&&(o=yV(a,v.order,o,u,o)),{value:[o.slice(),r.get.apply(r,o)],done:!1})}function y(x){return s=!0,arguments.length?{value:x,done:!0}:{done:!0}}function q(){return Jg(r,v)}}Zg.exports=Jg});var Qg=I(function(HJ,Wg){"use strict";var pV=Xg();Wg.exports=pV});var ex=I(function($J,rx){"use strict";var qt=require("@stdlib/utils/define-nonenumerable-read-only-property"),mV=require("@stdlib/assert/is-plain-object"),qV=$r(),gV=require("@stdlib/assert/is-collection"),xV=require("@stdlib/assert/is-nonnegative-integer").isPrimitive,hV=require("@stdlib/assert/has-own-property"),Hg=require("@stdlib/symbol/iterator"),bV=require("@stdlib/array/base/zeros"),SV=Cr(),wV=Ae().assign,Ga=require("@stdlib/string/format");function $g(r){var e,a,i,v,t,s,o,u,f,n;if(!gV(r))throw new TypeError(Ga("invalid argument. First argument must be an array of nonnegative integers. Value: `%s`.",r));if(i={order:"row-major"},arguments.length>1){if(e=arguments[1],!mV(e))throw new TypeError(Ga("invalid argument. Options argument must be an object. Value: `%s`.",e));if(hV(e,"order")){if(!qV(e.order))throw new TypeError(Ga("invalid option. `%s` option must be a recognized order. Option: `%s`.","order",e.order));i.order=e.order}}for(a=r.length,u=[],n=0;n=f?{done:!0}:(n>0&&(s=wV(r,i.order,s,o,s)),{value:s.slice(),done:!1})}function y(x){return t=!0,arguments.length?{value:x,done:!0}:{done:!0}}function q(){return $g(u,i)}}rx.exports=$g});var ix=I(function(rZ,ax){"use strict";var jV=ex();ax.exports=jV});var ox=I(function(eZ,sx){"use strict";var gt=require("@stdlib/utils/define-nonenumerable-read-only-property"),_V=require("@stdlib/assert/is-plain-object"),EV=require("@stdlib/assert/is-boolean").isPrimitive,OV=require("@stdlib/assert/is-ndarray-like"),TV=he(),IV=require("@stdlib/assert/has-own-property"),tx=require("@stdlib/symbol/iterator"),kV=require("@stdlib/array/base/zeros"),AV=Zr(),NV=Cr(),RV=we(),DV=Ae().assign,CV=require("@stdlib/slice/multi"),Ja=require("@stdlib/string/format");function vx(r){var e,a,i,v,t,s,o,u,f,n,d;if(!OV(r))throw new TypeError(Ja("invalid argument. First argument must be an ndarray. Value: `%s`.",r));if(v={writable:!1},arguments.length>1){if(e=arguments[1],!_V(e))throw new TypeError(Ja("invalid argument. Options argument must be an object. Value: `%s`.",e));if(IV(e,"readonly")){if(!EV(e.readonly))throw new TypeError(Ja("invalid option. `%s` option must be a boolean. Option: `%s`.","readonly",e.readonly));if(v.writable=!e.readonly,v.writable&&TV(r))throw new Error(Ja("invalid option. Cannot write to read-only array."))}}if(a=AV(r),i=a.length,i<2)throw new TypeError("invalid argument. First argument must be an ndarray having at least two dimensions.");return n=NV(a),n===0&&(s=!0),n/=a[i-1],u=i-2,f=a[u],d=-1,o=kV(i),o[i-1]=null,t={},gt(t,"next",y),gt(t,"return",q),tx&>(t,tx,x),t;function y(){var m,h;return d+=1,s||d>=n?{done:!0}:(m=CV.apply(null,o),h=(o[u]+1)%f,o[u]=h,h===0&&(o=DV(a,"row-major",o,u-1,o)),{value:RV(r,m,!0,v.writable),done:!1})}function q(m){return s=!0,arguments.length?{value:m,done:!0}:{done:!0}}function x(){return vx(r,v)}}sx.exports=vx});var ux=I(function(aZ,nx){"use strict";var LV=ox();nx.exports=LV});var dx=I(function(iZ,fx){"use strict";var zV=require("@stdlib/assert/is-ndarray-like"),VV=Wi(),PV=Ve(),MV=ea(),BV=Zr(),UV=ke(),FV=aa(),YV=require("@stdlib/string/format");function KV(r){if(!zV(r))throw new TypeError(YV("invalid argument. Must provide an ndarray. Value: `%s`.",r));return VV(FV(r),BV(r),PV(r),MV(r),UV(r))}fx.exports=KV});var xt=I(function(tZ,lx){"use strict";var GV=dx();lx.exports=GV});var px=I(function(vZ,yx){"use strict";var ht=require("@stdlib/utils/define-nonenumerable-read-only-property"),JV=require("@stdlib/assert/is-function"),ZV=require("@stdlib/assert/is-iterator-like"),Za=require("@stdlib/symbol/iterator"),XV=xt(),WV=require("@stdlib/string/format");function cx(r){var e,a;if(!ZV(r))throw new TypeError(WV("invalid argument. First argument must be an iterator protocol-compliant object. Value: `%s`.",r));return e={},ht(e,"next",i),ht(e,"return",v),Za&&JV(r[Za])&&ht(e,Za,t),e;function i(){var s;return a?{done:!0}:(s=r.next(),s.done?(a=!0,s):{value:XV(s.value),done:!1})}function v(s){return a=!0,arguments.length?{value:s,done:!0}:{done:!0}}function t(){return cx(r[Za]())}}yx.exports=cx});var qx=I(function(sZ,mx){"use strict";var QV=px();mx.exports=QV});var bx=I(function(oZ,hx){"use strict";var bt=require("@stdlib/utils/define-nonenumerable-read-only-property"),HV=require("@stdlib/assert/is-plain-object"),$V=$r(),rP=require("@stdlib/assert/is-ndarray-like"),eP=require("@stdlib/assert/has-own-property"),gx=require("@stdlib/symbol/iterator"),aP=require("@stdlib/array/base/zeros"),iP=Zr(),tP=Cr(),vP=Ae().assign,St=require("@stdlib/string/format");function xx(r){var e,a,i,v,t,s,o,u,f,n;if(!rP(r))throw new TypeError(St("invalid argument. First argument must be an ndarray. Value: `%s`.",r));if(v={order:r.order},arguments.length>1){if(e=arguments[1],!HV(e))throw new TypeError(St("invalid argument. Options argument must be an object. Value: `%s`.",e));if(eP(e,"order")){if(!$V(e.order))throw new TypeError(St("invalid option. `%s` option must be a recognized order. Option: `%s`.","order",e.order));v.order=e.order}}return a=iP(r),i=a.length,f=tP(a),f===0&&(s=!0),v.order==="row-major"?u=i-1:u=0,n=-1,o=aP(i),t={},bt(t,"next",d),bt(t,"return",y),gx&&bt(t,gx,q),t;function d(){return n+=1,s||n>=f?{done:!0}:(n>0&&(o=vP(a,v.order,o,u,o)),{value:r.get.apply(r,o),done:!1})}function y(x){return s=!0,arguments.length?{value:x,done:!0}:{done:!0}}function q(){return xx(r,v)}}hx.exports=xx});var wx=I(function(nZ,Sx){"use strict";var sP=bx();Sx.exports=sP});var _x=I(function(uZ,jx){"use strict";var Ge=require("@stdlib/utils/define-read-only-property"),De={};Ge(De,"nditerColumns",Kg());Ge(De,"nditerEntries",Qg());Ge(De,"nditerIndices",ix());Ge(De,"nditerRows",ux());Ge(De,"nditer2arrayEach",qx());Ge(De,"nditerValues",wx());jx.exports=De});var Tx=I(function(fZ,Ox){"use strict";var oP=require("@stdlib/assert/is-ndarray-like"),nP=require("@stdlib/assert/is-collection"),uP=require("@stdlib/assert/is-nonnegative-integer").isPrimitive,Ex=Qi(),wt=require("@stdlib/string/format");function fP(r,e){var a,i,v,t;if(!oP(r))throw new TypeError(wt("invalid argument. First argument must be an ndarray. Value: `%s`.",r));if(!nP(e))throw new TypeError(wt("invalid argument. Second argument must be an array of nonnegative integers. Value: `%s`.",e));if(i=e.length,a=r.shape,a.length===i){for(t=0;t0)throw new RangeError(Qa("invalid argument. Number of slice dimensions does not match the number of array dimensions. Array shape: (%s). Slice dimensions: %u.",s.join(","),0))}if(TP(e)){if(o=e,i>2)throw new Error("invalid invocation. Too many arguments.")}else{if(IP(e)){if(t=e,i>2)throw new Error("invalid invocation. Too many arguments.")}else for(t=[],u=1;u0)throw new RangeError(ma("invalid argument. Number of slice dimensions does not match the number of array dimensions. Array shape: (%s). Slice dimensions: %u.",o.join(","),0))}if(zP(a)){if(u=a,v>3)throw new Error("invalid invocation. Too many arguments.")}else{if(VP(a)){if(s=a,v>3)throw new Error("invalid invocation. Too many arguments.")}else for(s=[],f=2;fa+1){if(u=s-1,r=arguments[u],t=i9(v,r),t)throw t}else u=s;if(o=1,u-o!==a)throw new RangeError(_t("invalid argument. Number of provided subscripts must match the number of dimensions. ndims: `%u`. Number of subscripts: `%u`.",a,u-o));for(i=new Array(a+4),i[0]=e,i[1]=e9(e,v.order),i[2]=0;o1){if(e=arguments[1],!s9(e))throw new TypeError($a("invalid argument. Options argument must be an object. Value: `%s`.",e));qa(e,"dtype")?a=e.dtype:a=y3,qa(e,"order")?i=e.order:i=p3,qa(e,"mode")&&(t.mode=e.mode),qa(e,"submode")&&(t.submode=e.submode),qa(e,"readonly")&&(t.readonly=e.readonly)}else a=y3,i=p3;if(typeof r=="number")f=[r];else if(o9(r))f=r;else throw new TypeError($a("invalid argument. First argument must be either a nonnegative integer or an array of nonnegative integers. Value: `%s`.",r));if(v=f.length,v>0){if(o=d9(f),o!==o||o<0)throw new TypeError($a("invalid argument. First argument must be either a nonnegative integer or an array of nonnegative integers. Value: `%s`.",r));u=n9(f,i)}else o=1,u=[0];if(s=f9(a,o),s===null)throw new TypeError($a("invalid option. `%s` option must be a recognized data type. Option: `%s`.","dtype",a));return new l9(a,s,f,u,u9(f,u),i,t)}q3.exports=c9});var h3=I(function(IZ,x3){"use strict";var y9=g3();x3.exports=y9});var _3=I(function(kZ,j3){"use strict";var p9=require("@stdlib/assert/is-ndarray-like"),m9=require("@stdlib/assert/is-plain-object"),q9=require("@stdlib/assert/is-nonnegative-integer-array").primitives,Je=require("@stdlib/assert/has-own-property"),g9=Yr(),x9=Gr(),h9=ee(),b9=Cr(),b3=Ie(),S3=Zr(),w3=ke(),S9=ne(),ri=require("@stdlib/string/format");function w9(r){var e,a,i,v,t,s,o,u,f;if(!p9(r))throw new TypeError(ri("invalid argument. First argument must be an ndarray-like object. Value: `%s`.",r));if(t={},arguments.length>1){if(e=arguments[1],!m9(e))throw new TypeError(ri("invalid argument. Options argument must be an object. Value: `%s`.",e));if(Je(e,"dtype")?a=e.dtype:a=b3(r),Je(e,"shape")){if(f=e.shape,typeof f=="number"&&(f=[f]),!q9(f))throw new TypeError(ri("invalid option. `%s` option must be a nonnegative integer or an array of nonnegative integers. Option: `%s`.","shape",f))}else f=S3(r);Je(e,"order")?i=e.order:i=w3(r),Je(e,"mode")&&(t.mode=e.mode),Je(e,"submode")&&(t.submode=e.submode),Je(e,"readonly")&&(t.readonly=e.readonly)}else a=b3(r),f=S3(r),i=w3(r);if(v=f.length,v>0?(o=b9(f),u=g9(f,i)):(o=1,u=[0]),s=h9(a,o),s===null)throw new TypeError(ri("invalid argument. First argument must have a recognized data type. Value: `%s`.",a));return new S9(a,s,f,u,x9(f,u),i,t)}j3.exports=w9});var O3=I(function(AZ,E3){"use strict";var j9=_3();E3.exports=j9});var Rr=require("@stdlib/utils/define-read-only-property"),Nr={};Rr(Nr,"array",ru());Rr(Nr,"base",nq());Rr(Nr,"broadcastArray",Qi());Rr(Nr,"ndarrayCastingModes",li());Rr(Nr,"ndarray",ne());Rr(Nr,"ndarrayDataBuffer",aa());Rr(Nr,"defaults",le());Rr(Nr,"dispatch",hq());Rr(Nr,"ndarrayDataType",Ie());Rr(Nr,"ndarrayDataTypes",Fr());Rr(Nr,"ndempty",Oq());Rr(Nr,"ndemptyLike",Dq());Rr(Nr,"FancyArray",Og());Rr(Nr,"scalar2ndarray",nt());Rr(Nr,"ind2sub",Pg());Rr(Nr,"ndarrayIndexModes",Te());Rr(Nr,"iter",_x());Rr(Nr,"maybeBroadcastArray",kx());Rr(Nr,"ndarrayMinDataType",st());Rr(Nr,"ndims",hi());Rr(Nr,"ndarrayNextDataType",Cx());Rr(Nr,"numel",Mx());Rr(Nr,"ndarrayOffset",ea());Rr(Nr,"ndarrayOrder",ke());Rr(Nr,"ndarrayOrders",Oe());Rr(Nr,"ndarrayOutputDataTypePolicies",za());Rr(Nr,"ndarrayPromotionRules",Jx());Rr(Nr,"ndarraySafeCasts",yi());Rr(Nr,"ndarraySameKindCasts",pi());Rr(Nr,"ndarrayShape",Zr());Rr(Nr,"ndslice",Hx());Rr(Nr,"ndsliceAssign",t3());Rr(Nr,"ndarrayStrides",Ve());Rr(Nr,"sub2ind",c3());Rr(Nr,"ndarray2array",xt());Rr(Nr,"ndzeros",h3());Rr(Nr,"ndzerosLike",O3());module.exports=Nr; +"use strict";var I=function(r,e){return function(){return e||r((e={exports:{}}).exports,e),e.exports}};var It=I(function(F9,Tt){"use strict";function D3(r){var e,a,i,s;for(e=r.length,a=[],s=0;s=0;s--)a[s]=i,i*=r[s];return a}function C3(r){var e,a,i;for(e=[],a=1,i=0;i=0;s--)e[s]=i,i*=r[s];return e}function V3(r,e){var a,i;for(a=1,i=0;is&&(i=!1),i||e)s=t;else return 0;return i&&e?3:i?1:2}Vt.exports=Y3});var Ee=I(function(X9,Mt){"use strict";var K3=Pt();Mt.exports=K3});var Ut=I(function(W9,Bt){"use strict";function G3(r){var e,a,i;if(e=r.length,e===0)return 0;for(a=1,i=0;i0?t+=v*(r[o]-1):v<0&&(s+=v*(r[o]-1))}return[s,t]}ys.exports=mh});var qs=I(function(lM,ms){"use strict";function qh(r,e,a,i){var s,t,v,o,u;for(s=r.length,t=a,v=a,u=0;u0?v+=o*(r[u]-1):o<0&&(t+=o*(r[u]-1))}return i[0]=t,i[1]=v,i}ms.exports=qh});var me=I(function(cM,xs){"use strict";var gh=require("@stdlib/utils/define-nonenumerable-read-only-property"),gs=ps(),xh=qs();gh(gs,"assign",xh);xs.exports=gs});var bs=I(function(yM,hs){"use strict";var hh=me();function bh(r,e,a,i){var s=hh(e,a,i);return s[0]>=0&&s[1]=0;v--)t=r%a[v],r-=t,r/=a[v],s+=t*e[v];return this._accessors?this._buffer.get(s):this._buffer[s]}Vs.exports=Dh});var Bs=I(function(EM,Ms){"use strict";function Ch(r,e){var a,i,s,t,v,o;if(s=this._ndims,s===0)return this._accessors?this._buffer.set(r,this._offset):this._buffer[this._offset]=r,this;if(this._flags.ROW_MAJOR_CONTIGUOUS||this._flags.COLUMN_MAJOR_CONTIGUOUS){if(this._iterationOrder===1)return this._accessors?this._buffer.set(e,this._offset+r):this._buffer[this._offset+r]=e,this;if(this._iterationOrder===-1)return this._accessors?this._buffer.set(e,this._offset-r):this._buffer[this._offset-r]=e,this}if(i=this._shape,a=this._strides,t=this._offset,this._order==="column-major"){for(o=0;o=0;o--)v=r%i[o],r-=v,r/=i[o],t+=v*a[o];return this._accessors?this._buffer.set(e,t):this._buffer[t]=e,this}Ms.exports=Ch});var Fs=I(function(OM,Us){"use strict";function Lh(){var r,e;for(r=this._offset,e=0;e=0;v--)t=this.iget(this._length-1-v),r+=vi(t)+", "+oi(t),v>0&&(r+=", ");else for(v=2;v>=0;v--)r+=this.iget(this._length-1-v),v>0&&(r+=", ")}if(a=Uh[this.dtype],i+=Bh(a,"{{data}}",r),i+=", ",e===0?i+="[]":i+="[ "+this._shape.join(", ")+" ]",i+=", ",i+="[ ",e===0)i+="0";else for(v=0;ve?e:r}qv.exports=z4});var fi=I(function(FM,xv){"use strict";var V4=gv();xv.exports=V4});var bv=I(function(YM,hv){"use strict";function P4(r,e){var a=e+1;return r<0?(r+=a,r<0&&(r%=a,r!==0&&(r+=a)),r):(r>e&&(r-=a,r>e&&(r%=a)),r)}hv.exports=P4});var di=I(function(KM,Sv){"use strict";var M4=bv();Sv.exports=M4});var jv=I(function(GM,wv){"use strict";var B4=fi(),U4=di(),F4=require("@stdlib/string/format");function Y4(r,e,a){if(a==="clamp")return B4(r,e);if(a==="wrap")return U4(r,e);if(r<0||r>e)throw new RangeError(F4("invalid argument. Index must be on the interval: [0, %d]. Value: `%d`.",e,r));return r}wv.exports=Y4});var Le=I(function(JM,_v){"use strict";var K4=jv();_v.exports=K4});var Tv=I(function(ZM,Ov){"use strict";var G4=require("@stdlib/assert/is-integer").isPrimitive,J4=Le(),Z4=se(),X4=require("@stdlib/string/format"),Ev=Z4.prototype.iget;function W4(r){if(this._ndims>0){if(!G4(r))throw new TypeError(X4("invalid argument. Index must be an integer. Value: `%s`.",r));return r=J4(r,this._length-1,this._mode),Ev.call(this,r)}return Ev.call(this)}Ov.exports=W4});var Av=I(function(XM,kv){"use strict";var Q4=require("@stdlib/assert/is-integer").isPrimitive,H4=Le(),$4=se(),rb=require("@stdlib/string/format"),Iv=$4.prototype.iset;function eb(r,e){if(this._flags.READONLY)throw new Error("invalid invocation. Cannot write to a read-only array.");if(this._ndims>0){if(!Q4(r))throw new TypeError(rb("invalid argument. Index must be an integer. Value: `%s`.",r));r=H4(r,this._length-1,this._mode),Iv.call(this,r,e)}else Iv.call(this,r);return this}kv.exports=eb});var Dv=I(function(WM,Rv){"use strict";var ab=require("@stdlib/assert/is-integer").isPrimitive,ib=Le(),Nv=require("@stdlib/string/format");function tb(){var r,e,a,i;if(arguments.length!==this._ndims)throw new RangeError(Nv("invalid arguments. Number of indices must match the number of dimensions. ndims: `%u`. nargs: `%u`.",this._ndims,arguments.length));for(r=this._offset,a=this._submode.length,i=0;i0))throw new TypeError(ve("invalid argument. Third argument must be an array-like object containing nonnegative integers. Value: `%s`.",a));if(o=a.length,o>Wv)throw new RangeError(ve("invalid argument. Number of dimensions must not exceed %u due to stack limits. Value: `%u`.",Wv,o));if(!xb(i))throw new TypeError(ve("invalid argument. Fourth argument must be an array-like object containing integers. Value: `%s`.",i));if(o>0){if(i.length!==o)throw new RangeError(ve("invalid argument. Fourth argument length must match the number of dimensions. Expected number of dimensions: `%u`. Strides length: `%u`.",o,i.length))}else{if(i.length!==1)throw new RangeError("invalid argument. Fourth argument length must be equal to 1 when creating a zero-dimensional ndarray.");if(i[0]!==0)throw new RangeError(ve("invalid argument. Fourth argument must contain a single element equal to 0. Value: `%d`.",i[0]))}if(!gb(s))throw new TypeError(ve("invalid argument. Fifth argument must be a nonnegative integer. Value: `%s`.",s));if(!hb(t))throw new TypeError(ve("invalid argument. Sixth argument must be a supported order. Value: `%s`.",t));if(o>0&&!Sb(e.length,a,i,s)&&wb(a)>0)throw new Error("invalid arguments. Input buffer is incompatible with the specified meta data. Ensure that the offset is valid with regard to the strides array and that the buffer has enough elements to satisfy the desired array shape.");if(u={},u.mode=Ab,u.readonly=Nb,arguments.length>6&&(f=kb(u,v),f))throw f;return this._mode=u.mode,u.submode===void 0&&(u.submode=[this._mode]),this._submode=u.submode,n=Xv(a,o),d=Xv(i,o||1),Qv.call(this,r,e,n,d,s,t),this._flags.READONLY=u.readonly,this}_b(oe,Qv);Qe(oe,"name","ndarray");Qe(oe.prototype,"get",Tb);Qe(oe.prototype,"iget",Eb);Qe(oe.prototype,"set",Ib);Qe(oe.prototype,"iset",Ob);Hv.exports=oe});var ne=I(function(iB,ro){"use strict";var Rb=$v();ro.exports=Rb});var eo=I(function(tB,Db){Db.exports=["none","equiv","safe","same-kind","unsafe"]});var io=I(function(sB,ao){"use strict";var Cb=eo();function Lb(){return Cb.slice()}ao.exports=Lb});var so=I(function(vB,to){"use strict";function zb(){return{none:0,equiv:1,safe:2,"same-kind":3,unsafe:4}}to.exports=zb});var ci=I(function(oB,oo){"use strict";var Vb=require("@stdlib/utils/define-nonenumerable-read-only-property"),vo=io(),Pb=so();Vb(vo,"enum",Pb);oo.exports=vo});var fo=I(function(nB,uo){"use strict";var Mb=ci(),no=Mb(),Bb=no.length;function Ub(r){var e;for(e=0;e0}Oo.exports=l6});var $e=I(function(hB,Io){"use strict";var c6=To();Io.exports=c6});var ko=I(function(bB,y6){y6.exports={float64:{float64:1,float32:1,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,binary:0,generic:1},float32:{float64:1,float32:1,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,binary:0,generic:1},int32:{float64:1,float32:0,int32:1,int16:1,int8:1,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,binary:0,generic:1},int16:{float64:1,float32:1,int32:1,int16:1,int8:1,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,binary:0,generic:1},int8:{float64:1,float32:1,int32:1,int16:1,int8:1,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,binary:0,generic:1},uint32:{float64:1,float32:0,int32:0,int16:0,int8:0,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:0,binary:0,generic:1},uint16:{float64:1,float32:1,int32:1,int16:0,int8:0,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,binary:0,generic:1},uint8:{float64:1,float32:1,int32:1,int16:1,int8:0,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,binary:0,generic:1},uint8c:{float64:1,float32:1,int32:1,int16:1,int8:0,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,binary:0,generic:1},complex128:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,binary:0,generic:0},complex64:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,binary:0,generic:0},generic:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,binary:0,generic:1},binary:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,binary:1,generic:0}}});var Ro=I(function(SB,No){"use strict";var Ao=require("@stdlib/utils/keys"),p6=require("@stdlib/assert/has-own-property"),m6=ue(),wa=ko(),Sa;function q6(){var r,e,a,i,s,t,v,o,u;for(a={},r=Ao(wa),e=r.length,u=0;u0}Co.exports=w6});var ja=I(function(_B,zo){"use strict";var j6=Lo();zo.exports=j6});var Po=I(function(EB,Vo){"use strict";var _6=$e(),E6=ja();function O6(r,e,a){return a==="unsafe"||r===e?!0:a==="none"||a==="equiv"?!1:a==="safe"?_6(r,e):E6(r,e)}Vo.exports=O6});var qi=I(function(OB,Mo){"use strict";var T6=Po();Mo.exports=T6});var Uo=I(function(TB,Bo){"use strict";var I6=require("@stdlib/buffer/ctor"),k6=require("@stdlib/array/float64"),A6=require("@stdlib/array/float32"),N6=require("@stdlib/array/int16"),R6=require("@stdlib/array/int32"),D6=require("@stdlib/array/int8"),C6=require("@stdlib/array/uint16"),L6=require("@stdlib/array/uint32"),z6=require("@stdlib/array/uint8"),V6=require("@stdlib/array/uint8c"),P6=require("@stdlib/array/complex64"),M6=require("@stdlib/array/complex128"),B6={binary:I6,float64:k6,float32:A6,generic:Array,int16:N6,int32:R6,int8:D6,uint16:C6,uint32:L6,uint8:z6,uint8c:V6,complex64:P6,complex128:M6};Bo.exports=B6});var Yo=I(function(IB,Fo){"use strict";var U6=Uo();function F6(r){return U6[r]||null}Fo.exports=F6});var ra=I(function(kB,Ko){"use strict";var Y6=Yo();Ko.exports=Y6});var Jo=I(function(AB,Go){"use strict";function K6(r){var e;for(e=0;e=0&&r.length=PS(e)}iu.exports=MS});var vu=I(function(nU,su){"use strict";var BS=tu();su.exports=BS});var uu=I(function(uU,nu){"use strict";var ou=require("@stdlib/math/base/special/abs");function US(r){var e,a,i,s;if(e=r.length,e===0)return!1;for(a=ou(r[0]),s=1;sa)return!1;a=i}return!0}Yu.exports=Iw});var Ei=I(function(NU,Gu){"use strict";var kw=Ku();Gu.exports=kw});var Zu=I(function(RU,Ju){"use strict";var Aw=ia(),Nw=de(),Rw=Ei();function Dw(r,e,a){return Nw(e)!==0&&Rw(e)&&Aw(r,e,a)}Ju.exports=Dw});var Wu=I(function(DU,Xu){"use strict";var Cw=Zu();Xu.exports=Cw});var Hu=I(function(CU,Qu){"use strict";var Lw=require("@stdlib/array/base/assert/contains").factory,zw=Fr(),Vw=Lw(zw("signed_integer"));Qu.exports=Vw});var ka=I(function(LU,$u){"use strict";var Pw=Hu();$u.exports=Pw});var ef=I(function(zU,rf){"use strict";var Mw=require("@stdlib/array/base/assert/contains").factory,Bw=Fr(),Uw=Mw(Bw("unsigned_integer"));rf.exports=Uw});var Aa=I(function(VU,af){"use strict";var Fw=ef();af.exports=Fw});var sf=I(function(PU,tf){"use strict";var Vr=require("@stdlib/utils/define-read-only-property"),zr={};Vr(zr,"isAllowedDataTypeCast",qi());Vr(zr,"isBufferLengthCompatible",si());Vr(zr,"isBufferLengthCompatibleShape",vu());Vr(zr,"isCastingMode",yi());Vr(zr,"isColumnMajor",Si());Vr(zr,"isColumnMajorContiguous",qu());Vr(zr,"isComplexFloatingPointDataType",ta());Vr(zr,"isContiguous",ju());Vr(zr,"isDataType",Ce());Vr(zr,"isFloatingPointDataType",sa());Vr(zr,"isIndexMode",We());Vr(zr,"isIntegerDataType",wi());Vr(zr,"isNumericDataType",ji());Vr(zr,"isOrder",$r());Vr(zr,"isReadOnly",he());Vr(zr,"isRealDataType",Ia());Vr(zr,"isRealFloatingPointDataType",_i());Vr(zr,"isRowMajor",Ei());Vr(zr,"isRowMajorContiguous",Wu());Vr(zr,"isSafeDataTypeCast",$e());Vr(zr,"isSameKindDataTypeCast",ja());Vr(zr,"isSignedIntegerDataType",ka());Vr(zr,"isSingleSegmentCompatible",ia());Vr(zr,"isUnsignedIntegerDataType",Aa());tf.exports=zr});var of=I(function(MU,vf){"use strict";function Yw(r,e){var a,i,s,t,v,o,u,f,n,d;for(s=1,t=1,d=1;d=0&&(n=r[v],i=n<0?-n:n,!(i<=a));)r[v+1]=n,e[o+1]=e[o],v-=1,o-=1;r[v+1]=u,e[o+1]=f,s+=1,t+=1}}vf.exports=Yw});var ff=I(function(BU,uf){"use strict";var Kw=require("@stdlib/array/base/zero-to"),Gw=require("@stdlib/array/base/copy-indexed"),Na=require("@stdlib/array/base/take"),Jw=require("@stdlib/array/base/filled"),Oi=Ee(),Zw=of(),nf=3;function Xw(r,e,a,i){var s,t,v,o,u,f,n,d,y,q;if(s=Kw(r.length),f=Oi(e),n=Oi(a),d=Oi(i),t=Jw([],4),t[f].push(e),t[n].push(a),t[d].push(i),v=t[0].length,v===nf)u=e;else if(v===nf-1){for(y=1;y<4;y++)if(t[y].length){u=t[y][0];break}}else{for(q=0,y=1;y<4;y++)o=t[y].length,o>=v&&(v=o,q=y);u=t[q][0]}return u=Gw(u),Zw(u,s),r=Na(r,s),e=e===u?u:Na(e,s),a=a===u?u:Na(a,s),i=i===u?u:Na(i,s),{sh:r,sx:e,sy:a,sz:i}}uf.exports=Xw});var lf=I(function(UU,df){"use strict";var Ww=ff();df.exports=Ww});var yf=I(function(FU,cf){"use strict";var Qw={BLOCK_SIZE_IN_BYTES:64,BLOCK_SIZE_IN_ELEMENTS:8};cf.exports=Qw});var mf=I(function(YU,pf){"use strict";var Ti=qe(),Ra=yf();function Hw(r,e,a){var i,s,t;return i=Ti(r),s=Ti(e),t=Ti(a),i===null||s===null||t===null?Ra.BLOCK_SIZE_IN_ELEMENTS:i>s&&i>t?Ra.BLOCK_SIZE_IN_BYTES/i|0:s>t?Ra.BLOCK_SIZE_IN_BYTES/s|0:Ra.BLOCK_SIZE_IN_BYTES/t|0}pf.exports=Hw});var gf=I(function(KU,qf){"use strict";var $w=mf();qf.exports=$w});var bf=I(function(GU,hf){"use strict";var r8=require("@stdlib/string/format"),Da=require("@stdlib/math/base/special/trunc"),xf=require("@stdlib/math/base/special/abs");function e8(r,e,a,i,s,t){var v,o,u,f,n,d;for(v=r.length,o=1,d=0;d=o&&(s=o-1);else if(t==="wrap")s<0?(s+=o,s<0&&(s%=o,s!==0&&(s+=o))):s>=o&&(s-=o,s>=o&&(s%=o));else if(s<0||s>=o)throw new RangeError(r8("invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.",o,s));if(u=0,i==="column-major"){for(d=v-1;d>=0;d--)n=e[d],n<0?(f=Da(s/n),s-=f*n,f+=r[d]-1):(f=Da(s/n),s-=f*n),u+=f*xf(n);return u}for(d=0;d=0;f--)if(n=o-v+f,!(n<0)){if(u=s[n],i=e[f],i!==0&&if&&(f=e[n]);for(n=0;n=0;){for(t=e[0]-f+n,t>=0?i=s[t]:i=1,d=1;d=0?o=r[d][v]:o=1,i===1){i=o;continue}if(!(o===1||i===o))return null}a[n]=i,n-=1}return a}Wf.exports=M8});var $f=I(function(dF,Hf){"use strict";var B8=Qf();Hf.exports=B8});var ed=I(function(lF,rd){"use strict";var U8=He(),F8=_a();function Y8(r){var e=F8(r);return e?U8(e):null}rd.exports=Y8});var id=I(function(cF,ad){"use strict";var K8=ed();ad.exports=K8});var sd=I(function(yF,td){"use strict";function G8(){return{binary:"r",bool:"x",complex64:"c",complex128:"z",float16:"h",bfloat16:"e",float32:"f",float64:"d",float128:"g",generic:"o",int8:"s",int16:"k",int32:"i",int64:"l",int128:"m",int256:"n",uint8:"b",uint8c:"a",uint16:"t",uint32:"u",uint64:"v",uint128:"w",uint256:"y"}}td.exports=G8});var nd=I(function(pF,od){"use strict";var J8=ue(),vd=sd(),ki;function Z8(r){return arguments.length===0?vd():(ki===void 0&&(ki=vd()),ki[J8(r)]||null)}od.exports=Z8});var Ai=I(function(mF,ud){"use strict";var X8=nd();ud.exports=X8});var cd=I(function(qF,ld){"use strict";var fd=require("@stdlib/utils/object-inverse"),dd=Ai(),Ni;function W8(r){return arguments.length===0?fd(dd()):(Ni===void 0&&(Ni=fd(dd())),Ni[r]||null)}ld.exports=W8});var pd=I(function(gF,yd){"use strict";var Q8=cd();yd.exports=Q8});var qd=I(function(xF,md){"use strict";function H8(){return{binary:"byte",bool:"boolean",complex64:"single-precision floating-point complex number",complex128:"double-precision floating-point complex number",float16:"half-precision floating-point number",bfloat16:"brain floating-point number",float32:"single-precision floating-point number",float64:"double-precision floating-point number",float128:"quadruple-precision floating-point number",generic:"generic array value",int8:"signed 8-bit integer",int16:"signed 16-bit integer",int32:"signed 32-bit integer",int64:"signed 64-bit integer",int128:"signed 128-bit integer",int256:"signed 256-bit integer",uint8:"unsigned 8-bit integer",uint8c:"unsigned 8-bit integer (clamped)",uint16:"unsigned 16-bit integer",uint32:"unsigned 32-bit integer",uint64:"unsigned 64-bit integer",uint128:"unsigned 128-bit integer",uint256:"unsigned 256-bit integer"}}md.exports=H8});var hd=I(function(hF,xd){"use strict";var $8=ue(),gd=qd(),Ri;function rj(r){return arguments.length===0?gd():(Ri===void 0&&(Ri=gd()),Ri[$8(r)]||null)}xd.exports=rj});var Sd=I(function(bF,bd){"use strict";var ej=hd();bd.exports=ej});var jd=I(function(SF,wd){"use strict";var aj=xa(),ij=He();function tj(r){var e=typeof r;return e==="number"?aj(r)?r:null:e==="string"?ij(r):null}wd.exports=tj});var Di=I(function(wF,_d){"use strict";var sj=jd();_d.exports=sj});var Ed=I(function(jF,vj){vj.exports={binary:null,bool:"bool",complex64:"stdlib_complex64_t",complex128:"stdlib_complex128_t",float16:null,bfloat16:null,float32:"float",float64:"double",float128:null,generic:null,int8:"int8_t",int16:"int16_t",int32:"int32_t",int64:"int64_t",int128:null,int256:null,uint8:"uint8_t",uint8c:null,uint16:"uint16_t",uint32:"uint32_t",uint64:"uint64_t",uint128:null,uint256:null}});var Td=I(function(_F,Od){"use strict";var oj=ue(),nj=Ed();function uj(r){return nj[oj(r)]||null}Od.exports=uj});var kd=I(function(EF,Id){"use strict";var fj=Td();Id.exports=fj});var Rd=I(function(OF,Nd){"use strict";var dj=require("@stdlib/assert/is-array-like-object"),Ad=require("@stdlib/assert/is-nonnegative-integer").isPrimitive,lj=ue(),Ci=require("@stdlib/string/format");function cj(r,e,a){var i,s,t,v,o,u,f,n;if(!dj(r))throw new TypeError(Ci("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(!Ad(e))throw new TypeError(Ci("invalid argument. Second argument must be a nonnegative integer. Value: `%s`.",e));if(!Ad(a))throw new TypeError(Ci("invalid argument. Third argument must be a nonnegative integer. Value: `%s`.",a));if(i=r.length,i===0)throw new RangeError("invalid argument. First argument must contain at least one element.");if(o=e+a,i%o!==0)throw new RangeError("invalid arguments. Length of the first argument is incompatible with the second and third arguments.");for(s=[],t=[],u=2*o,n=2*e,f=0;f<=u;f++)f===0?f===n?t.push("() => ("):t.push("("):f===u?f===n?t.push(") => ()"):t.push(")"):f===n?t.push(") => ("):f%2===1?t.push(""):t.push(", ");for(f=0;f0?(t=gj(e),v=pj(e,a)):(t=1,v=[0]),r==="binary"?s=hj(t):s=xj(t,r),new qj(r,s,e,v,mj(e,v),a)}Cd.exports=bj});var Vd=I(function(kF,zd){"use strict";var Sj=Ld();zd.exports=Sj});var Md=I(function(AF,Pd){"use strict";var wj=Yr(),jj=Gr(),_j=Cr(),Ej=Jr(),Oj=Kr(),Tj=Xr(),Ij=require("@stdlib/array/empty"),kj=require("@stdlib/buffer/alloc-unsafe");function Aj(r){var e,a,i,s,t,v,o;return o=Ej(r),t=Oj(r,!0),s=Tj(r),e=t.length,e>0?(a=_j(t),v=wj(t,s)):(a=1,v=[0]),o==="binary"?i=kj(a):i=Ij(a,o),new r.constructor(o,i,t,v,jj(t,v),s)}Pd.exports=Aj});var Ud=I(function(NF,Bd){"use strict";var Nj=Md();Bd.exports=Nj});var Zd=I(function(RF,Jd){"use strict";var Rj=he(),Fd=Jr(),Dj=Kr(),Cj=te(),Yd=fe(),Lj=Xr(),Kd=ce(),Gd=require("@stdlib/string/format");function zj(r,e){var a,i,s,t,v,o,u;if(t=Dj(r,!1),v=Cj(r,!1),s=Lj(r),o=t.length,a=[],i=[],e<0){if(e<-o-1)throw new RangeError(Gd("invalid argument. Specified axis is out-of-bounds. Must be on the interval: [-%u-1, %u]. Value: `%d`.",o,o,e));e+=o+1}else if(e>o)throw new RangeError(Gd("invalid argument. Specified axis is out-of-bounds. Must be on the interval: [-%u-1, %u]. Value: `%d`.",o,o,e));if(e===0)for(i.push(1),a.push(v[0]),u=0;u=u&&(s=u-1);else if(t==="wrap")s<0?(s+=u,s<0&&(s%=u,s!==0&&(s+=u))):s>=u&&(s-=u,s>=u&&(s%=u));else if(s<0||s>=u)throw new RangeError(Jj("invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.",u,s));if(a===0){if(i==="column-major"){for(d=0;d=0;d--)n=s%r[d],s-=n,s/=r[d],v[d]=n;return v}if(i==="column-major"){for(d=o-1;d>=0;d--)n=e[d],n<0?(f=La(s/n),s-=f*n,v[d]=r[d]-1+f):(f=La(s/n),s-=f*n,v[d]=f);return v}for(d=0;d0&&(s+=e[t]*(r[t]-1))}return s}v0.exports=$j});var u0=I(function(BF,n0){"use strict";var r_=o0();n0.exports=r_});var l0=I(function(UF,d0){"use strict";var f0=Ca(),e_=Kr();function a_(r,e){var a,i,s;if(i=e.length,a=e_(r,!1),a.length===i){for(s=0;si;t--)s[t]=a[t];for(t=i;t>=0&&(v=(a[t]+1)%e[t],s[t]=v,!(v>0));t--);for(t-=1;t>=0;t--)s[t]=a[t];return s}function T_(r,e,a,i,s){var t,v;for(t=0;t0));t++);for(t+=1;t=t)return null;return e===E_?O_(t,r,a,i,s):T_(t,r,a,i,s)}I0.exports=I_});var A0=I(function($F,k0){"use strict";var k_=require("@stdlib/array/base/zeros"),A_=Mi();function N_(r,e,a,i){return A_(r,e,a,i,k_(r.length))}k0.exports=N_});var Ae=I(function(rY,R0){"use strict";var R_=require("@stdlib/utils/define-nonenumerable-read-only-property"),N0=A0(),D_=Mi();R_(N0,"assign",D_);R0.exports=N0});var C0=I(function(eY,D0){"use strict";function C_(r){var e,a;for(e=0,a=0;a=0&&(n=r[v],i=n<0?-n:n,!(i<=a));)r[v+1]=n,e[o+1]=e[o],v-=1,o-=1;r[v+1]=u,e[o+1]=f,s+=1,t+=1}}V0.exports=z_});var B0=I(function(tY,M0){"use strict";var V_=require("@stdlib/array/base/zero-to"),P_=require("@stdlib/array/base/copy-indexed"),M_=require("@stdlib/array/base/take"),B_=P0();function U_(r,e){var a;return a=V_(r.length),e=P_(e),B_(e,a),r=M_(r,a),{sh:r,sx:e}}M0.exports=U_});var Mr=I(function(sY,U0){"use strict";var F_=B0();U0.exports=F_});var Y0=I(function(vY,F0){"use strict";var Y_={BLOCK_SIZE_IN_BYTES:64,BLOCK_SIZE_IN_ELEMENTS:8};F0.exports=Y_});var J0=I(function(oY,G0){"use strict";var K_=qe(),K0=Y0();function G_(r){var e=K_(r);return e===null?K0.BLOCK_SIZE_IN_ELEMENTS:K0.BLOCK_SIZE_IN_BYTES/e|0}G0.exports=G_});var Br=I(function(nY,Z0){"use strict";var J_=J0();Z0.exports=J_});var W0=I(function(uY,X0){"use strict";var Z_=Mr(),X_=Br();function W_(r,e){var a,i,s,t,v,o,u,f,n,d,y,q,x,m,h,p,b;for(b=Z_(r.shape,r.strides),u=b.sh,d=b.sx,a=X_(r.dtype),y=r.offset,i=r.data,t=d[0],s=r.accessors[1],p=u[1];p>0;)for(p0;)for(h0;)for(E0;)for(g0;)for(S0;)for(w0;)for(O0;)for(l0;)for(_0;)for(k0;)for(R0;)for(N0;)for(T0;)for(A0;)for(P0;)for(z0;)for(D0;)for(L0;)for(C0;)for(k0;)for(F0;)for(U0;)for(B0;)for(M0;)for(V0;)for(P0;)for(z0;)for(G0;)for(Z0;)for(K0;)for(J0;)for(Y0;)for(F0;)for(U0;)for(B0;)for(H0;)for($0;)for(W0;)for(Q0;)for(X0;)for(G0;)for(Z0;)for(K0;)for(J0;)for(ar0;)for(sr0;)for(er0;)for(ir0;)for(rr0;)for(H0;)for($0;)for(W0;)for(Q0;)for(X0;)for(h0;)for(m0;)for(g0;)for(S0;)for(j0;)for(O0;)for(l0;)for(_0;)for(c0;)for(R0;)for(N0;)for(T0;)for(A0;)for(w0;)for(z0;)for(D0;)for(L0;)for(C0;)for(k0;)for(R0;)for(U0;)for(B0;)for(M0;)for(V0;)for(P0;)for(z0;)for(D0;)for(Z0;)for(K0;)for(J0;)for(Y0;)for(F0;)for(U0;)for(B0;)for(M0;)for($0;)for(W0;)for(Q0;)for(X0;)for(G0;)for(Z0;)for(K0;)for(J0;)for(Y0;)for(sr0;)for(er0;)for(ir0;)for(rr0;)for(H0;)for($0;)for(W0;)for(Q0;)for(X0;)for(G=o&&(s=o-1);else if(t==="wrap")s<0?(s+=o,s<0&&(s%=o,s!==0&&(s+=o))):s>=o&&(s-=o,s>=o&&(s%=o));else if(s<0||s>=o)throw new RangeError(s7("invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.",o,s));if(u=a,i==="column-major"){for(n=0;n=0;n--)f=s%r[n],s-=f,s/=r[n],u+=f*e[n];return u}$l.exports=v7});var be=I(function(PY,ec){"use strict";var o7=rc();ec.exports=o7});var ic=I(function(MY,ac){"use strict";var n7=Cr(),u7=be(),f7="throw";function d7(r,e){var a,i,s,t,v,o,u,f,n;for(v=r.shape,s=n7(v),a=r.data,o=r.strides,u=r.offset,i=r.order,t=r.accessors[1],n=0;n0&&(y=YT(y.length))}else y=z1(q);return V1(y)===0?HT(d,v,Yi(y,f),u,!i):(t=WT(q,s,t),y=Yi(y,f),y.length===0?new d(v,Ki(r),[],[0],t,u,{readonly:!i}):(s=QT(q,s,f),new d(v,Ki(r),y,s,t,u,{readonly:!i})))}M1.exports=$T});var we=I(function(OK,U1){"use strict";var rI=B1();U1.exports=rI});var Y1=I(function(TK,F1){"use strict";function eI(r,e){var a,i,s,t,v,o,u,f,n,d;for(s=1,t=1,d=1;d=0&&(n=r[v],i=n<0?-n:n,!(i<=a));)r[v+1]=n,e[o+1]=e[o],v-=1,o-=1;r[v+1]=u,e[o+1]=f,s+=1,t+=1}}F1.exports=eI});var J1=I(function(IK,G1){"use strict";var aI=require("@stdlib/array/base/zero-to"),iI=require("@stdlib/array/base/copy-indexed"),K1=require("@stdlib/array/base/take"),tI=Y1();function sI(r,e,a){var i;return i=aI(r.length),e=iI(e),tI(e,i),r=K1(r,i),a=K1(a,i),{sh:r,sx:e,sy:a}}G1.exports=sI});var Ar=I(function(kK,Z1){"use strict";var vI=J1();Z1.exports=vI});var W1=I(function(AK,X1){"use strict";var oI={BLOCK_SIZE_IN_BYTES:64,BLOCK_SIZE_IN_ELEMENTS:8};X1.exports=oI});var $1=I(function(NK,H1){"use strict";var Q1=qe(),Gi=W1();function nI(r,e){var a,i;return a=Q1(r),i=Q1(e),a===null||i===null?Gi.BLOCK_SIZE_IN_ELEMENTS:a>i?Gi.BLOCK_SIZE_IN_BYTES/a|0:Gi.BLOCK_SIZE_IN_BYTES/i|0}H1.exports=nI});var Nr=I(function(RK,ry){"use strict";var uI=$1();ry.exports=uI});var ay=I(function(DK,ey){"use strict";var fI=Ar(),dI=Nr();function lI(r,e,a){var i,s,t,v,o,u,f,n,d,y,q,x,m,h,p,b,j,S,g,E,c,_,l,O,w;for(w=fI(r.shape,r.strides,e.strides),x=w.sh,p=w.sx,b=w.sy,i=dI(r.dtype,e.dtype),j=r.offset,S=e.offset,s=r.data,t=e.data,u=p[0],n=b[0],v=r.accessors[0],o=e.accessors[1],O=x[1];O>0;)for(O0;)for(l0;)for(C0;)for(k0;)for(R0;)for(B0;)for(M0;)for(V0;)for(P0;)for(G0;)for(Z0;)for(K0;)for(J0;)for(Y0;)for(ir0;)for(rr0;)for(H0;)for($0;)for(W0;)for(Q0;)for(nr0;)for(or0;)for(vr0;)for(tr0;)for(ar0;)for(sr0;)for(er0;)for(qr0;)for(lr0;)for(yr0;)for(cr0;)for(dr0;)for(fr0;)for(ur0;)for(nr0;)for(wr0;)for(Sr0;)for(xr0;)for(jr0;)for(hr0;)for(br0;)for(gr0;)for(qr0;)for(lr0;)for(Lr0;)for(Dr0;)for(Ir0;)for(Tr0;)for(Or0;)for(Er0;)for(_r0;)for(wr0;)for(Sr0;)for(xr0;)for(_0;)for(c0;)for(R0;)for(N0;)for(T0;)for(V0;)for(P0;)for(z0;)for(D0;)for(K0;)for(J0;)for(Y0;)for(F0;)for(U0;)for(H0;)for($0;)for(W0;)for(Q0;)for(X0;)for(G0;)for(vr0;)for(tr0;)for(ar0;)for(sr0;)for(er0;)for(ir0;)for(rr0;)for(yr0;)for(cr0;)for(dr0;)for(fr0;)for(ur0;)for(nr0;)for(or0;)for(vr0;)for(xr0;)for(jr0;)for(hr0;)for(br0;)for(gr0;)for(qr0;)for(lr0;)for(yr0;)for(cr0;)for(Ir0;)for(Tr0;)for(Or0;)for(Er0;)for(_r0;)for(wr0;)for(Sr0;)for(xr0;)for(jr0;)for(hr=v)throw new RangeError(Xi("invalid argument. Dimension index exceeds the number of dimensions. Number of dimensions: %d. Value: `%d`.",v,e));return t=KA(null,v),t[o]=a,a=UA.apply(null,t),YA(r,a,i,s)}Gp.exports=GA});var Wi=I(function(OG,Zp){"use strict";var JA=Jp();Zp.exports=JA});var Wp=I(function(TG,Xp){"use strict";var ZA=require("@stdlib/string/format");function XA(){var r,e,a,i,s,t,v,o,u,f,n,d;for(i=arguments[0],r=arguments[1],e=arguments[2],s=i.length,t=arguments[3+s],a=t.length,o=e,d=0;d=u&&(n=u-1);else if(v==="wrap")n<0?(n+=u,n<0&&(n%=u,n!==0&&(n+=u))):n>=u&&(n-=u,n>=u&&(n%=u));else if(n<0||n>=u)throw new RangeError(ZA("invalid argument. Subscripts must not exceed array dimensions. Subscript: `%u`. Value: `%d`.",d,n));f=r[d],f<0&&e===0?o-=n*f:o+=n*f}return o}Xp.exports=XA});var Qi=I(function(IG,Qp){"use strict";var WA=Wp();Qp.exports=WA});var r2=I(function(kG,$p){"use strict";function Hp(r,e,a,i,s,t){var v,o,u,f,n;if(t>=e.length)return r.accessors[0](r.data,i);for(u=[],f=e[t],v=a[t],n=0;n0;)for(A0;)for(w0;)for(D0;)for(L0;)for(C0;)for(F0;)for(U0;)for(B0;)for(M0;)for(Q0;)for(X0;)for(G0;)for(Z0;)for(K0;)for(sr0;)for(er0;)for(ir0;)for(rr0;)for(H0;)for($0;)for(fr0;)for(ur0;)for(nr0;)for(or0;)for(vr0;)for(tr0;)for(ar0;)for(br0;)for(gr0;)for(qr0;)for(lr0;)for(yr0;)for(cr0;)for(dr0;)for(fr0;)for(Er0;)for(_r0;)for(wr0;)for(Sr0;)for(xr0;)for(jr0;)for(hr0;)for(br0;)for(gr0;)for(Wr0;)for(Ur0;)for(Lr0;)for(Dr0;)for(Ir0;)for(Tr0;)for(Or0;)for(Er0;)for(_r0;)for(wr0;)for(O0;)for(l0;)for(C0;)for(k0;)for(R0;)for(B0;)for(M0;)for(V0;)for(P0;)for(G0;)for(Z0;)for(K0;)for(J0;)for(Y0;)for(ir0;)for(rr0;)for(H0;)for($0;)for(W0;)for(Q0;)for(nr0;)for(or0;)for(vr0;)for(tr0;)for(ar0;)for(sr0;)for(er0;)for(qr0;)for(lr0;)for(yr0;)for(cr0;)for(dr0;)for(fr0;)for(ur0;)for(nr0;)for(wr0;)for(Sr0;)for(xr0;)for(jr0;)for(hr0;)for(br0;)for(gr0;)for(qr0;)for(lr0;)for(Lr0;)for(Dr0;)for(Ir0;)for(Tr0;)for(Or0;)for(Er0;)for(_r0;)for(wr0;)for(Sr0;)for(xr0?(t=GD(e),v=BD(e,a)):(t=1,v=[0]),s=FD(r,t),s===null)throw new TypeError(YD("invalid argument. First argument must be a recognized data type. Value: `%s`.",r));return new KD(r,s,e,v,UD(e,v),a)}rq.exports=JD});var iq=I(function(TJ,aq){"use strict";var ZD=eq();aq.exports=ZD});var sq=I(function(IJ,tq){"use strict";var XD=Yr(),WD=Gr(),QD=ee(),HD=Cr(),$D=Jr(),rC=Kr(),eC=Xr(),aC=require("@stdlib/string/format");function iC(r){var e,a,i,s,t,v,o;if(o=$D(r),t=rC(r,!0),s=eC(r),e=t.length,e>0?(a=HD(t),v=XD(t,s)):(a=1,v=[0]),i=QD(o,a),i===null)throw new TypeError(aC("invalid argument. First argument must have a recognized data type. Value: `%s`.",o));return new r.constructor(o,i,t,v,WD(t,v),s)}tq.exports=iC});var oq=I(function(kJ,vq){"use strict";var tC=sq();vq.exports=tC});var uq=I(function(AJ,nq){"use strict";var mr=require("@stdlib/utils/define-read-only-property"),pr={};mr(pr,"assert",sf());mr(pr,"binaryLoopOrder",lf());mr(pr,"binaryBlockSize",gf());mr(pr,"bind2vind",wf());mr(pr,"broadcastArray",Ca());mr(pr,"broadcastScalar",Xf());mr(pr,"broadcastShapes",$f());mr(pr,"buffer",ee());mr(pr,"bufferCtors",ra());mr(pr,"bufferDataType",_a());mr(pr,"bufferDataTypeEnum",id());mr(pr,"bytesPerElement",qe());mr(pr,"char2dtype",pd());mr(pr,"clampIndex",fi());mr(pr,"ndarray",se());mr(pr,"data",ce());mr(pr,"dtype",Jr());mr(pr,"dtypeChar",Ai());mr(pr,"dtypeDesc",Sd());mr(pr,"dtypeEnum2Str",xa());mr(pr,"dtypeResolveEnum",Di());mr(pr,"dtypeResolveStr",ue());mr(pr,"dtypeStr2Enum",He());mr(pr,"dtype2c",kd());mr(pr,"dtypes2signatures",Li());mr(pr,"empty",Vd());mr(pr,"emptyLike",Ud());mr(pr,"expandDimensions",Wd());mr(pr,"scalar2ndarray",r0());mr(pr,"ind",Le());mr(pr,"ind2sub",za());mr(pr,"iterationOrder",de());mr(pr,"maxViewBufferIndex",u0());mr(pr,"maybeBroadcastArray",y0());mr(pr,"metaDataProps",g0());mr(pr,"minViewBufferIndex",S0());mr(pr,"minmaxViewBufferIndex",me());mr(pr,"ndarraylike2object",oa());mr(pr,"ndims",Pi());mr(pr,"nextCartesianIndex",Ae());mr(pr,"nonsingletonDimensions",z0());mr(pr,"nullary",Nc());mr(pr,"nullaryLoopOrder",Mr());mr(pr,"nullaryBlockSize",Br());mr(pr,"numel",Cr());mr(pr,"offset",fe());mr(pr,"order",Xr());mr(pr,"outputPolicyEnum2Str",Pa());mr(pr,"outputPolicyResolveEnum",Qc());mr(pr,"outputPolicyResolveStr",e1());mr(pr,"outputPolicyStr2Enum",Ma());mr(pr,"prependSingletonDimensions",u1());mr(pr,"removeSingletonDimensions",q1());mr(pr,"serializeMetaData",_1());mr(pr,"shape",Kr());mr(pr,"shape2strides",Yr());mr(pr,"singletonDimensions",I1());mr(pr,"slice",we());mr(pr,"sliceAssign",Ba());mr(pr,"sliceDimension",Wi());mr(pr,"strides",te());mr(pr,"strides2offset",Gr());mr(pr,"strides2order",Ee());mr(pr,"sub2ind",Qi());mr(pr,"ndarray2array",Hi());mr(pr,"transpose",o2());mr(pr,"unary",Ji());mr(pr,"unaryBy",Xm());mr(pr,"unaryLoopOrder",Ar());mr(pr,"unaryOutputDataType",$m());mr(pr,"unaryBlockSize",Nr());mr(pr,"vind2bind",be());mr(pr,"wrapIndex",di());mr(pr,"zeros",iq());mr(pr,"zerosLike",oq());nq.exports=pr});var dq=I(function(NJ,fq){"use strict";var sC=require("@stdlib/assert/is-ndarray-like"),vC=require("@stdlib/assert/is-collection"),oC=require("@stdlib/assert/is-nonnegative-integer").isPrimitive,ca=require("@stdlib/array/base/copy-indexed"),nC=Ie(),uC=Zr(),fC=Ve(),dC=ea(),lC=ke(),cC=aa(),ya=require("@stdlib/string/format");function yC(r,e){var a,i,s,t,v,o,u,f,n;if(!sC(r))throw new TypeError(ya("invalid argument. First argument must be an ndarray. Value: `%s`.",r));if(!vC(e))throw new TypeError(ya("invalid argument. Second argument must be an array of nonnegative integers. Value: `%s`.",e));if(v=e.length,s=uC(r),o=s.length,v=0;f--)if(n=o-v+f,!(n<0)){if(u=s[n],i=e[f],!oC(i))throw new TypeError(ya("invalid argument. Second argument must be an array of nonnegative integers. Value: `%s`.","["+e.join(",")+"]"));if(i!==0&&i1){if(e=arguments[1],!OC(e))throw new TypeError(rt("invalid argument. Options argument must be an object. Value: `%s`.",e));Ua(e,"dtype")?a=e.dtype:a=Sq,Ua(e,"order")?i=e.order:i=wq,Ua(e,"mode")&&(t.mode=e.mode),Ua(e,"submode")&&(t.submode=e.submode)}else a=Sq,i=wq;if(typeof r=="number")f=[r];else if(TC(r))f=r;else throw new TypeError(rt("invalid argument. First argument must be either a nonnegative integer or an array of nonnegative integers. Value: `%s`.",r));if(s=f.length,s>0){if(o=RC(f),o!==o||o<0)throw new TypeError(rt("invalid argument. First argument must be either a nonnegative integer or an array of nonnegative integers. Value: `%s`.",r));u=IC(f,i)}else o=1,u=[0];return a==="binary"?v=NC(o):v=AC(o,a),new DC(a,v,f,u,kC(f,u),i,t)}_q.exports=CC});var Tq=I(function(VJ,Oq){"use strict";var LC=Eq();Oq.exports=LC});var Rq=I(function(PJ,Nq){"use strict";var zC=require("@stdlib/assert/is-ndarray-like"),VC=require("@stdlib/assert/is-plain-object"),PC=require("@stdlib/assert/is-nonnegative-integer-array").primitives,pa=require("@stdlib/assert/has-own-property"),MC=Yr(),BC=Gr(),UC=Cr(),Iq=Ie(),kq=Zr(),Aq=ke(),FC=ne(),YC=require("@stdlib/array/empty"),KC=require("@stdlib/buffer/alloc-unsafe"),et=require("@stdlib/string/format");function GC(r){var e,a,i,s,t,v,o,u,f;if(!zC(r))throw new TypeError(et("invalid argument. First argument must be an ndarray-like object. Value: `%s`.",r));if(t={},arguments.length>1){if(e=arguments[1],!VC(e))throw new TypeError(et("invalid argument. Options argument must be an object. Value: `%s`.",e));if(pa(e,"dtype")?a=e.dtype:a=Iq(r),pa(e,"shape")){if(f=e.shape,typeof f=="number"&&(f=[f]),!PC(f))throw new TypeError(et("invalid option. `%s` option must be a nonnegative integer or an array of nonnegative integers. Option: `%s`.","shape",f))}else f=kq(r);pa(e,"order")?i=e.order:i=Aq(r),pa(e,"mode")&&(t.mode=e.mode),pa(e,"submode")&&(t.submode=e.submode)}else a=Iq(r),f=kq(r),i=Aq(r);return s=f.length,s>0?(o=UC(f),u=MC(f,i)):(o=1,u=[0]),a==="binary"?v=KC(o):v=YC(o,a),new FC(a,v,f,u,BC(f,u),i,t)}Nq.exports=GC});var Cq=I(function(MJ,Dq){"use strict";var JC=Rq();Dq.exports=JC});var at=I(function(BJ,Lq){"use strict";var ZC=/^-?[0-9]+$/;Lq.exports=ZC});var it=I(function(UJ,zq){"use strict";var XC=/:/;zq.exports=XC});var Pq=I(function(FJ,Vq){"use strict";var WC=require("@stdlib/string/base/trim"),QC=require("@stdlib/string/base/replace"),tt=require("@stdlib/slice/multi"),HC=require("@stdlib/slice/base/str2multislice"),$C=require("@stdlib/slice/base/seq2multislice"),rL=require("@stdlib/slice/base/str2slice"),Ne=require("@stdlib/string/format"),eL=at(),aL=it();function iL(r,e){var a,i,s,t;if(i=WC(e),s=i[0],s==="S"){if(t=rL(e),t===null)throw new Error(Ne("invalid operation. Unsupported slice operation. Value: `%s`.",e));t=new tt(t)}else if(s==="M"){if(t=HC(i),t===null)throw new Error(Ne("invalid operation. Unsupported slice operation. Value: `%s`.",e))}else if(eL.test(i))t=parseInt(i,10),t=new tt(t);else if(aL.test(i)){if(a=r.shape,t=$C(i,a,!0),t.code)throw t.code==="ERR_SLICE_INVALID_INCREMENT"?new Error(Ne("invalid operation. A subsequence increment must be a non-zero integer. Value: `%s`.",e)):t.code==="ERR_SLICE_INVALID_ELLIPSIS"?new Error(Ne("invalid operation. A subsequence may only include a single ellipsis. Value: `%s`.",e)):t.code==="ERR_SLICE_INVALID_SUBSEQUENCE"?new Error(Ne("invalid operation. Unsupported slice operation. Value: `%s`.",e)):new RangeError(Ne("invalid operation. Number of slice dimensions does not match the number of array dimensions. Array shape: (%s). Slice dimensions: %u.",a.join(","),QC(i,/\.\.\.,/,"").split(",").length))}else if(i.length===0||i==="...")t=new tt;else throw new Error(Ne("invalid operation. Unsupported slice operation. Value: `%s`.",e));return t}Vq.exports=iL});var Fq=I(function(YJ,Uq){"use strict";var tL=require("@stdlib/string/base/trim"),sL=require("@stdlib/string/base/replace"),Mq=require("@stdlib/slice/multi"),vL=require("@stdlib/slice/base/str2multislice"),Bq=require("@stdlib/slice/base/seq2multislice"),oL=require("@stdlib/slice/base/str2slice"),_e=require("@stdlib/string/format"),nL=at();function uL(r,e,a){var i,s,t,v;if(s=tL(e),t=s[0],t==="S"){if(v=oL(e),v===null)throw new Error(_e("invalid operation. Unsupported slice operation. Value: `%s`.",e));v=new Mq(v)}else if(t==="M"){if(v=vL(s),v===null)throw new Error(_e("invalid operation. Unsupported slice operation. Value: `%s`.",e))}else if(nL.test(s))v=parseInt(s,10),v=new Mq(v);else if(s.length>0){if(i=r.shape,v=Bq(s,i,!0),v.code){if(v.code==="ERR_SLICE_INVALID_INCREMENT")throw new Error(_e("invalid operation. A subsequence increment must be a non-zero integer. Value: `%s`.",e));if(v.code==="ERR_SLICE_INVALID_ELLIPSIS")throw new Error(_e("invalid operation. A subsequence may only include a single ellipsis. Value: `%s`.",e));if(v.code==="ERR_SLICE_INVALID_SUBSEQUENCE")throw new Error(_e("invalid operation. Unsupported slice operation. Value: `%s`.",e));if(v.code==="ERR_SLICE_TOO_MANY_DIMENSIONS")throw new RangeError(_e("invalid operation. Number of slice dimensions does not match the number of array dimensions. Array shape: (%s). Slice dimensions: %u.",r.shape.join(","),sL(s,/\.\.\.,/,"").split(",").length));if(v.code==="ERR_SLICE_OUT_OF_BOUNDS"){if(a)throw new RangeError(_e("invalid operation. Slice exceeds array bounds. Array shape: (%s).",i.join(",")));v=Bq(s,i,!1)}}}else throw new RangeError(_e("invalid operation. Number of slice dimensions does not match the number of array dimensions. Array shape: (%s). Slice dimensions: %u.",r.shape.join(","),0));return v}Uq.exports=uL});var Gq=I(function(KJ,Kq){"use strict";var fL=require("@stdlib/string/base/trim"),dL=require("@stdlib/slice/base/str2multislice"),Yq=require("@stdlib/slice/base/seq2multislice"),lL=require("@stdlib/slice/base/sargs2multislice"),Ue=require("@stdlib/string/format"),cL=it();function yL(r,e,a){var i,s,t,v;if(s=fL(e),t=s[0],t==="M"){if(v=dL(s),v===null)throw new Error(Ue("invalid operation. Unsupported slice operation. Value: `%s`.",e))}else if(cL.test(s)||s==="..."){if(i=r.shape,v=Yq(s,i,!0),v.code){if(v.code==="ERR_SLICE_INVALID_INCREMENT")throw new Error(Ue("invalid operation. A subsequence increment must be a non-zero integer. Value: `%s`.",e));if(v.code==="ERR_SLICE_INVALID_ELLIPSIS")throw new Error(Ue("invalid operation. A subsequence may only include a single ellipsis. Value: `%s`.",e));if(v.code==="ERR_SLICE_INVALID_SUBSEQUENCE")throw new Error(Ue("invalid operation. Unsupported slice operation. Value: `%s`.",e));if(v.code==="ERR_SLICE_OUT_OF_BOUNDS"){if(a)throw new RangeError(Ue("invalid operation. Slice exceeds array bounds. Array shape: (%s).",i.join(",")));v=Yq(s,i,!1)}}}else if(v=lL(s),v===null)throw new Error(Ue("invalid operation. Unsupported slice operation. Value: `%s`.",e));return v}Kq.exports=yL});var st=I(function(GJ,Jq){"use strict";var pL=require("@stdlib/utils/properties-in"),mL=require("@stdlib/array/base/assert/contains").factory,qL=ne(),gL=le(),xL=mL(pL(new qL("generic",[0],[],[0],0,gL.get("order"))));Jq.exports=xL});var Xq=I(function(JJ,Zq){"use strict";var hL=require("@stdlib/assert/is-function");function bL(r,e,a){var i=r[e];if(hL(i))return s;return i;function s(){var t,v;for(t=[],v=0;v=ML&&r<=PL?"float32":"float64":r>-Fa&&r=BL?"int8":r>=UL?"int16":r>=FL?"int32":"float64":r<=YL?"uint8":r<=KL?"uint16":r<=GL?"uint32":"float64":r>-Fa&&r1){if(e=arguments[1],!XL(e))throw new TypeError(dg("invalid argument. Options argument must be an object. Value: `%s`.",e));ut(e,"dtype")&&(a.dtype=e.dtype),ut(e,"order")&&(a.order=e.order),ut(e,"readonly")&&(a.readonly=e.readonly)}if(s=WL(r),a.dtype===""?s?v="float64":QL(r)?v="complex128":v="generic":v=a.dtype,i=ez(v,1),i===null)throw new TypeError(dg("invalid option. `%s` option must be a recognized data type. Option: `%s`.","dtype",v));return/^complex/.test(v)&&s?o=[r,0]:o=r,HL(i)?t=$L(v):t=rz(v),t(i,0,o),new az(v,i,[],[0],0,a.order,a)}lg.exports=sz});var ft=I(function(aZ,yg){"use strict";var vz=cg();yg.exports=vz});var qg=I(function(iZ,mg){"use strict";var oz=Ba(),nz=require("@stdlib/assert/is-ndarray-like"),uz=require("@stdlib/assert/is-number").isPrimitive,fz=require("@stdlib/assert/is-integer").isPrimitive,dz=require("@stdlib/assert/is-complex-like"),lz=ta(),cz=sa(),yz=Aa(),pz=ka(),pg=$e(),mz=require("@stdlib/constants/int8/max"),qz=require("@stdlib/constants/int16/max"),gz=require("@stdlib/constants/int32/max"),Ya=nt(),xz=require("@stdlib/complex/dtype"),Fe=ft(),Re=require("@stdlib/string/format"),hz=vt(),bz=ot();function Ye(r){return{dtype:r}}function Sz(r,e,a,i,s){var t,v,o,u,f;if(!nz(a))if(o=r.dtype,o==="generic")a=Fe(a,Ye(o));else if(uz(a))if(cz(o))a=Fe(a,Ye(o));else if(yz(o))if(v=Ya(a),pg(v,o))a=Fe(a,Ye(o));else throw new TypeError(Re("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",v,o));else if(pz(o)){if(!fz(a))throw new TypeError(Re("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",Ya(a),o));if(a<0?v=Ya(a):a<=mz?v="int8":a<=qz?v="int16":a<=gz?v="int32":v="float64",pg(v,o))a=Fe(a,Ye(o));else throw new TypeError(Re("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",v,o))}else if(o==="binary")if(v=Ya(a),v==="uint8")a=Fe(a,Ye(o));else throw new TypeError(Re("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",v,o));else throw new TypeError(Re("invalid operation. Unsupported target array data type. Data type: `%s`.",o));else if(dz(a)){if(!lz(o))throw new TypeError(Re("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",xz(a),o));a=Fe(a,Ye(o))}else throw new TypeError(Re("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",typeof a,o));t=!1,f=s(r,e,t);try{return oz(a,i,f,t),!0}catch(n){throw u=bz(n),new u(hz(n.message))}}mg.exports=Sz});var xg=I(function(tZ,gg){"use strict";var wz=st(),jz=ig(),_z=qg();function Ez(r){return e;function e(a,i,s,t){return wz(i)?jz(a,i,s):_z(a,i,s,t,r)}}gg.exports=Ez});var Eg=I(function(sZ,_g){"use strict";var Oz=require("@stdlib/utils/define-nonenumerable-read-only-property"),bg=ne(),Tz=require("@stdlib/utils/inherit"),hg=require("@stdlib/proxy/ctor"),Sg=Pq(),wg=Fq(),jg=Gq(),dt=eg(),lt=xg(),Iz=dt(Sg),kz=lt(Sg),Az=dt(wg),Nz=lt(wg),Rz=dt(jg),Dz=lt(jg);function Ke(r,e,a,i,s,t,v){var o,u,f;return u=arguments.length,this instanceof Ke?(bg.call(this,r,e,a,i,s,t,u<7?{}:v),hg?(f=a.length,o={},f===0?(o.get=Iz,o.set=kz):f===1?(o.get=Az,o.set=Nz):(o.get=Rz,o.set=Dz),new hg(this,o)):(console.warn("WARNING: Proxy objects are not supported in the current environment. Some `FancyArray` functionality may not be available."),this)):u<7?new Ke(r,e,a,i,s,t):new Ke(r,e,a,i,s,t,v)}Tz(Ke,bg);Oz(Ke,"name","ndarray");_g.exports=Ke});var Tg=I(function(vZ,Og){"use strict";var Cz=Eg();Og.exports=Cz});var ct=I(function(oZ,Lz){Lz.exports={mode:"throw",order:"row-major"}});var pt=I(function(nZ,kg){"use strict";var zz=require("@stdlib/assert/is-plain-object"),Ig=require("@stdlib/assert/has-own-property"),Vz=$r(),Pz=We(),yt=require("@stdlib/string/format");function Mz(r,e){return zz(e)?Ig(e,"mode")&&(r.mode=e.mode,!Pz(r.mode))?new TypeError(yt("invalid option. `%s` option must be a supported/recognized mode. Option: `%s`.","mode",r.mode)):Ig(e,"order")&&(r.order=e.order,!Vz(r.order))?new TypeError(yt("invalid option. `%s` option must be a supported/recognized order. Option: `%s`.","order",r.order)):null:new TypeError(yt("invalid argument. Options argument must be an object. Value: `%s`.",e))}kg.exports=Mz});var Dg=I(function(uZ,Rg){"use strict";var Bz=require("@stdlib/assert/is-nonnegative-integer-array").primitives,Uz=require("@stdlib/assert/is-integer").isPrimitive,Fz=Yr(),Yz=za(),Ag=require("@stdlib/string/format"),Ng=ct(),Kz=pt();function Gz(r,e,a){var i,s;if(i={},i.mode=Ng.mode,i.order=Ng.order,arguments.length>2&&(s=Kz(i,a),s))throw s;if(!Bz(r))throw new TypeError(Ag("invalid argument. Shape argument must be an array-like object containing nonnegative integers. Value: `%s`.",r));if(!Uz(e))throw new TypeError(Ag("invalid argument. Linear index must be integer valued. Value: `%s`.",e));return Yz(r,Fz(r,i.order),0,i.order,e,i.mode)}Rg.exports=Gz});var zg=I(function(fZ,Lg){"use strict";var Jz=require("@stdlib/assert/is-nonnegative-integer-array").primitives,Zz=require("@stdlib/assert/is-integer").isPrimitive,Xz=Yr(),Wz=za().assign,Ka=require("@stdlib/string/format"),Cg=ct(),Qz=pt();function Hz(r,e,a,i){var s,t,v;if(s={},s.mode=Cg.mode,s.order=Cg.order,arguments.length===4){if(v=Qz(s,arguments[2]),v)throw v;if(typeof i!="object"||i===null)throw new TypeError(Ka("invalid argument. Output argument must be either an array, typed array, or object. Value: `%s`.",i));t=i}else if(t=a,typeof t!="object"||t===null)throw new TypeError(Ka("invalid argument. Output argument must be either an array, typed array, or object. Value: `%s`.",t));if(!Jz(r))throw new TypeError(Ka("invalid argument. Shape argument must be an array-like object containing nonnegative integers. Value: `%s`.",r));if(!Zz(e))throw new TypeError(Ka("invalid argument. Linear index must be integer valued. Value: `%s`.",e));return Wz(r,Xz(r,s.order),0,s.order,e,s.mode,t)}Lg.exports=Hz});var Mg=I(function(dZ,Pg){"use strict";var $z=require("@stdlib/utils/define-nonenumerable-read-only-property"),Vg=Dg(),rV=zg();$z(Vg,"assign",rV);Pg.exports=Vg});var Yg=I(function(lZ,Fg){"use strict";var mt=require("@stdlib/utils/define-nonenumerable-read-only-property"),eV=require("@stdlib/assert/is-plain-object"),aV=require("@stdlib/assert/is-boolean").isPrimitive,iV=require("@stdlib/assert/is-ndarray-like"),tV=he(),sV=require("@stdlib/assert/has-own-property"),Bg=require("@stdlib/symbol/iterator"),vV=require("@stdlib/array/base/zeros"),oV=Zr(),nV=Cr(),uV=we(),fV=Ae().assign,dV=require("@stdlib/slice/multi"),Ga=require("@stdlib/string/format");function Ug(r){var e,a,i,s,t,v,o,u,f,n,d;if(!iV(r))throw new TypeError(Ga("invalid argument. First argument must be an ndarray. Value: `%s`.",r));if(s={writable:!1},arguments.length>1){if(e=arguments[1],!eV(e))throw new TypeError(Ga("invalid argument. Options argument must be an object. Value: `%s`.",e));if(sV(e,"readonly")){if(!aV(e.readonly))throw new TypeError(Ga("invalid option. `%s` option must be a boolean. Option: `%s`.","readonly",e.readonly));if(s.writable=!e.readonly,s.writable&&tV(r))throw new Error(Ga("invalid option. Cannot write to read-only array."))}}if(a=oV(r),i=a.length,i<2)throw new TypeError("invalid argument. First argument must be an ndarray having at least two dimensions.");return n=nV(a),n===0&&(v=!0),n/=a[i-2],u=i-1,f=a[u],d=-1,o=vV(i),o[i-2]=null,t={},mt(t,"next",y),mt(t,"return",q),Bg&&mt(t,Bg,x),t;function y(){var m,h;return d+=1,v||d>=n?{done:!0}:(m=dV.apply(null,o),h=(o[u]+1)%f,o[u]=h,h===0&&(o=fV(a,"row-major",o,u-2,o)),{value:uV(r,m,!0,s.writable),done:!1})}function q(m){return v=!0,arguments.length?{value:m,done:!0}:{done:!0}}function x(){return Ug(r,s)}}Fg.exports=Ug});var Gg=I(function(cZ,Kg){"use strict";var lV=Yg();Kg.exports=lV});var Wg=I(function(yZ,Xg){"use strict";var qt=require("@stdlib/utils/define-nonenumerable-read-only-property"),cV=require("@stdlib/assert/is-plain-object"),yV=$r(),pV=require("@stdlib/assert/is-ndarray-like"),mV=require("@stdlib/assert/has-own-property"),Jg=require("@stdlib/symbol/iterator"),qV=require("@stdlib/array/base/zeros"),gV=Zr(),xV=Cr(),hV=Ae().assign,gt=require("@stdlib/string/format");function Zg(r){var e,a,i,s,t,v,o,u,f,n;if(!pV(r))throw new TypeError(gt("invalid argument. First argument must be an ndarray. Value: `%s`.",r));if(s={order:r.order},arguments.length>1){if(e=arguments[1],!cV(e))throw new TypeError(gt("invalid argument. Options argument must be an object. Value: `%s`.",e));if(mV(e,"order")){if(!yV(e.order))throw new TypeError(gt("invalid option. `%s` option must be a recognized order. Option: `%s`.","order",e.order));s.order=e.order}}return a=gV(r),i=a.length,f=xV(a),f===0&&(v=!0),s.order==="row-major"?u=i-1:u=0,n=-1,o=qV(i),t={},qt(t,"next",d),qt(t,"return",y),Jg&&qt(t,Jg,q),t;function d(){return n+=1,v||n>=f?{done:!0}:(n>0&&(o=hV(a,s.order,o,u,o)),{value:[o.slice(),r.get.apply(r,o)],done:!1})}function y(x){return v=!0,arguments.length?{value:x,done:!0}:{done:!0}}function q(){return Zg(r,s)}}Xg.exports=Zg});var Hg=I(function(pZ,Qg){"use strict";var bV=Wg();Qg.exports=bV});var ax=I(function(mZ,ex){"use strict";var xt=require("@stdlib/utils/define-nonenumerable-read-only-property"),SV=require("@stdlib/assert/is-plain-object"),wV=$r(),jV=require("@stdlib/assert/is-collection"),_V=require("@stdlib/assert/is-nonnegative-integer").isPrimitive,EV=require("@stdlib/assert/has-own-property"),$g=require("@stdlib/symbol/iterator"),OV=require("@stdlib/array/base/zeros"),TV=Cr(),IV=Ae().assign,Ja=require("@stdlib/string/format");function rx(r){var e,a,i,s,t,v,o,u,f,n;if(!jV(r))throw new TypeError(Ja("invalid argument. First argument must be an array of nonnegative integers. Value: `%s`.",r));if(i={order:"row-major"},arguments.length>1){if(e=arguments[1],!SV(e))throw new TypeError(Ja("invalid argument. Options argument must be an object. Value: `%s`.",e));if(EV(e,"order")){if(!wV(e.order))throw new TypeError(Ja("invalid option. `%s` option must be a recognized order. Option: `%s`.","order",e.order));i.order=e.order}}for(a=r.length,u=[],n=0;n=f?{done:!0}:(n>0&&(v=IV(r,i.order,v,o,v)),{value:v.slice(),done:!1})}function y(x){return t=!0,arguments.length?{value:x,done:!0}:{done:!0}}function q(){return rx(u,i)}}ex.exports=rx});var tx=I(function(qZ,ix){"use strict";var kV=ax();ix.exports=kV});var nx=I(function(gZ,ox){"use strict";var ht=require("@stdlib/utils/define-nonenumerable-read-only-property"),AV=require("@stdlib/assert/is-plain-object"),NV=require("@stdlib/assert/is-boolean").isPrimitive,RV=require("@stdlib/assert/is-ndarray-like"),DV=he(),CV=require("@stdlib/assert/has-own-property"),sx=require("@stdlib/symbol/iterator"),LV=require("@stdlib/array/base/zeros"),zV=Zr(),VV=Cr(),PV=we(),MV=Ae().assign,BV=require("@stdlib/slice/multi"),Za=require("@stdlib/string/format");function vx(r){var e,a,i,s,t,v,o,u,f,n,d;if(!RV(r))throw new TypeError(Za("invalid argument. First argument must be an ndarray. Value: `%s`.",r));if(s={writable:!1},arguments.length>1){if(e=arguments[1],!AV(e))throw new TypeError(Za("invalid argument. Options argument must be an object. Value: `%s`.",e));if(CV(e,"readonly")){if(!NV(e.readonly))throw new TypeError(Za("invalid option. `%s` option must be a boolean. Option: `%s`.","readonly",e.readonly));if(s.writable=!e.readonly,s.writable&&DV(r))throw new Error(Za("invalid option. Cannot write to read-only array."))}}if(a=zV(r),i=a.length,i<2)throw new TypeError("invalid argument. First argument must be an ndarray having at least two dimensions.");return n=VV(a),n===0&&(v=!0),n/=a[i-1],u=i-2,f=a[u],d=-1,o=LV(i),o[i-1]=null,t={},ht(t,"next",y),ht(t,"return",q),sx&&ht(t,sx,x),t;function y(){var m,h;return d+=1,v||d>=n?{done:!0}:(m=BV.apply(null,o),h=(o[u]+1)%f,o[u]=h,h===0&&(o=MV(a,"row-major",o,u-1,o)),{value:PV(r,m,!0,s.writable),done:!1})}function q(m){return v=!0,arguments.length?{value:m,done:!0}:{done:!0}}function x(){return vx(r,s)}}ox.exports=vx});var fx=I(function(xZ,ux){"use strict";var UV=nx();ux.exports=UV});var lx=I(function(hZ,dx){"use strict";var FV=require("@stdlib/assert/is-ndarray-like"),YV=Hi(),KV=Ve(),GV=ea(),JV=Zr(),ZV=ke(),XV=aa(),WV=require("@stdlib/string/format");function QV(r){if(!FV(r))throw new TypeError(WV("invalid argument. Must provide an ndarray. Value: `%s`.",r));return YV(XV(r),JV(r),KV(r),GV(r),ZV(r))}dx.exports=QV});var bt=I(function(bZ,cx){"use strict";var HV=lx();cx.exports=HV});var mx=I(function(SZ,px){"use strict";var St=require("@stdlib/utils/define-nonenumerable-read-only-property"),$V=require("@stdlib/assert/is-function"),rP=require("@stdlib/assert/is-iterator-like"),Xa=require("@stdlib/symbol/iterator"),eP=bt(),aP=require("@stdlib/string/format");function yx(r){var e,a;if(!rP(r))throw new TypeError(aP("invalid argument. First argument must be an iterator protocol-compliant object. Value: `%s`.",r));return e={},St(e,"next",i),St(e,"return",s),Xa&&$V(r[Xa])&&St(e,Xa,t),e;function i(){var v;return a?{done:!0}:(v=r.next(),v.done?(a=!0,v):{value:eP(v.value),done:!1})}function s(v){return a=!0,arguments.length?{value:v,done:!0}:{done:!0}}function t(){return yx(r[Xa]())}}px.exports=yx});var gx=I(function(wZ,qx){"use strict";var iP=mx();qx.exports=iP});var Sx=I(function(jZ,bx){"use strict";var wt=require("@stdlib/utils/define-nonenumerable-read-only-property"),tP=require("@stdlib/assert/is-plain-object"),sP=$r(),vP=require("@stdlib/assert/is-ndarray-like"),oP=require("@stdlib/assert/has-own-property"),xx=require("@stdlib/symbol/iterator"),nP=require("@stdlib/array/base/zeros"),uP=Zr(),fP=Cr(),dP=Ae().assign,jt=require("@stdlib/string/format");function hx(r){var e,a,i,s,t,v,o,u,f,n;if(!vP(r))throw new TypeError(jt("invalid argument. First argument must be an ndarray. Value: `%s`.",r));if(s={order:r.order},arguments.length>1){if(e=arguments[1],!tP(e))throw new TypeError(jt("invalid argument. Options argument must be an object. Value: `%s`.",e));if(oP(e,"order")){if(!sP(e.order))throw new TypeError(jt("invalid option. `%s` option must be a recognized order. Option: `%s`.","order",e.order));s.order=e.order}}return a=uP(r),i=a.length,f=fP(a),f===0&&(v=!0),s.order==="row-major"?u=i-1:u=0,n=-1,o=nP(i),t={},wt(t,"next",d),wt(t,"return",y),xx&&wt(t,xx,q),t;function d(){return n+=1,v||n>=f?{done:!0}:(n>0&&(o=dP(a,s.order,o,u,o)),{value:r.get.apply(r,o),done:!1})}function y(x){return v=!0,arguments.length?{value:x,done:!0}:{done:!0}}function q(){return hx(r,s)}}bx.exports=hx});var jx=I(function(_Z,wx){"use strict";var lP=Sx();wx.exports=lP});var Ex=I(function(EZ,_x){"use strict";var Ge=require("@stdlib/utils/define-read-only-property"),De={};Ge(De,"nditerColumns",Gg());Ge(De,"nditerEntries",Hg());Ge(De,"nditerIndices",tx());Ge(De,"nditerRows",fx());Ge(De,"nditer2arrayEach",gx());Ge(De,"nditerValues",jx());_x.exports=De});var Ix=I(function(OZ,Tx){"use strict";var cP=require("@stdlib/assert/is-ndarray-like"),yP=require("@stdlib/assert/is-collection"),pP=require("@stdlib/assert/is-nonnegative-integer").isPrimitive,Ox=$i(),_t=require("@stdlib/string/format");function mP(r,e){var a,i,s,t;if(!cP(r))throw new TypeError(_t("invalid argument. First argument must be an ndarray. Value: `%s`.",r));if(!yP(e))throw new TypeError(_t("invalid argument. Second argument must be an array of nonnegative integers. Value: `%s`.",e));if(i=e.length,a=r.shape,a.length===i){for(t=0;t0)throw new RangeError(Ha("invalid argument. Number of slice dimensions does not match the number of array dimensions. Array shape: (%s). Slice dimensions: %u.",v.join(","),0))}if(DP(e)){if(o=e,i>2)throw new Error("invalid invocation. Too many arguments.")}else{if(CP(e)){if(t=e,i>2)throw new Error("invalid invocation. Too many arguments.")}else for(t=[],u=1;u0)throw new RangeError(ma("invalid argument. Number of slice dimensions does not match the number of array dimensions. Array shape: (%s). Slice dimensions: %u.",o.join(","),0))}if(FP(a)){if(u=a,s>3)throw new Error("invalid invocation. Too many arguments.")}else{if(YP(a)){if(v=a,s>3)throw new Error("invalid invocation. Too many arguments.")}else for(v=[],f=2;f3){if(i=arguments[3],!$P(i))throw new TypeError(qa("invalid argument. Options argument must be an object. Value: `%s`.",i));if(s9(i,"strict")){if(!r9(i.strict))throw new TypeError(qa("invalid option. `%s` option must be a boolean. Option: `%s`.","strict",i.strict));t.strict=i.strict}}return o9(r,e,s,t.strict,!1)}o3.exports=n9});var f3=I(function(UZ,u3){"use strict";var u9=n3();u3.exports=u9});var d3=I(function(FZ,f9){f9.exports={mode:["throw"],order:"row-major"}});var y3=I(function(YZ,c3){"use strict";var d9=require("@stdlib/assert/is-plain-object"),l3=require("@stdlib/assert/has-own-property"),l9=require("@stdlib/assert/is-array"),c9=$r(),y9=We(),$a=require("@stdlib/string/format");function p9(r,e){var a;if(!d9(e))return new TypeError($a("invalid argument. Options argument must be an object. Value: `%s`.",e));if(l3(e,"mode")){if(r.mode=e.mode,!l9(r.mode))r.mode=[r.mode];else if(r.mode.length===0)return new TypeError($a("invalid option. `%s` option cannot be an empty array.","mode"));for(a=0;aa+1){if(u=v-1,r=arguments[u],t=h9(s,r),t)throw t}else u=v;if(o=1,u-o!==a)throw new RangeError(Ot("invalid argument. Number of provided subscripts must match the number of dimensions. ndims: `%u`. Number of subscripts: `%u`.",a,u-o));for(i=new Array(a+4),i[0]=e,i[1]=g9(e,s.order),i[2]=0;o1){if(e=arguments[1],!w9(e))throw new TypeError(ri("invalid argument. Options argument must be an object. Value: `%s`.",e));ga(e,"dtype")?a=e.dtype:a=h3,ga(e,"order")?i=e.order:i=b3,ga(e,"mode")&&(t.mode=e.mode),ga(e,"submode")&&(t.submode=e.submode),ga(e,"readonly")&&(t.readonly=e.readonly)}else a=h3,i=b3;if(typeof r=="number")f=[r];else if(j9(r))f=r;else throw new TypeError(ri("invalid argument. First argument must be either a nonnegative integer or an array of nonnegative integers. Value: `%s`.",r));if(s=f.length,s>0){if(o=T9(f),o!==o||o<0)throw new TypeError(ri("invalid argument. First argument must be either a nonnegative integer or an array of nonnegative integers. Value: `%s`.",r));u=_9(f,i)}else o=1,u=[0];if(v=O9(a,o),v===null)throw new TypeError(ri("invalid option. `%s` option must be a recognized data type. Option: `%s`.","dtype",a));return new I9(a,v,f,u,E9(f,u),i,t)}w3.exports=k9});var E3=I(function(ZZ,_3){"use strict";var A9=j3();_3.exports=A9});var A3=I(function(XZ,k3){"use strict";var N9=require("@stdlib/assert/is-ndarray-like"),R9=require("@stdlib/assert/is-plain-object"),D9=require("@stdlib/assert/is-nonnegative-integer-array").primitives,Je=require("@stdlib/assert/has-own-property"),C9=Yr(),L9=Gr(),z9=ee(),V9=Cr(),O3=Ie(),T3=Zr(),I3=ke(),P9=ne(),ei=require("@stdlib/string/format");function M9(r){var e,a,i,s,t,v,o,u,f;if(!N9(r))throw new TypeError(ei("invalid argument. First argument must be an ndarray-like object. Value: `%s`.",r));if(t={},arguments.length>1){if(e=arguments[1],!R9(e))throw new TypeError(ei("invalid argument. Options argument must be an object. Value: `%s`.",e));if(Je(e,"dtype")?a=e.dtype:a=O3(r),Je(e,"shape")){if(f=e.shape,typeof f=="number"&&(f=[f]),!D9(f))throw new TypeError(ei("invalid option. `%s` option must be a nonnegative integer or an array of nonnegative integers. Option: `%s`.","shape",f))}else f=T3(r);Je(e,"order")?i=e.order:i=I3(r),Je(e,"mode")&&(t.mode=e.mode),Je(e,"submode")&&(t.submode=e.submode),Je(e,"readonly")&&(t.readonly=e.readonly)}else a=O3(r),f=T3(r),i=I3(r);if(s=f.length,s>0?(o=V9(f),u=C9(f,i)):(o=1,u=[0]),v=z9(a,o),v===null)throw new TypeError(ei("invalid argument. First argument must have a recognized data type. Value: `%s`.",a));return new P9(a,v,f,u,L9(f,u),i,t)}k3.exports=M9});var R3=I(function(WZ,N3){"use strict";var B9=A3();N3.exports=B9});var Rr=require("@stdlib/utils/define-read-only-property"),kr={};Rr(kr,"array",au());Rr(kr,"base",uq());Rr(kr,"broadcastArray",$i());Rr(kr,"ndarrayCastingModes",ci());Rr(kr,"ndarray",ne());Rr(kr,"ndarrayDataBuffer",aa());Rr(kr,"defaults",le());Rr(kr,"dispatch",bq());Rr(kr,"ndarrayDataType",Ie());Rr(kr,"ndarrayDataTypes",Fr());Rr(kr,"ndempty",Tq());Rr(kr,"ndemptyLike",Cq());Rr(kr,"FancyArray",Tg());Rr(kr,"scalar2ndarray",ft());Rr(kr,"ind2sub",Mg());Rr(kr,"ndarrayIndexModes",Te());Rr(kr,"iter",Ex());Rr(kr,"maybeBroadcastArray",Ax());Rr(kr,"ndarrayMinDataType",nt());Rr(kr,"ndims",bi());Rr(kr,"ndarrayNextDataType",Lx());Rr(kr,"numel",Bx());Rr(kr,"ndarrayOffset",ea());Rr(kr,"ndarrayOrder",ke());Rr(kr,"ndarrayOrders",Oe());Rr(kr,"ndarrayOutputDataTypePolicies",Va());Rr(kr,"ndarrayPromotionRules",Zx());Rr(kr,"ndarraySafeCasts",pi());Rr(kr,"ndarraySameKindCasts",mi());Rr(kr,"ndarrayShape",Zr());Rr(kr,"ndslice",$x());Rr(kr,"ndsliceAssign",s3());Rr(kr,"ndsliceDimension",f3());Rr(kr,"ndarrayStrides",Ve());Rr(kr,"sub2ind",x3());Rr(kr,"ndarray2array",bt());Rr(kr,"ndzeros",E3());Rr(kr,"ndzerosLike",R3());module.exports=kr; /** * @license Apache-2.0 * diff --git a/dist/index.js.map b/dist/index.js.map index e54e6927..d039dffc 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1,7 +1,7 @@ { "version": 3, - "sources": ["../base/shape2strides/lib/main.js", "../base/shape2strides/lib/assign.js", "../base/shape2strides/lib/index.js", "../base/strides2offset/lib/main.js", "../base/strides2offset/lib/index.js", "../base/strides2order/lib/main.js", "../base/strides2order/lib/index.js", "../base/numel/lib/main.js", "../base/numel/lib/index.js", "../orders/lib/orders.json", "../orders/lib/main.js", "../orders/lib/enum.js", "../orders/lib/index.js", "../base/assert/is-order/lib/main.js", "../base/assert/is-order/lib/index.js", "../dtypes/lib/dtypes.json", "../dtypes/lib/main.js", "../dtypes/lib/enum.js", "../dtypes/lib/assign.js", "../dtypes/lib/index.js", "../base/assert/is-data-type/lib/main.js", "../base/assert/is-data-type/lib/index.js", "../base/minmax-view-buffer-index/lib/main.js", "../base/minmax-view-buffer-index/lib/assign.js", "../base/minmax-view-buffer-index/lib/index.js", "../base/assert/is-buffer-length-compatible/lib/main.js", "../base/assert/is-buffer-length-compatible/lib/index.js", "../base/bytes-per-element/lib/bytes_per_element.json", "../base/bytes-per-element/lib/main.js", "../base/bytes-per-element/lib/index.js", "../base/iteration-order/lib/main.js", "../base/iteration-order/lib/index.js", "../base/ctor/lib/is_column_major_contiguous.js", "../base/ctor/lib/is_row_major_contiguous.js", "../base/ctor/lib/is_contiguous.js", "../base/ctor/lib/copy_flags.js", "../base/ctor/lib/iget.js", "../base/ctor/lib/iset.js", "../base/ctor/lib/set.js", "../base/ctor/lib/get.js", "../base/ctor/lib/tojson.js", "../base/ctor/lib/tostring.js", "../index-modes/lib/modes.json", "../index-modes/lib/main.js", "../index-modes/lib/enum.js", "../index-modes/lib/index.js", "../base/ctor/lib/meta2dataview.js", "../base/ctor/lib/meta2dataview.polyfill.js", "../base/ctor/lib/main.js", "../base/ctor/lib/index.js", "../defaults/lib/main.js", "../defaults/lib/get.js", "../defaults/lib/index.js", "../base/clamp-index/lib/main.js", "../base/clamp-index/lib/index.js", "../base/wrap-index/lib/main.js", "../base/wrap-index/lib/index.js", "../base/ind/lib/main.js", "../base/ind/lib/index.js", "../ctor/lib/iget.js", "../ctor/lib/iset.js", "../ctor/lib/get.js", "../ctor/lib/set.js", "../ctor/lib/copy_array.js", "../base/assert/is-index-mode/lib/main.js", "../base/assert/is-index-mode/lib/index.js", "../ctor/lib/validate.js", "../ctor/lib/main.js", "../ctor/lib/index.js", "../casting-modes/lib/modes.json", "../casting-modes/lib/main.js", "../casting-modes/lib/enum.js", "../casting-modes/lib/index.js", "../base/assert/is-casting-mode/lib/main.js", "../base/assert/is-casting-mode/lib/index.js", "../base/dtype-enum2str/lib/main.js", "../base/dtype-enum2str/lib/index.js", "../base/dtype-str2enum/lib/main.js", "../base/dtype-str2enum/lib/index.js", "../base/dtype-resolve-str/lib/main.js", "../base/dtype-resolve-str/lib/index.js", "../safe-casts/lib/safe_casts.json", "../safe-casts/lib/main.js", "../safe-casts/lib/index.js", "../base/assert/is-safe-data-type-cast/lib/main.js", "../base/assert/is-safe-data-type-cast/lib/index.js", "../same-kind-casts/lib/same_kind_casts.json", "../same-kind-casts/lib/main.js", "../same-kind-casts/lib/index.js", "../base/assert/is-same-kind-data-type-cast/lib/main.js", "../base/assert/is-same-kind-data-type-cast/lib/index.js", "../base/assert/is-allowed-data-type-cast/lib/main.js", "../base/assert/is-allowed-data-type-cast/lib/index.js", "../base/buffer-ctors/lib/ctors.js", "../base/buffer-ctors/lib/main.js", "../base/buffer-ctors/lib/index.js", "../base/buffer/lib/zeros.js", "../base/buffer/lib/main.js", "../base/buffer/lib/index.js", "../base/buffer-dtype/lib/ctor2dtype.js", "../base/buffer-dtype/lib/ctors.js", "../base/buffer-dtype/lib/dtypes.js", "../base/buffer-dtype/lib/main.js", "../base/buffer-dtype/lib/index.js", "../dtype/lib/main.js", "../dtype/lib/index.js", "../shape/lib/main.js", "../shape/lib/index.js", "../strides/lib/main.js", "../strides/lib/index.js", "../offset/lib/main.js", "../offset/lib/index.js", "../ndims/lib/main.js", "../ndims/lib/index.js", "../order/lib/main.js", "../order/lib/index.js", "../data-buffer/lib/main.js", "../data-buffer/lib/index.js", "../array/lib/is_array_like_object.js", "../array/lib/defaults.js", "../array/lib/cast_buffer.js", "../array/lib/copy_view.js", "../array/lib/expand_shape.js", "../array/lib/expand_strides.js", "../array/lib/main.js", "../array/lib/index.js", "../base/assert/is-buffer-length-compatible-shape/lib/main.js", "../base/assert/is-buffer-length-compatible-shape/lib/index.js", "../base/assert/is-column-major/lib/main.js", "../base/assert/is-column-major/lib/index.js", "../base/assert/is-single-segment-compatible/lib/main.js", "../base/assert/is-single-segment-compatible/lib/index.js", "../base/assert/is-column-major-contiguous/lib/main.js", "../base/assert/is-column-major-contiguous/lib/index.js", "../base/assert/is-complex-floating-point-data-type/lib/main.js", "../base/assert/is-complex-floating-point-data-type/lib/index.js", "../base/assert/is-contiguous/lib/main.js", "../base/assert/is-contiguous/lib/index.js", "../base/assert/is-floating-point-data-type/lib/main.js", "../base/assert/is-floating-point-data-type/lib/index.js", "../base/assert/is-integer-data-type/lib/main.js", "../base/assert/is-integer-data-type/lib/index.js", "../base/assert/is-numeric-data-type/lib/main.js", "../base/assert/is-numeric-data-type/lib/index.js", "../base/assert/is-read-only/lib/main.js", "../base/assert/is-read-only/lib/index.js", "../base/assert/is-real-data-type/lib/main.js", "../base/assert/is-real-data-type/lib/index.js", "../base/assert/is-real-floating-point-data-type/lib/main.js", "../base/assert/is-real-floating-point-data-type/lib/index.js", "../base/assert/is-row-major/lib/main.js", "../base/assert/is-row-major/lib/index.js", "../base/assert/is-row-major-contiguous/lib/main.js", "../base/assert/is-row-major-contiguous/lib/index.js", "../base/assert/is-signed-integer-data-type/lib/main.js", "../base/assert/is-signed-integer-data-type/lib/index.js", "../base/assert/is-unsigned-integer-data-type/lib/main.js", "../base/assert/is-unsigned-integer-data-type/lib/index.js", "../base/assert/lib/index.js", "../base/binary-loop-interchange-order/lib/sort2ins.js", "../base/binary-loop-interchange-order/lib/main.js", "../base/binary-loop-interchange-order/lib/index.js", "../base/binary-tiling-block-size/lib/defaults.js", "../base/binary-tiling-block-size/lib/main.js", "../base/binary-tiling-block-size/lib/index.js", "../base/bind2vind/lib/main.js", "../base/bind2vind/lib/index.js", "../base/shape/lib/main.js", "../base/shape/lib/index.js", "../base/strides/lib/main.js", "../base/strides/lib/index.js", "../base/offset/lib/main.js", "../base/offset/lib/index.js", "../base/order/lib/main.js", "../base/order/lib/index.js", "../base/dtype/lib/main.js", "../base/dtype/lib/index.js", "../base/data-buffer/lib/main.js", "../base/data-buffer/lib/index.js", "../base/broadcast-array/lib/main.js", "../base/broadcast-array/lib/index.js", "../base/broadcast-scalar/lib/main.js", "../base/broadcast-scalar/lib/index.js", "../base/broadcast-shapes/lib/main.js", "../base/broadcast-shapes/lib/index.js", "../base/buffer-dtype-enum/lib/main.js", "../base/buffer-dtype-enum/lib/index.js", "../base/dtype-char/lib/table.js", "../base/dtype-char/lib/main.js", "../base/dtype-char/lib/index.js", "../base/char2dtype/lib/main.js", "../base/char2dtype/lib/index.js", "../base/dtype-desc/lib/table.js", "../base/dtype-desc/lib/main.js", "../base/dtype-desc/lib/index.js", "../base/dtype-resolve-enum/lib/main.js", "../base/dtype-resolve-enum/lib/index.js", "../base/dtype2c/lib/table.json", "../base/dtype2c/lib/main.js", "../base/dtype2c/lib/index.js", "../base/dtypes2signatures/lib/main.js", "../base/dtypes2signatures/lib/index.js", "../base/empty/lib/main.js", "../base/empty/lib/index.js", "../base/empty-like/lib/main.js", "../base/empty-like/lib/index.js", "../base/expand-dimensions/lib/main.js", "../base/expand-dimensions/lib/index.js", "../base/from-scalar/lib/main.js", "../base/from-scalar/lib/index.js", "../base/ind2sub/lib/assign.js", "../base/ind2sub/lib/main.js", "../base/ind2sub/lib/index.js", "../base/max-view-buffer-index/lib/main.js", "../base/max-view-buffer-index/lib/index.js", "../base/maybe-broadcast-array/lib/main.js", "../base/maybe-broadcast-array/lib/index.js", "../base/meta-data-props/lib/main.js", "../base/meta-data-props/lib/index.js", "../base/min-view-buffer-index/lib/main.js", "../base/min-view-buffer-index/lib/index.js", "../base/ndarraylike2object/lib/main.js", "../base/ndarraylike2object/lib/index.js", "../base/ndims/lib/main.js", "../base/ndims/lib/index.js", "../base/next-cartesian-index/lib/assign.js", "../base/next-cartesian-index/lib/main.js", "../base/next-cartesian-index/lib/index.js", "../base/nonsingleton-dimensions/lib/main.js", "../base/nonsingleton-dimensions/lib/index.js", "../base/nullary-loop-interchange-order/lib/sort2ins.js", "../base/nullary-loop-interchange-order/lib/main.js", "../base/nullary-loop-interchange-order/lib/index.js", "../base/nullary-tiling-block-size/lib/defaults.js", "../base/nullary-tiling-block-size/lib/main.js", "../base/nullary-tiling-block-size/lib/index.js", "../base/nullary/lib/2d_blocked_accessors.js", "../base/nullary/lib/3d_blocked_accessors.js", "../base/nullary/lib/4d_blocked_accessors.js", "../base/nullary/lib/5d_blocked_accessors.js", "../base/nullary/lib/6d_blocked_accessors.js", "../base/nullary/lib/7d_blocked_accessors.js", "../base/nullary/lib/8d_blocked_accessors.js", "../base/nullary/lib/9d_blocked_accessors.js", "../base/nullary/lib/10d_blocked_accessors.js", "../base/nullary/lib/2d_blocked.js", "../base/nullary/lib/3d_blocked.js", "../base/nullary/lib/4d_blocked.js", "../base/nullary/lib/5d_blocked.js", "../base/nullary/lib/6d_blocked.js", "../base/nullary/lib/7d_blocked.js", "../base/nullary/lib/8d_blocked.js", "../base/nullary/lib/9d_blocked.js", "../base/nullary/lib/10d_blocked.js", "../base/nullary/lib/0d_accessors.js", "../base/nullary/lib/1d_accessors.js", "../base/nullary/lib/2d_accessors.js", "../base/nullary/lib/3d_accessors.js", "../base/nullary/lib/4d_accessors.js", "../base/nullary/lib/5d_accessors.js", "../base/nullary/lib/6d_accessors.js", "../base/nullary/lib/7d_accessors.js", "../base/nullary/lib/8d_accessors.js", "../base/nullary/lib/9d_accessors.js", "../base/nullary/lib/10d_accessors.js", "../base/vind2bind/lib/main.js", "../base/vind2bind/lib/index.js", "../base/nullary/lib/nd_accessors.js", "../base/nullary/lib/0d.js", "../base/nullary/lib/1d.js", "../base/nullary/lib/2d.js", "../base/nullary/lib/3d.js", "../base/nullary/lib/4d.js", "../base/nullary/lib/5d.js", "../base/nullary/lib/6d.js", "../base/nullary/lib/7d.js", "../base/nullary/lib/8d.js", "../base/nullary/lib/9d.js", "../base/nullary/lib/10d.js", "../base/nullary/lib/nd.js", "../base/nullary/lib/main.js", "../base/nullary/lib/index.js", "../output-dtype-policies/lib/policies.json", "../output-dtype-policies/lib/main.js", "../output-dtype-policies/lib/enum.js", "../output-dtype-policies/lib/assign.js", "../output-dtype-policies/lib/index.js", "../base/output-policy-enum2str/lib/main.js", "../base/output-policy-enum2str/lib/index.js", "../base/output-policy-str2enum/lib/main.js", "../base/output-policy-str2enum/lib/index.js", "../base/output-policy-resolve-enum/lib/main.js", "../base/output-policy-resolve-enum/lib/index.js", "../base/output-policy-resolve-str/lib/main.js", "../base/output-policy-resolve-str/lib/index.js", "../base/prepend-singleton-dimensions/lib/main.js", "../base/prepend-singleton-dimensions/lib/index.js", "../base/remove-singleton-dimensions/lib/main.js", "../base/remove-singleton-dimensions/lib/index.js", "../base/serialize-meta-data/lib/main.js", "../base/serialize-meta-data/lib/polyfill.js", "../base/serialize-meta-data/lib/index.js", "../base/singleton-dimensions/lib/main.js", "../base/singleton-dimensions/lib/index.js", "../base/slice/lib/slice_start.js", "../base/slice/lib/slice_strides.js", "../base/slice/lib/empty.js", "../base/slice/lib/main.js", "../base/slice/lib/index.js", "../base/unary-loop-interchange-order/lib/sort2ins.js", "../base/unary-loop-interchange-order/lib/main.js", "../base/unary-loop-interchange-order/lib/index.js", "../base/unary-tiling-block-size/lib/defaults.js", "../base/unary-tiling-block-size/lib/main.js", "../base/unary-tiling-block-size/lib/index.js", "../base/unary/lib/2d_blocked_accessors.js", "../base/unary/lib/3d_blocked_accessors.js", "../base/unary/lib/4d_blocked_accessors.js", "../base/unary/lib/5d_blocked_accessors.js", "../base/unary/lib/6d_blocked_accessors.js", "../base/unary/lib/7d_blocked_accessors.js", "../base/unary/lib/8d_blocked_accessors.js", "../base/unary/lib/9d_blocked_accessors.js", "../base/unary/lib/10d_blocked_accessors.js", "../base/unary/lib/2d_blocked.js", "../base/unary/lib/3d_blocked.js", "../base/unary/lib/4d_blocked.js", "../base/unary/lib/5d_blocked.js", "../base/unary/lib/6d_blocked.js", "../base/unary/lib/7d_blocked.js", "../base/unary/lib/8d_blocked.js", "../base/unary/lib/9d_blocked.js", "../base/unary/lib/10d_blocked.js", "../base/unary/lib/0d_accessors.js", "../base/unary/lib/1d_accessors.js", "../base/unary/lib/2d_accessors.js", "../base/unary/lib/3d_accessors.js", "../base/unary/lib/4d_accessors.js", "../base/unary/lib/5d_accessors.js", "../base/unary/lib/6d_accessors.js", "../base/unary/lib/7d_accessors.js", "../base/unary/lib/8d_accessors.js", "../base/unary/lib/9d_accessors.js", "../base/unary/lib/10d_accessors.js", "../base/unary/lib/nd_accessors.js", "../base/unary/lib/0d.js", "../base/unary/lib/1d.js", "../base/unary/lib/2d.js", "../base/unary/lib/3d.js", "../base/unary/lib/4d.js", "../base/unary/lib/5d.js", "../base/unary/lib/6d.js", "../base/unary/lib/7d.js", "../base/unary/lib/8d.js", "../base/unary/lib/9d.js", "../base/unary/lib/10d.js", "../base/unary/lib/nd.js", "../base/unary/lib/main.js", "../base/unary/lib/index.js", "../base/slice-assign/lib/main.js", "../base/slice-assign/lib/index.js", "../base/slice-dimension/lib/main.js", "../base/slice-dimension/lib/index.js", "../base/sub2ind/lib/main.js", "../base/sub2ind/lib/index.js", "../base/to-array/lib/recurse.js", "../base/to-array/lib/main.js", "../base/to-array/lib/index.js", "../base/transpose/lib/main.js", "../base/transpose/lib/index.js", "../base/unary-by/lib/2d_blocked_accessors.js", "../base/unary-by/lib/3d_blocked_accessors.js", "../base/unary-by/lib/4d_blocked_accessors.js", "../base/unary-by/lib/5d_blocked_accessors.js", "../base/unary-by/lib/6d_blocked_accessors.js", "../base/unary-by/lib/7d_blocked_accessors.js", "../base/unary-by/lib/8d_blocked_accessors.js", "../base/unary-by/lib/9d_blocked_accessors.js", "../base/unary-by/lib/10d_blocked_accessors.js", "../base/unary-by/lib/2d_blocked.js", "../base/unary-by/lib/3d_blocked.js", "../base/unary-by/lib/4d_blocked.js", "../base/unary-by/lib/5d_blocked.js", "../base/unary-by/lib/6d_blocked.js", "../base/unary-by/lib/7d_blocked.js", "../base/unary-by/lib/8d_blocked.js", "../base/unary-by/lib/9d_blocked.js", "../base/unary-by/lib/10d_blocked.js", "../base/unary-by/lib/0d_accessors.js", "../base/unary-by/lib/1d_accessors.js", "../base/unary-by/lib/2d_accessors.js", "../base/unary-by/lib/3d_accessors.js", "../base/unary-by/lib/4d_accessors.js", "../base/unary-by/lib/5d_accessors.js", "../base/unary-by/lib/6d_accessors.js", "../base/unary-by/lib/7d_accessors.js", "../base/unary-by/lib/8d_accessors.js", "../base/unary-by/lib/9d_accessors.js", "../base/unary-by/lib/10d_accessors.js", "../base/unary-by/lib/nd_accessors.js", "../base/unary-by/lib/0d.js", "../base/unary-by/lib/1d.js", "../base/unary-by/lib/2d.js", "../base/unary-by/lib/3d.js", "../base/unary-by/lib/4d.js", "../base/unary-by/lib/5d.js", "../base/unary-by/lib/6d.js", "../base/unary-by/lib/7d.js", "../base/unary-by/lib/8d.js", "../base/unary-by/lib/9d.js", "../base/unary-by/lib/10d.js", "../base/unary-by/lib/nd.js", "../base/unary-by/lib/main.js", "../base/unary-by/lib/index.js", "../base/unary-output-dtype/lib/main.js", "../base/unary-output-dtype/lib/index.js", "../base/zeros/lib/main.js", "../base/zeros/lib/index.js", "../base/zeros-like/lib/main.js", "../base/zeros-like/lib/index.js", "../base/lib/index.js", "../broadcast-array/lib/main.js", "../broadcast-array/lib/index.js", "../dispatch/lib/index_of_types.js", "../dispatch/lib/main.js", "../dispatch/lib/index.js", "../empty/lib/main.js", "../empty/lib/index.js", "../empty-like/lib/main.js", "../empty-like/lib/index.js", "../fancy/lib/re_integer.js", "../fancy/lib/re_subseq.js", "../fancy/lib/prop2slice.0d.js", "../fancy/lib/prop2slice.1d.js", "../fancy/lib/prop2slice.nd.js", "../fancy/lib/has_property.js", "../fancy/lib/get_value.js", "../fancy/lib/error_message.js", "../fancy/lib/error_constructor.js", "../fancy/lib/get_slice.js", "../fancy/lib/get.js", "../fancy/lib/set_value.js", "../min-dtype/lib/main.js", "../min-dtype/lib/index.js", "../from-scalar/lib/main.js", "../from-scalar/lib/index.js", "../fancy/lib/set_slice.js", "../fancy/lib/set.js", "../fancy/lib/main.js", "../fancy/lib/index.js", "../ind2sub/lib/defaults.json", "../ind2sub/lib/validate.js", "../ind2sub/lib/main.js", "../ind2sub/lib/assign.js", "../ind2sub/lib/index.js", "../iter/columns/lib/main.js", "../iter/columns/lib/index.js", "../iter/entries/lib/main.js", "../iter/entries/lib/index.js", "../iter/indices/lib/main.js", "../iter/indices/lib/index.js", "../iter/rows/lib/main.js", "../iter/rows/lib/index.js", "../to-array/lib/main.js", "../to-array/lib/index.js", "../iter/to-array-each/lib/main.js", "../iter/to-array-each/lib/index.js", "../iter/values/lib/main.js", "../iter/values/lib/index.js", "../iter/lib/index.js", "../maybe-broadcast-array/lib/main.js", "../maybe-broadcast-array/lib/index.js", "../next-dtype/lib/next_dtypes.json", "../next-dtype/lib/main.js", "../next-dtype/lib/index.js", "../numel/lib/main.js", "../numel/lib/index.js", "../promotion-rules/lib/promotion_rules.json", "../promotion-rules/lib/main.js", "../promotion-rules/lib/index.js", "../slice/lib/main.js", "../slice/lib/index.js", "../slice-assign/lib/main.js", "../slice-assign/lib/index.js", "../sub2ind/lib/defaults.json", "../sub2ind/lib/validate.js", "../sub2ind/lib/main.js", "../sub2ind/lib/index.js", "../zeros/lib/main.js", "../zeros/lib/index.js", "../zeros-like/lib/main.js", "../zeros-like/lib/index.js", "../lib/index.js"], - "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Generates a stride array from an array shape (row-major).\n*\n* @private\n* @param {NonNegativeIntegerArray} shape - array shape\n* @returns {Array} array strides\n*/\nfunction rowmajor( shape ) {\n\tvar ndims;\n\tvar out;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\tout = [];\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tout.push( 0 );\n\t}\n\ts = 1;\n\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\tout[ i ] = s;\n\t\ts *= shape[ i ];\n\t}\n\treturn out;\n}\n\n/**\n* Generates a stride array from an array shape (column-major).\n*\n* @private\n* @param {NonNegativeIntegerArray} shape - array shape\n* @returns {Array} array strides\n*/\nfunction columnmajor( shape ) {\n\tvar out;\n\tvar s;\n\tvar i;\n\n\tout = [];\n\ts = 1;\n\tfor ( i = 0; i < shape.length; i++ ) {\n\t\tout.push( s );\n\t\ts *= shape[ i ];\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates a stride array from an array shape.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @returns {Array} array strides\n*\n* @example\n* var s = shape2strides( [ 3, 2 ], 'row-major' );\n* // returns [ 2, 1 ]\n*\n* s = shape2strides( [ 3, 2 ], 'column-major' );\n* // returns [ 1, 3 ]\n*/\nfunction shape2strides( shape, order ) {\n\tif ( order === 'column-major' ) {\n\t\treturn columnmajor( shape );\n\t}\n\treturn rowmajor( shape );\n}\n\n\n// EXPORTS //\n\nmodule.exports = shape2strides;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Generates a stride array from an array shape (row-major).\n*\n* @private\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {(Array|TypedArray|Object)} out - output object\n* @returns {(Array|TypedArray|Object)} array strides\n*/\nfunction rowmajor( shape, out ) {\n\tvar ndims;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\ts = 1;\n\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\tout[ i ] = s;\n\t\ts *= shape[ i ];\n\t}\n\treturn out;\n}\n\n/**\n* Generates a stride array from an array shape (column-major).\n*\n* @private\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {(Array|TypedArray|Object)} out - output object\n* @returns {(Array|TypedArray|Object)} array strides\n*/\nfunction columnmajor( shape, out ) {\n\tvar s;\n\tvar i;\n\n\ts = 1;\n\tfor ( i = 0; i < shape.length; i++ ) {\n\t\tout[ i ] = s;\n\t\ts *= shape[ i ];\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates a stride array from an array shape.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {(Array|TypedArray|Object)} out - output object\n* @returns {(Array|TypedArray|Object)} array strides\n*\n* @example\n* var strides = [ 0, 0 ];\n*\n* var out = shape2strides( [ 3, 2 ], 'row-major', strides );\n* // returns [ 2, 1 ]\n*\n* var bool = ( out === strides );\n* // returns true\n*\n* out = shape2strides( [ 3, 2 ], 'column-major', strides );\n* // returns [ 1, 3 ]\n*/\nfunction shape2strides( shape, order, out ) {\n\tif ( order === 'column-major' ) {\n\t\treturn columnmajor( shape, out );\n\t}\n\treturn rowmajor( shape, out );\n}\n\n\n// EXPORTS //\n\nmodule.exports = shape2strides;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Generate a stride array from an array shape.\n*\n* @module @stdlib/ndarray/base/shape2strides\n*\n* @example\n* var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );\n*\n* var strides = shape2strides( [ 3, 2 ], 'row-major' );\n* // returns [ 2, 1 ]\n*\n* strides = shape2strides( [ 3, 2 ], 'column-major' );\n* // returns [ 1, 3 ]\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar assign = require( './assign.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the index offset which specifies the location of the first indexed value in a multidimensional array based on a stride array.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @returns {NonNegativeInteger} offset - offset\n*\n* @example\n* var shape = [ 2, 3, 10 ];\n* var strides = [ 30, -10, 1 ];\n*\n* var offset = strides2offset( shape, strides );\n* // returns 20\n*/\nfunction strides2offset( shape, strides ) {\n\tvar offset;\n\tvar ndims;\n\tvar i;\n\n\tndims = shape.length;\n\toffset = 0;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tif ( strides[ i ] < 0 ) {\n\t\t\t// Note that, since the stride is negative, this operation increments, not decrements, the offset...\n\t\t\toffset -= strides[ i ] * ( shape[ i ]-1 );\n\t\t}\n\t}\n\treturn offset;\n}\n\n\n// EXPORTS //\n\nmodule.exports = strides2offset;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine the index offset which specifies the location of the first indexed value in a multidimensional array based on a stride array.\n*\n* @module @stdlib/ndarray/base/strides2offset\n*\n* @example\n* var strides2offset = require( '@stdlib/ndarray/base/strides2offset' );\n*\n* var shape = [ 2, 3, 10 ];\n* var strides = [ 30, -10, 1 ];\n*\n* var offset = strides2offset( shape, strides );\n* // returns 20\n*/\n\n// MODULES //\n\nvar strides2offset = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = strides2offset;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Determines the order of a multidimensional array based on a provided stride array.\n*\n* @param {IntegerArray} strides - stride array\n* @returns {integer} order\n*\n* @example\n* var strides2order = require( '@stdlib/ndarray/base/strides2order' );\n*\n* var order = strides2order( [ 2, 1 ] );\n* // returns 1\n*\n* order = strides2order( [ 1, 2 ] );\n* // returns 2\n*\n* order = strides2order( [ 1, 1, 1 ] );\n* // returns 3\n*\n* order = strides2order( [ 2, 3, 1 ] );\n* // returns 0\n*/\nfunction strides2order( strides ) {\n\tvar column;\n\tvar ndims;\n\tvar row;\n\tvar s1;\n\tvar s2;\n\tvar i;\n\n\tndims = strides.length;\n\tif ( ndims === 0 ) {\n\t\treturn 0|0; // 'none'\n\t}\n\tcolumn = true;\n\trow = true;\n\n\ts1 = abs( strides[ 0 ] );\n\tfor ( i = 1; i < ndims; i++ ) {\n\t\ts2 = abs( strides[ i ] );\n\t\tif ( column && s2 < s1 ) {\n\t\t\tcolumn = false;\n\t\t} else if ( row && s2 > s1 ) {\n\t\t\trow = false;\n\t\t}\n\t\tif ( row || column ) {\n\t\t\ts1 = s2;\n\t\t} else {\n\t\t\treturn 0|0; // 'none'\n\t\t}\n\t}\n\tif ( row && column ) {\n\t\treturn 3|0; // 'both'\n\t}\n\tif ( row ) {\n\t\treturn 1|0; // 'row-major'\n\t}\n\treturn 2|0; // 'column-major'\n}\n\n\n// EXPORTS //\n\nmodule.exports = strides2order;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine the order of a multidimensional array based on a provided stride array.\n*\n* @module @stdlib/ndarray/base/strides2order\n*\n* @example\n* var strides2order = require( '@stdlib/ndarray/base/strides2order' );\n*\n* var order = strides2order( [ 2, 1 ] );\n* // returns 1\n*\n* order = strides2order( [ 1, 2 ] );\n* // returns 2\n*\n* order = strides2order( [ 1, 1, 1 ] );\n* // returns 3\n*\n* order = strides2order( [ 2, 3, 1 ] );\n* // returns 0\n*/\n\n// MODULES //\n\nvar strides2order = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = strides2order;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the number of elements in an array.\n*\n* @param {(NonNegativeIntegerArray|EmptyArray)} shape - array shape\n* @returns {NonNegativeInteger} number of elements\n*\n* @example\n* var n = numel( [ 3, 3, 3 ] );\n* // returns 27\n*/\nfunction numel( shape ) {\n\tvar ndims;\n\tvar n;\n\tvar i;\n\n\tndims = shape.length;\n\tif ( ndims === 0 ) {\n\t\treturn 0;\n\t}\n\tn = 1;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tn *= shape[ i ];\n\t}\n\treturn n;\n}\n\n\n// EXPORTS //\n\nmodule.exports = numel;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the number of elements in an array.\n*\n* @module @stdlib/ndarray/base/numel\n*\n* @example\n* var numel = require( '@stdlib/ndarray/base/numel' );\n*\n* var n = numel( [ 3, 3, 3 ] );\n* // returns 27\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "[\n\t\"row-major\",\n\t\"column-major\"\n]\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar ORDERS = require( './orders.json' );\n\n\n// MAIN //\n\n/**\n* Returns a list of ndarray orders.\n*\n* @returns {StringArray} list of ndarray orders\n*\n* @example\n* var list = orders();\n* // returns [ 'row-major', 'column-major' ]\n*/\nfunction orders() {\n\treturn ORDERS.slice();\n}\n\n\n// EXPORTS //\n\nmodule.exports = orders;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an object mapping supported orders to integer values for purposes of C inter-operation.\n*\n* ## Notes\n*\n* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `row-major == 1`). Instead, the object should be used in an opaque manner.\n* - The main purpose of this function is JavaScript and C inter-operation of ndarray objects.\n*\n* @returns {Object} object mapping supported orders to integer values\n*\n* @example\n* var table = enumerated();\n* // returns \n*/\nfunction enumerated() {\n\t// NOTE: the following should match the C `orders.h` enumeration!!!!\n\treturn {\n\t\t// Row-major (C-style):\n\t\t'row-major': 1,\n\n\t\t// Column-major (Fortran-style):\n\t\t'column-major': 2\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = enumerated;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a list of ndarray orders.\n*\n* @module @stdlib/ndarray/orders\n*\n* @example\n* var orders = require( '@stdlib/ndarray/orders' );\n*\n* var list = orders();\n* // returns [ 'row-major', 'column-major' ]\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar enumeration = require( './enum.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'enum', enumeration );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar orders = require( './../../../../orders' );\n\n\n// VARIABLES //\n\nvar ORDERS = orders();\nvar len = ORDERS.length;\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is an ndarray order.\n*\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is an ndarray order\n*\n* @example\n* var bool = isOrder( 'row-major' );\n* // returns true\n*\n* bool = isOrder( 'column-major' );\n* // returns true\n*\n* bool = isOrder( 'foo' );\n* // returns false\n*/\nfunction isOrder( v ) {\n\tvar i;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tif ( v === ORDERS[ i ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nmodule.exports = isOrder;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test whether an input value is an ndarray order.\n*\n* @module @stdlib/ndarray/base/assert/is-order\n*\n* @example\n* var isOrder = require( '@stdlib/ndarray/base/assert/is-order' );\n*\n* var bool = isOrder( 'row-major' );\n* // returns true\n*\n* bool = isOrder( 'column-major' );\n* // returns true\n*\n* bool = isOrder( 'foo' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "{\n \"all\": [\n \"binary\",\n \"complex64\",\n \"complex128\",\n \"float32\",\n \"float64\",\n \"generic\",\n \"int16\",\n \"int32\",\n \"int8\",\n \"uint16\",\n \"uint32\",\n \"uint8\",\n \"uint8c\"\n ],\n \"floating_point\": [\n \"complex64\",\n \"complex128\",\n \"float32\",\n \"float64\"\n ],\n \"real_floating_point\": [\n \"float32\",\n \"float64\"\n ],\n \"complex_floating_point\": [\n \"complex64\",\n \"complex128\"\n ],\n \"integer\": [\n \"int16\",\n \"int32\",\n \"int8\",\n \"uint16\",\n \"uint32\",\n \"uint8\",\n \"uint8c\"\n ],\n \"signed_integer\": [\n \"int16\",\n \"int32\",\n \"int8\"\n ],\n \"unsigned_integer\": [\n \"uint16\",\n \"uint32\",\n \"uint8\",\n \"uint8c\"\n ],\n \"real\": [\n \"float32\",\n \"float64\",\n \"int16\",\n \"int32\",\n \"int8\",\n \"uint16\",\n \"uint32\",\n \"uint8\",\n \"uint8c\"\n ],\n \"numeric\": [\n \"complex64\",\n \"complex128\",\n \"float32\",\n \"float64\",\n \"int16\",\n \"int32\",\n \"int8\",\n \"uint16\",\n \"uint32\",\n \"uint8\",\n \"uint8c\"\n ]\n}\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar DTYPES = require( './dtypes.json' );\n\n\n// MAIN //\n\n/**\n* Returns a list of ndarray data types.\n*\n* @param {string} [kind] - data type kind\n* @returns {StringArray} list of ndarray data types\n*\n* @example\n* var list = dtypes();\n* // returns [...]\n*\n* @example\n* var list = dtypes( 'floating_point' );\n* // returns [...]\n*/\nfunction dtypes() {\n\tvar out;\n\tif ( arguments.length === 0 ) {\n\t\treturn DTYPES.all.slice();\n\t}\n\tout = DTYPES[ arguments[ 0 ] ];\n\treturn ( out ) ? out.slice() : [];\n}\n\n\n// EXPORTS //\n\nmodule.exports = dtypes;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable stdlib/empty-line-before-comment */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an object mapping supported data type strings to enumeration constants.\n*\n* ## Notes\n*\n* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `INT8 == 0`). Instead, the object should be used in an opaque manner.\n* - The main purpose of this function is JavaScript and C inter-operation of ndarray objects. While certain dtypes, such as \"generic\" and \"binary\", have special behavior in JavaScript, they do not have a direct complement in C.\n*\n* @private\n* @returns {Object} object mapping supported dtypes to enumeration constants\n*\n* @example\n* var table = enumeration();\n* // returns \n*/\nfunction enumeration() {\n\t// NOTE: the following should match the C `dtypes.h` enumeration!!!!\n\treturn {\n\t\t// Boolean data types:\n\t\t'bool': 0,\n\n\t\t// Integer data types:\n\t\t'int8': 1,\n\t\t'uint8': 2,\n\t\t'uint8c': 3,\n\t\t'int16': 4,\n\t\t'uint16': 5,\n\t\t'int32': 6,\n\t\t'uint32': 7,\n\t\t'int64': 8,\n\t\t'uint64': 9,\n\t\t// 'int128': 10, // uncomment once supported\n\t\t// 'uint128': 11,\n\t\t// 'int256': 12,\n\t\t// 'uint256': 13,\n\n\t\t// Floating-point data types:\n\t\t// 'float16': 14,\n\t\t// 'bfloat16': 15,\n\t\t'float32': 10,\n\t\t'float64': 11,\n\t\t// 'float128': 18, // uncomment once supported\n\n\t\t// Complex floating-point number data types:\n\t\t'complex64': 12,\n\t\t'complex128': 13,\n\n\t\t// Data type for \"binary\" data (i.e., data stored in a Node.js `Buffer` object):\n\t\t'binary': 14,\n\n\t\t// Data type for \"generic\" JavaScript values (objects):\n\t\t'generic': 15,\n\n\t\t// Define a signaling value which is guaranteed not to be a valid type enumeration value:\n\t\t'notype': 17,\n\n\t\t// Indicate the start of user defined type numbers (leaving room for type growth above):\n\t\t'userdefined_type': 256\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = enumeration;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-read-only-property' );\nvar objectKeys = require( '@stdlib/utils/keys' );\n\n\n// MAIN //\n\n/**\n* Copies all enumerable own properties from a source object to a target object as enumerable read-only properties.\n*\n* @private\n* @param {Object} target - target object\n* @param {Object} source - source object\n* @returns {Object} modified target object\n*\n* @example\n* var source = {\n* 'beep': 'boop'\n* };\n* var target = {};\n*\n* var out = assign( target, source );\n* // returns \n*\n* var bool = ( out === target );\n* // returns true\n*\n* var v = target.beep;\n* // returns 'boop'\n*/\nfunction assign( target, source ) {\n\tvar keys;\n\tvar k;\n\tvar i;\n\n\tkeys = objectKeys( source );\n\tfor ( i = 0; i < keys.length; i++ ) {\n\t\tk = keys[ i ];\n\t\tsetReadOnly( target, k, source[ k ] );\n\t}\n\treturn target;\n}\n\n\n// EXPORTS //\n\nmodule.exports = assign;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a list of ndarray data types.\n*\n* @module @stdlib/ndarray/dtypes\n*\n* @example\n* var dtypes = require( '@stdlib/ndarray/dtypes' );\n*\n* var list = dtypes();\n* // returns [...]\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar enumeration = require( './enum.js' );\nvar assign = require( './assign.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'enum', enumeration );\nassign( main, enumeration() );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar contains = require( '@stdlib/array/base/assert/contains' ).factory;\nvar dtypes = require( './../../../../dtypes' );\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray data type.\n*\n* @name isDataType\n* @type {Function}\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray data type\n*\n* @example\n* var bool = isDataType( 'binary' );\n* // returns true\n*\n* bool = isDataType( 'float32' );\n* // returns true\n*\n* bool = isDataType( 'float64' );\n* // returns true\n*\n* bool = isDataType( 'generic' );\n* // returns true\n*\n* bool = isDataType( 'int16' );\n* // returns true\n*\n* bool = isDataType( 'int32' );\n* // returns true\n*\n* bool = isDataType( 'int8' );\n* // returns true\n*\n* bool = isDataType( 'uint16' );\n* // returns true\n*\n* bool = isDataType( 'uint32' );\n* // returns true\n*\n* bool = isDataType( 'uint8' );\n* // returns true\n*\n* bool = isDataType( 'uint8c' );\n* // returns true\n*\n* bool = isDataType( 'foo' );\n* // returns false\n*/\nvar isDataType = contains( dtypes() );\n\n\n// EXPORTS //\n\nmodule.exports = isDataType;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test whether an input value is a supported ndarray data type.\n*\n* @module @stdlib/ndarray/base/assert/is-data-type\n*\n* @example\n* var isDataType = require( '@stdlib/ndarray/base/assert/is-data-type' );\n*\n* var bool = isDataType( 'binary' );\n* // returns true\n*\n* bool = isDataType( 'float32' );\n* // returns true\n*\n* bool = isDataType( 'float64' );\n* // returns true\n*\n* bool = isDataType( 'generic' );\n* // returns true\n*\n* bool = isDataType( 'int16' );\n* // returns true\n*\n* bool = isDataType( 'int32' );\n* // returns true\n*\n* bool = isDataType( 'int8' );\n* // returns true\n*\n* bool = isDataType( 'uint16' );\n* // returns true\n*\n* bool = isDataType( 'uint32' );\n* // returns true\n*\n* bool = isDataType( 'uint8' );\n* // returns true\n*\n* bool = isDataType( 'uint8c' );\n* // returns true\n*\n* bool = isDataType( 'foo' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Computes the minimum and maximum linear indices in an underlying data buffer which are accessible to an array view.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @returns {Array} linear indices\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ 10, 1 ];\n* var offset = 10;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 10, 109 ]\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ -10, -1 ];\n* var offset = 99;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 0, 99 ]\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ 1, 10 ];\n* var offset = 10;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 10, 109 ]\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ -1, -10 ];\n* var offset = 99;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 0, 99 ]\n*/\nfunction minmaxViewBufferIndex( shape, strides, offset ) {\n\tvar ndims;\n\tvar min;\n\tvar max;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\tmin = offset;\n\tmax = offset;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tif ( shape[ i ] === 0 ) {\n\t\t\treturn [ offset, offset ];\n\t\t}\n\t\ts = strides[ i ];\n\t\tif ( s > 0 ) {\n\t\t\tmax += s * ( shape[i]-1 );\n\t\t} else if ( s < 0 ) {\n\t\t\tmin += s * ( shape[i]-1 ); // decrements min\n\t\t}\n\t}\n\treturn [ min, max ];\n}\n\n\n// EXPORTS //\n\nmodule.exports = minmaxViewBufferIndex;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Computes the minimum and maximum linear indices in an underlying data buffer which are accessible to an array view and assigns results to a provided output array.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @param {(Array|TypedArray|Object)} out - output object\n* @returns {(Array|TypedArray|Object)} linear indices\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ 10, 1 ];\n* var offset = 10;\n*\n* var out = [ 0, 0 ];\n* var idx = minmaxViewBufferIndex( shape, strides, offset, out );\n* // returns [ 10, 109 ]\n*\n* var bool = ( idx === out );\n* // returns true\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ -10, -1 ];\n* var offset = 99;\n*\n* var out = [ 0, 0 ];\n* var idx = minmaxViewBufferIndex( shape, strides, offset, out );\n* // returns [ 0, 99 ]\n*\n* var bool = ( idx === out );\n* // returns true\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ 1, 10 ];\n* var offset = 10;\n*\n* var out = [ 0, 0 ];\n* var idx = minmaxViewBufferIndex( shape, strides, offset, out );\n* // returns [ 10, 109 ]\n*\n* var bool = ( idx === out );\n* // returns true\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ -1, -10 ];\n* var offset = 99;\n*\n* var out = [ 0, 0 ];\n* var idx = minmaxViewBufferIndex( shape, strides, offset, out );\n* // returns [ 0, 99 ]\n*\n* var bool = ( idx === out );\n* // returns true\n*/\nfunction minmaxViewBufferIndex( shape, strides, offset, out ) {\n\tvar ndims;\n\tvar min;\n\tvar max;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\tmin = offset;\n\tmax = offset;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tif ( shape[ i ] === 0 ) {\n\t\t\tout[ 0 ] = offset;\n\t\t\tout[ 1 ] = offset;\n\t\t\treturn out;\n\t\t}\n\t\ts = strides[ i ];\n\t\tif ( s > 0 ) {\n\t\t\tmax += s * ( shape[i]-1 );\n\t\t} else if ( s < 0 ) {\n\t\t\tmin += s * ( shape[i]-1 ); // decrements min\n\t\t}\n\t}\n\tout[ 0 ] = min;\n\tout[ 1 ] = max;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = minmaxViewBufferIndex;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Compute the minimum and maximum linear indices in an underlying data buffer which are accessible to an array view.\n*\n* @module @stdlib/ndarray/base/minmax-view-buffer-index\n*\n* @example\n* var minmaxViewBufferIndex = require( '@stdlib/ndarray/base/minmax-view-buffer-index' );\n*\n* var shape = [ 10, 10 ];\n* var strides = [ 10, 1 ];\n* var offset = 10;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 10, 109 ]\n*\n* @example\n* var minmaxViewBufferIndex = require( '@stdlib/ndarray/base/minmax-view-buffer-index' );\n*\n* var shape = [ 10, 10 ];\n* var strides = [ -10, -1 ];\n* var offset = 99;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 0, 99 ]\n*\n* @example\n* var minmaxViewBufferIndex = require( '@stdlib/ndarray/base/minmax-view-buffer-index' );\n*\n* var shape = [ 10, 10 ];\n* var strides = [ 1, 10 ];\n* var offset = 10;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 10, 109 ]\n*\n* @example\n* var minmaxViewBufferIndex = require( '@stdlib/ndarray/base/minmax-view-buffer-index' );\n*\n* var shape = [ 10, 10 ];\n* var strides = [ -1, -10 ];\n* var offset = 99;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 0, 99 ]\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar assign = require( './assign.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar minmax = require( './../../../../base/minmax-view-buffer-index' );\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data.\n*\n* @param {NonNegativeInteger} len - buffer length\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @returns {boolean} boolean indicating if a buffer length is compatible\n*\n* @example\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var bool = isBufferLengthCompatible( 4, shape, strides, offset );\n* // returns true\n*\n* @example\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 2;\n*\n* var bool = isBufferLengthCompatible( 4, shape, strides, offset );\n* // returns false\n*/\nfunction isBufferLengthCompatible( len, shape, strides, offset ) {\n\t// Determine the minimum and maximum linear indices which are accessible by the array view:\n\tvar buf = minmax( shape, strides, offset );\n\n\t// If the indices are \"inbounds\", then the buffer length is compatible:\n\treturn ( buf[ 0 ] >= 0 && buf[ 1 ] < len );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isBufferLengthCompatible;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a boolean indicating if a buffer length is compatible with provided ndarray meta data.\n*\n* @module @stdlib/ndarray/base/assert/is-buffer-length-compatible\n*\n* @example\n* var isBufferLengthCompatible = require( '@stdlib/ndarray/base/assert/is-buffer-length-compatible' );\n*\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var bool = isBufferLengthCompatible( 4, shape, strides, offset );\n* // returns true\n*\n* @example\n* var isBufferLengthCompatible = require( '@stdlib/ndarray/base/assert/is-buffer-length-compatible' );\n*\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 2;\n*\n* var bool = isBufferLengthCompatible( 4, shape, strides, offset );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "{\n\t\"binary\": 1,\n\t\"bool\": 1,\n\t\"complex64\": 8,\n\t\"complex128\": 16,\n\t\"float16\": 2,\n\t\"bfloat16\": 2,\n\t\"float32\": 4,\n\t\"float64\": 8,\n\t\"float128\": 16,\n\t\"generic\": null,\n\t\"int8\": 1,\n\t\"int16\": 2,\n\t\"int32\": 4,\n\t\"int64\": 8,\n\t\"int128\": 16,\n\t\"int256\": 32,\n\t\"uint8\": 1,\n\t\"uint8c\": 1,\n\t\"uint16\": 2,\n\t\"uint32\": 4,\n\t\"uint64\": 8,\n\t\"uint128\": 16,\n\t\"uint256\": 32\n}\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar BYTES_PER_ELEMENT = require( './bytes_per_element.json' );\n\n\n// MAIN //\n\n/**\n* Returns the number of bytes per element provided an underlying array data type.\n*\n* @param {string} dtype - data type\n* @returns {(NonNegativeInteger|null)} number of bytes per element\n*\n* @example\n* var nbytes = bytesPerElement( 'float64' );\n* // returns 8\n*\n* nbytes = bytesPerElement( 'generic' );\n* // returns null\n*/\nfunction bytesPerElement( dtype ) {\n\treturn BYTES_PER_ELEMENT[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = bytesPerElement;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the number of bytes per element provided an underlying array data type.\n*\n* @module @stdlib/ndarray/base/bytes-per-element\n*\n* @example\n* var bytesPerElement = require( '@stdlib/ndarray/base/bytes-per-element' );\n*\n* var nbytes = bytesPerElement( 'float64' );\n* // returns 8\n*\n* nbytes = bytesPerElement( 'generic' );\n* // returns null\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns array iteration order.\n*\n* ## Notes\n*\n* - Return value key:\n*\n* - `0`: unordered (i.e., strides of mixed sign; e.g., `[ 9, -3, 1 ]`)\n* - `1`: ordered left-to-right (i.e., all nonnegative strides)\n* - `-1`: ordered right-to-left (i.e., all negative strides)\n*\n* @param {IntegerArray} strides - stride array\n* @returns {integer} iteration order\n*\n* @example\n* var o = iterationOrder( [ 2, 1 ] );\n* // returns 1\n*\n* o = iterationOrder( [ -2, 1 ] );\n* // returns 0\n*\n* o = iterationOrder( [ -2, -1 ] );\n* // returns -1\n*/\nfunction iterationOrder( strides ) {\n\tvar cnt;\n\tvar i;\n\n\tcnt = 0;\n\tfor ( i = 0; i < strides.length; i++ ) {\n\t\tif ( strides[ i ] < 0 ) {\n\t\t\tcnt += 1;\n\t\t}\n\t}\n\tif ( cnt === 0 ) {\n\t\t// All nonnegative strides:\n\t\treturn 1|0; // asm-type annotation\n\t}\n\tif ( cnt === strides.length ) {\n\t\t// All negative strides:\n\t\treturn -1|0; // asm-type annotation\n\t}\n\t// Strides of mixed signs:\n\treturn 0|0; // asm-type annotation\n}\n\n\n// EXPORTS //\n\nmodule.exports = iterationOrder;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Given a stride array, determine array iteration order.\n*\n* @module @stdlib/ndarray/base/iteration-order\n*\n* @example\n* var iterationOrder = require( '@stdlib/ndarray/base/iteration-order' );\n*\n* var o = iterationOrder( [ 2, 1 ] );\n* // returns 1\n*\n* o = iterationOrder( [ -2, 1 ] );\n* // returns 0\n*\n* o = iterationOrder( [ -2, -1 ] );\n* // returns -1\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Determines if an array is column-major contiguous.\n*\n* @private\n* @param {integer} order - **inferred** array order\n* @param {boolean} contiguous - boolean indicating is an array is contiguous\n* @returns {boolean} boolean indicating if an array is column-major contiguous\n*/\nfunction isColumnMajorContiguous( order, contiguous ) {\n\treturn contiguous && ( order === 2 || order === 3 );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isColumnMajorContiguous;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Determines if an array is row-major contiguous.\n*\n* @private\n* @param {integer} order - **inferred** array order\n* @param {boolean} contiguous - boolean indicating is an array is contiguous\n* @returns {boolean} boolean indicating if an array is row-major contiguous\n*/\nfunction isRowMajorContiguous( order, contiguous ) {\n\treturn contiguous && ( order === 1 || order === 3 );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isRowMajorContiguous;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar minmaxViewBufferIndex = require( './../../../base/minmax-view-buffer-index' );\n\n\n// MAIN //\n\n/**\n* Determines if an array is contiguous.\n*\n* @private\n* @param {NonNegativeInteger} len - array length\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @param {integer} iterationOrder - iteration order\n* @returns {boolean} boolean indicating if an array is contiguous\n*/\nfunction isContiguous( len, shape, strides, offset, iterationOrder ) {\n\tvar buf;\n\n\t// If an array does not contain any elements, then no data to store, and, if the array is unordered, adjacent array elements are not guaranteed to be stored next to each other.\n\tif ( len === 0 || iterationOrder === 0 ) {\n\t\treturn false;\n\t}\n\t// Ensure that the array is compatible with a single memory segment:\n\tbuf = minmaxViewBufferIndex( shape, strides, offset );\n\treturn ( len === ( buf[1]-buf[0]+1 ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isContiguous;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Copies ndarray flags.\n*\n* @private\n* @param {Object} flags - flags\n* @returns {Object} copy of input object\n*/\nfunction copyFlags( flags ) {\n\treturn {\n\t\t'ROW_MAJOR_CONTIGUOUS': flags.ROW_MAJOR_CONTIGUOUS,\n\t\t'COLUMN_MAJOR_CONTIGUOUS': flags.COLUMN_MAJOR_CONTIGUOUS,\n\t\t'READONLY': flags.READONLY\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = copyFlags;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an array element located a specified linear view index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the input argument is ignored and, for clarity, should not be provided.\n*\n* @private\n* @param {integer} [idx] - linear view index\n* @returns {*} array element\n*/\nfunction iget( idx ) {\n\t/* eslint-disable no-invalid-this */\n\tvar strides;\n\tvar shape;\n\tvar ndims;\n\tvar ind;\n\tvar s;\n\tvar i;\n\n\tndims = this._ndims;\n\tif ( ndims === 0 ) {\n\t\tif ( this._accessors ) {\n\t\t\treturn this._buffer.get( this._offset );\n\t\t}\n\t\treturn this._buffer[ this._offset ];\n\t}\n\tif ( this._flags.ROW_MAJOR_CONTIGUOUS || this._flags.COLUMN_MAJOR_CONTIGUOUS ) { // eslint-disable-line max-len\n\t\t// Trivial case where we have all positive strides...\n\t\tif ( this._iterationOrder === 1 ) {\n\t\t\tif ( this._accessors ) {\n\t\t\t\treturn this._buffer.get( this._offset+idx );\n\t\t\t}\n\t\t\treturn this._buffer[ this._offset+idx ];\n\t\t}\n\t\t// Trivial case where we have all negative strides...\n\t\tif ( this._iterationOrder === -1 ) {\n\t\t\tif ( this._accessors ) {\n\t\t\t\treturn this._buffer.get( this.offset-idx );\n\t\t\t}\n\t\t\treturn this._buffer[ this._offset-idx ];\n\t\t}\n\t}\n\t// The approach which follows is to resolve a view index to its subscripts and then plug the subscripts into the standard formula for computing the linear index in the underlying data buffer...\n\tshape = this._shape;\n\tstrides = this._strides;\n\tind = this._offset;\n\tif ( this._order === 'column-major' ) {\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\ts = idx % shape[ i ];\n\t\t\tidx -= s;\n\t\t\tidx /= shape[ i ];\n\t\t\tind += s * strides[ i ];\n\t\t}\n\t\tif ( this._accessors ) {\n\t\t\treturn this._buffer.get( ind );\n\t\t}\n\t\treturn this._buffer[ ind ];\n\t}\n\t// Case: row-major\n\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\ts = idx % shape[ i ];\n\t\tidx -= s;\n\t\tidx /= shape[ i ];\n\t\tind += s * strides[ i ];\n\t}\n\tif ( this._accessors ) {\n\t\treturn this._buffer.get( ind );\n\t}\n\treturn this._buffer[ ind ];\n}\n\n\n// EXPORTS //\n\nmodule.exports = iget;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Sets an array element located a specified linear view index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the first, and only, argument should be the value to set.\n*\n* @private\n* @param {integer} [idx] - linear view index\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*/\nfunction iset( idx, v ) {\n\t/* eslint-disable no-invalid-this */\n\tvar strides;\n\tvar shape;\n\tvar ndims;\n\tvar ind;\n\tvar s;\n\tvar i;\n\n\tndims = this._ndims;\n\tif ( ndims === 0 ) {\n\t\tif ( this._accessors ) {\n\t\t\tthis._buffer.set( idx, this._offset );\n\t\t} else {\n\t\t\tthis._buffer[ this._offset ] = idx;\n\t\t}\n\t\treturn this;\n\t}\n\tif ( this._flags.ROW_MAJOR_CONTIGUOUS || this._flags.COLUMN_MAJOR_CONTIGUOUS ) { // eslint-disable-line max-len\n\t\t// Trivial case where we have all positive strides...\n\t\tif ( this._iterationOrder === 1 ) {\n\t\t\tif ( this._accessors ) {\n\t\t\t\tthis._buffer.set( v, this._offset+idx );\n\t\t\t} else {\n\t\t\t\tthis._buffer[ this._offset+idx ] = v;\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\t// Trivial case where we have all negative strides...\n\t\tif ( this._iterationOrder === -1 ) {\n\t\t\tif ( this._accessors ) {\n\t\t\t\tthis._buffer.set( v, this._offset-idx );\n\t\t\t} else {\n\t\t\t\tthis._buffer[ this._offset-idx ] = v;\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t}\n\t// The approach which follows is to resolve a view index to its subscripts and then plug the subscripts into the standard formula for computing the linear index in the underlying data buffer...\n\tshape = this._shape;\n\tstrides = this._strides;\n\tind = this._offset;\n\tif ( this._order === 'column-major' ) {\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\ts = idx % shape[ i ];\n\t\t\tidx -= s;\n\t\t\tidx /= shape[ i ];\n\t\t\tind += s * strides[ i ];\n\t\t}\n\t\tif ( this._accessors ) {\n\t\t\tthis._buffer.set( v, ind );\n\t\t} else {\n\t\t\tthis._buffer[ ind ] = v;\n\t\t}\n\t\treturn this;\n\t}\n\t// Case: row-major\n\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\ts = idx % shape[ i ];\n\t\tidx -= s;\n\t\tidx /= shape[ i ];\n\t\tind += s * strides[ i ];\n\t}\n\tif ( this._accessors ) {\n\t\tthis._buffer.set( v, ind );\n\t} else {\n\t\tthis._buffer[ ind ] = v;\n\t}\n\treturn this;\n}\n\n\n// EXPORTS //\n\nmodule.exports = iset;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @private\n* @param {...integer} [idx] - indices\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*/\nfunction set() {\n\t/* eslint-disable no-invalid-this */\n\tvar idx;\n\tvar i;\n\n\tidx = this._offset;\n\tfor ( i = 0; i < arguments.length-1; i++ ) {\n\t\tidx += this._strides[ i ] * arguments[ i ];\n\t}\n\tif ( this._accessors ) {\n\t\tthis._buffer.set( arguments[ i ], idx );\n\t} else {\n\t\tthis._buffer[ idx ] = arguments[ i ];\n\t}\n\treturn this;\n}\n\n\n// EXPORTS //\n\nmodule.exports = set;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @private\n* @param {...integer} idx - indices\n* @returns {*} array element\n*/\nfunction get() {\n\t/* eslint-disable no-invalid-this */\n\tvar idx;\n\tvar i;\n\n\tidx = this._offset;\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\tidx += this._strides[ i ] * arguments[ i ];\n\t}\n\tif ( this._accessors ) {\n\t\treturn this._buffer.get( idx );\n\t}\n\treturn this._buffer[ idx ];\n}\n\n\n// EXPORTS //\n\nmodule.exports = get;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar real = require( '@stdlib/complex/real' );\nvar imag = require( '@stdlib/complex/imag' );\n\n\n// MAIN //\n\n/**\n* Serializes an ndarray as a JSON object.\n*\n* ## Notes\n*\n* - The method does **not** serialize data outside of the buffer region defined by the array configuration.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out;\n\tvar len;\n\tvar v;\n\tvar i;\n\n\tlen = this._length;\n\n\t// Build an object containing all ndarray properties needed to revive a serialized ndarray...\n\tout = {};\n\tout.type = 'ndarray';\n\tout.dtype = this.dtype;\n\tout.flags = {\n\t\t'READONLY': this._flags.READONLY\n\t};\n\tout.order = this._order;\n\tout.shape = this._shape.slice();\n\tout.strides = this._strides.slice();\n\n\t// Flip the signs of negative strides:\n\tfor ( i = 0; i < len; i++ ) {\n\t\tif ( out.strides[ i ] < 0 ) {\n\t\t\tout.strides[ i ] *= -1;\n\t\t}\n\t}\n\t// Cast data to generic array...\n\tout.data = [];\n\tif ( out.dtype === 'complex64' || out.dtype === 'complex128' ) {\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tv = this.iget( i );\n\t\t\tout.data.push( real( v ), imag( v ) );\n\t\t}\n\t} else {\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tout.data.push( this.iget( i ) );\n\t\t}\n\t}\n\treturn out;\n\n\t/* eslint-enable no-invalid-this */\n}\n\n\n// EXPORTS //\n\nmodule.exports = toJSON;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar replace = require( '@stdlib/string/replace' );\nvar real = require( '@stdlib/complex/real' );\nvar imag = require( '@stdlib/complex/imag' );\n\n\n// VARIABLES //\n\nvar CTORS = {\n\t'int8': 'new Int8Array( [ {{data}} ] )',\n\t'uint8': 'new Uint8Array( [ {{data}} ] )',\n\t'uint8c': 'new Uint8ClampedArray( [ {{data}} ] )',\n\t'int16': 'new Int16Array( [ {{data}} ] )',\n\t'uint16': 'new Uint16Array( [ {{data}} ] )',\n\t'int32': 'new Int32Array( [ {{data}} ] )',\n\t'uint32': 'new Uint32Array( [ {{data}} ] )',\n\t'float32': 'new Float32Array( [ {{data}} ] )',\n\t'float64': 'new Float64Array( [ {{data}} ] )',\n\t'generic': '[ {{data}} ]',\n\t'binary': 'new Buffer( [ {{data}} ] )',\n\t'complex64': 'new Complex64Array( [ {{data}} ] )',\n\t'complex128': 'new Complex128Array( [ {{data}} ] )'\n};\n\n\n// MAIN //\n\n/**\n* Serializes an ndarray as a string.\n*\n* ## Notes\n*\n* - The method does **not** serialize data outside of the buffer region defined by the array configuration.\n*\n* @private\n* @returns {string} string representation\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar buffer;\n\tvar ndims;\n\tvar ctor;\n\tvar str;\n\tvar dt;\n\tvar v;\n\tvar i;\n\n\tndims = this._shape.length;\n\tdt = this._dtype;\n\n\t// Function to invoke to create an ndarray:\n\tstr = 'ndarray( \\''+dt+'\\', ';\n\n\t// Data buffer parameter...\n\tbuffer = '';\n\tif ( this._length <= 100 ) {\n\t\tif ( dt === 'complex64' || dt === 'complex128' ) {\n\t\t\tfor ( i = 0; i < this._length; i++ ) {\n\t\t\t\tv = this.iget( i );\n\t\t\t\tbuffer += real( v ) + ', ' + imag( v );\n\t\t\t\tif ( i < this._length-1 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i = 0; i < this._length; i++ ) {\n\t\t\t\tbuffer += this.iget( i );\n\t\t\t\tif ( i < this._length-1 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// First three values...\n\t\tif ( dt === 'complex64' || dt === 'complex128' ) {\n\t\t\tfor ( i = 0; i < 3; i++ ) {\n\t\t\t\tv = this.iget( i );\n\t\t\t\tbuffer += real( v ) + ', ' + imag( v );\n\t\t\t\tif ( i < 2 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i = 0; i < 3; i++ ) {\n\t\t\t\tbuffer += this.iget( i );\n\t\t\t\tif ( i < 2 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbuffer += ', ..., ';\n\n\t\t// Last three values...\n\t\tif ( dt === 'complex64' || dt === 'complex128' ) {\n\t\t\tfor ( i = 2; i >= 0; i-- ) {\n\t\t\t\tv = this.iget( this._length-1-i );\n\t\t\t\tbuffer += real( v ) + ', ' + imag( v );\n\t\t\t\tif ( i > 0 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i = 2; i >= 0; i-- ) {\n\t\t\t\tbuffer += this.iget( this._length-1-i );\n\t\t\t\tif ( i > 0 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tctor = CTORS[ this.dtype ];\n\tstr += replace( ctor, '{{data}}', buffer );\n\tstr += ', ';\n\n\t// Array shape...\n\tif ( ndims === 0 ) {\n\t\tstr += '[]';\n\t} else {\n\t\tstr += '[ ' + this._shape.join( ', ' ) + ' ]';\n\t}\n\tstr += ', ';\n\n\t// Stride array...\n\tstr += '[ ';\n\tif ( ndims === 0 ) {\n\t\tstr += '0';\n\t} else {\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\tif ( this._strides[ i ] < 0 ) {\n\t\t\t\tstr += -this._strides[ i ];\n\t\t\t} else {\n\t\t\t\tstr += this._strides[ i ];\n\t\t\t}\n\t\t\tif ( i < ndims-1 ) {\n\t\t\t\tstr += ', ';\n\t\t\t}\n\t\t}\n\t}\n\tstr += ' ]';\n\tstr += ', ';\n\n\t// Buffer offset:\n\tstr += '0';\n\tstr += ', ';\n\n\t// Order:\n\tstr += '\\'' + this._order + '\\'';\n\n\t// Close the function call:\n\tstr += ' )';\n\treturn str;\n\n\t/* eslint-enable no-invalid-this */\n}\n\n\n// EXPORTS //\n\nmodule.exports = toString;\n", "[\n\t\"throw\",\n\t\"clamp\",\n\t\"wrap\"\n]\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar MODES = require( './modes.json' );\n\n\n// MAIN //\n\n/**\n* Returns a list of ndarray index modes.\n*\n* @returns {StringArray} list of ndarray index modes\n*\n* @example\n* var list = modes();\n* // returns [ 'throw', 'clamp', 'wrap' ]\n*/\nfunction modes() {\n\treturn MODES.slice();\n}\n\n\n// EXPORTS //\n\nmodule.exports = modes;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an object mapping supported index modes to integer values for purposes of C inter-operation.\n*\n* ## Notes\n*\n* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `throw == 1`). Instead, the object should be used in an opaque manner.\n* - The main purpose of this function is JavaScript and C inter-operation of ndarray objects.\n*\n* @returns {Object} object mapping supported index modes to integer values\n*\n* @example\n* var table = enumerated();\n* // returns \n*/\nfunction enumerated() {\n\t// NOTE: the following should match the C `index_modes.h` enumeration!!!!\n\treturn {\n\t\t'throw': 1,\n\t\t'clamp': 2,\n\t\t'wrap': 3\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = enumerated;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a list of ndarray index modes.\n*\n* @module @stdlib/ndarray/index-modes\n*\n* @example\n* var modes = require( '@stdlib/ndarray/index-modes' );\n*\n* var list = modes();\n* // returns [ 'throw', 'clamp', 'wrap' ]\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar modes = require( './main.js' );\nvar enumeration = require( './enum.js' );\n\n\n// MAIN //\n\nsetReadOnly( modes, 'enum', enumeration );\n\n\n// EXPORTS //\n\nmodule.exports = modes;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar IS_LITTLE_ENDIAN = require( '@stdlib/assert/is-little-endian' );\nvar ArrayBuffer = require( '@stdlib/array/buffer' );\nvar DataView = require( '@stdlib/array/dataview' );\nvar BigInt = require( '@stdlib/bigint/ctor' );\nvar dtypes = require( './../../../dtypes' ).enum;\nvar orders = require( './../../../orders' ).enum;\nvar modes = require( './../../../index-modes' ).enum;\n\n\n// VARIABLES //\n\nvar DTYPES = dtypes();\nvar ORDERS = orders();\nvar MODES = modes();\n\n\n// FUNCTIONS //\n\n/**\n* Serializes ndarray meta data to a `DataView`.\n*\n* ## Notes\n*\n* - This function takes into account ndarray-like objects which may support index modes.\n*\n* - This function defaults to returning cached serialized meta data. To force serialization, set the private `__meta_dataview__` property to `null`.\n*\n* - Serialization is performed according to host byte order (endianness).\n*\n* - Meta data format:\n*\n* ```text\n* | endianness (1 byte) | (2 bytes) | (8 bytes) | (ndims*8 bytes) | (ndims*8 bytes) | (8 bytes) | (1 byte) | (1 byte) | (8 bytes) | (nsubmodes*1 bytes) | (4 bytes) |\n* ```\n*\n* which translates to the following `ArrayBuffer` layout:\n*\n* ```text\n* ArrayBuffer[\n* [int8],\n* [int16],\n* [int64],\n* [ndims*int64],\n* [ndims*int64],\n* [int64],\n* [int8],\n* [int8],\n* [int64],\n* [nsubmodes*int8],\n* [int32]\n* ]\n* ```\n*\n* where `strides` and `offset` are in units of bytes.\n*\n* - If the endianness is `1`, the byte order is little endian. If the endianness is `0`, the byte order is big endian.\n*\n* - Buffer length:\n*\n* ```text\n* 1 + 2 + 8 + (ndims*8) + (ndims*8) + 8 + 1 + 1 + 8 + (nsubmodes*1) + 4 = 33 + (ndims*16) + nsubmodes\n* ```\n*\n* For example, consider a three-dimensional ndarray with one subscript index mode (submode):\n*\n* ```text\n* 33 + (3*16) + 1 = 82 bytes\n* ```\n*\n* - Views:\n*\n* - endianness: `Int8Array( buf, 0, 1 )`\n* - dtype: `Int16Array( buf, 1, 1 )`\n* - ndims: `Int64Array( buf, 3, 1 )`\n* - shape: `Int64Array( buf, 11, ndims )`\n* - strides: `Int64Array( buf, 11+(ndims*8), ndims )`\n* - offset: `Int64Array( buf, 11+(ndims*16), 1 )`\n* - order: `Int8Array( buf, 19+(ndims*16), 1 )`\n* - mode: `Int8Array( buf, 20+(ndims*16), 1 )`\n* - nsubmodes: `Int64Array( buf, 21+(ndims*16), 1 )`\n* - submodes: `Int8Array( buf, 29+(ndims*16), nsubmodes )`\n* - flags: `Int32Array( buf, 29+(ndims*16)+nsubmodes, 1 )`\n*\n* @private\n* @returns {DataView} serialized meta data\n*/\nfunction meta2dataview() {\n\t/* eslint-disable no-invalid-this */\n\tvar nbytes;\n\tvar flgs;\n\tvar len;\n\tvar dt;\n\tvar sh;\n\tvar st;\n\tvar sm;\n\tvar v;\n\tvar m;\n\tvar o;\n\tvar s;\n\tvar N;\n\tvar M;\n\tvar i;\n\n\tm = this._mode || 'throw';\n\tsm = this._submode || [ m ];\n\tN = this._ndims;\n\tM = sm.length;\n\n\t// Compute the amount of memory we need to allocate for storing meta data:\n\tlen = 33 + (N*16) + M;\n\n\t// Check if we've already serialized ndarray meta data and can reuse an already allocated array buffer...\n\tv = this.__meta_dataview__;\n\tif ( v && v.byteLength === len ) { // Note: the byte length check is only a bare minimum sanity check, as cached contents may still be \"stale\" (e.g., shape and/or strides may have changed)\n\t\treturn v;\n\t}\n\t// Allocate raw memory and create a view for interfacing with the allocated memory:\n\tv = new DataView( new ArrayBuffer( len ) );\n\n\t// Retrieve ndarray meta data:\n\tsh = this._shape;\n\tst = this._strides;\n\tdt = this._dtype;\n\tnbytes = this._bytesPerElement;\n\n\t// Endianness: (byteoffset: 0; bytelength: 1)\n\to = 0;\n\tv.setInt8( o, ( IS_LITTLE_ENDIAN ) ? 1 : 0 );\n\n\t// Data type: (byteoffset: 1; bytelength: 2)\n\to += 1;\n\tv.setInt16( o, DTYPES[ dt ], IS_LITTLE_ENDIAN );\n\n\t// Number of dimensions: (byteoffset: 3; bytelength: 8)\n\to += 2;\n\tv.setBigInt64( o, BigInt( N ), IS_LITTLE_ENDIAN );\n\n\t// Shape and strides: (byteoffset: 11 and 11+(ndims*8), respectively; bytelength: ndims*8 for both shape and strides, and, thus, ndims*16 total)\n\ts = N * 8; // stride length between a dimension (shape[i]) and its associated stride\n\to += 8;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv.setBigInt64( o, BigInt( sh[i] ), IS_LITTLE_ENDIAN );\n\t\tv.setBigInt64( o+s, BigInt( st[i]*nbytes ), IS_LITTLE_ENDIAN );\n\t\to += 8;\n\t}\n\t// Offset: (byteoffset: 11+(ndims*16); bytelength: 8)\n\to += s;\n\tv.setBigInt64( o, BigInt( this._offset*nbytes ), IS_LITTLE_ENDIAN );\n\n\t// Order: (byteoffset: 19+(ndims*16); bytelength: 1)\n\to += 8;\n\tv.setInt8( o, ORDERS[ this._order ] );\n\n\t// Mode: (byteoffset: 20+(ndims*16); bytelength: 1)\n\to += 1;\n\tv.setInt8( o, MODES[ m ] );\n\n\t// Number of submodes: (byteoffset: 21+(ndims*16); bytelength: 8)\n\to += 1;\n\tv.setBigInt64( o, BigInt( M ), IS_LITTLE_ENDIAN );\n\n\t// Submodes: (byteoffset: 29+(ndims*16); bytelength: nsubmodes*1)\n\to += 8;\n\tfor ( i = 0; i < M; i++ ) {\n\t\tv.setInt8( o, MODES[ sm[i] ] );\n\t\to += 1;\n\t}\n\t// Flags: (byteoffset: 29+(ndims*16)+nsubmodes; bytelength: 4)\n\tflgs = 0|0;\n\tflgs |= ( this._flags.READONLY ) ? 4 : 0; // 00000000 00000000 00000000 00000100\n\tv.setInt32( o, flgs, IS_LITTLE_ENDIAN );\n\n\t// Cache the serialized meta data:\n\tthis.__meta_dataview__ = v;\n\n\treturn v;\n\n\t/* eslint-enable no-invalid-this */\n}\n\n\n// EXPORTS //\n\nmodule.exports = meta2dataview;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar IS_LITTLE_ENDIAN = require( '@stdlib/assert/is-little-endian' );\nvar ArrayBuffer = require( '@stdlib/array/buffer' );\nvar DataView = require( '@stdlib/array/dataview' );\nvar Uint8Array = require( '@stdlib/array/uint8' );\nvar dtypes = require( './../../../dtypes' ).enum;\nvar orders = require( './../../../orders' ).enum;\nvar modes = require( './../../../index-modes' ).enum;\nvar float64ToInt64Bytes = require( '@stdlib/number/float64/base/to-int64-bytes' ).assign;\n\n\n// VARIABLES //\n\nvar DTYPES = dtypes();\nvar ORDERS = orders();\nvar MODES = modes();\n\n\n// FUNCTIONS //\n\n/**\n* Serializes ndarray meta data to a `DataView`.\n*\n* ## Notes\n*\n* - This function takes into account ndarray-like objects which may support index modes.\n*\n* - This function defaults to returning cached serialized meta data. To force serialization, set the private `__meta_dataview__` property to `null`.\n*\n* - Serialization is performed according to host byte order (endianness).\n*\n* - Meta data format:\n*\n* ```text\n* | endianness (1 byte) | (2 bytes) | (8 bytes) | (ndims*8 bytes) | (ndims*8 bytes) | (8 bytes) | (1 byte) | (1 byte) | (8 bytes) | (nsubmodes*1 bytes) | (4 bytes) |\n* ```\n*\n* which translates to the following `ArrayBuffer` layout:\n*\n* ```text\n* ArrayBuffer[\n* [int8],\n* [int16],\n* [int64],\n* [ndims*int64],\n* [ndims*int64],\n* [int64],\n* [int8],\n* [int8],\n* [int64],\n* [nsubmodes*int8],\n* [int32]\n* ]\n* ```\n*\n* where `strides` and `offset` are in units of bytes.\n*\n* - If the endianness is `1`, the byte order is little endian. If the endianness is `0`, the byte order is big endian.\n*\n* - Buffer length:\n*\n* ```text\n* 1 + 2 + 8 + (ndims*8) + (ndims*8) + 8 + 1 + 1 + 8 + (nsubmodes*1) + 4 = 33 + (ndims*16) + nsubmodes\n* ```\n*\n* For example, consider a three-dimensional ndarray with one subscript index mode (submode):\n*\n* ```text\n* 33 + (3*16) + 1 = 82 bytes\n* ```\n*\n* - Views:\n*\n* - endianness: `Int8Array( buf, 0, 1 )`\n* - dtype: `Int16Array( buf, 1, 1 )`\n* - ndims: `Int64Array( buf, 3, 1 )`\n* - shape: `Int64Array( buf, 11, ndims )`\n* - strides: `Int64Array( buf, 11+(ndims*8), ndims )`\n* - offset: `Int64Array( buf, 11+(ndims*16), 1 )`\n* - order: `Int8Array( buf, 19+(ndims*16), 1 )`\n* - mode: `Int8Array( buf, 20+(ndims*16), 1 )`\n* - nsubmodes: `Int64Array( buf, 21+(ndims*16), 1 )`\n* - submodes: `Int8Array( buf, 29+(ndims*16), nsubmodes )`\n* - flags: `Int32Array( buf, 29+(ndims*16)+nsubmodes, 1 )`\n*\n* @private\n* @returns {DataView} serialized meta data\n*/\nfunction meta2dataview() {\n\t/* eslint-disable no-invalid-this */\n\tvar nbytes;\n\tvar bytes;\n\tvar flgs;\n\tvar len;\n\tvar dt;\n\tvar sh;\n\tvar st;\n\tvar sm;\n\tvar v;\n\tvar m;\n\tvar o;\n\tvar s;\n\tvar N;\n\tvar M;\n\tvar i;\n\n\tm = this._mode || 'throw';\n\tsm = this._submode || [ m ];\n\tN = this._ndims;\n\tM = sm.length;\n\n\t// Compute the amount of memory we need to allocate for storing meta data:\n\tlen = 33 + (N*16) + M;\n\n\t// Check if we've already serialized ndarray meta data and can reuse an already allocated array buffer...\n\tv = this.__meta_dataview__;\n\tif ( v && v.byteLength === len ) { // Note: the byte length check is only a bare minimum sanity check, as cached contents may still be \"stale\" (e.g., shape and/or strides may have changed)\n\t\treturn v;\n\t}\n\t// Allocate raw memory and create views for interfacing with the allocated memory:\n\tv = new DataView( new ArrayBuffer( len ) );\n\tbytes = new Uint8Array( v.buffer );\n\n\t// Retrieve ndarray meta data:\n\tsh = this._shape;\n\tst = this._strides;\n\tdt = this._dtype;\n\tnbytes = this._bytesPerElement;\n\n\t// Endianness: (byteoffset: 0; bytelength: 1)\n\to = 0;\n\tv.setInt8( o, ( IS_LITTLE_ENDIAN ) ? 1 : 0 );\n\n\t// Data type: (byteoffset: 1; bytelength: 2)\n\to += 1;\n\tv.setInt16( o, DTYPES[ dt ], IS_LITTLE_ENDIAN );\n\n\t// Number of dimensions: (byteoffset: 3; bytelength: 8)\n\to += 2;\n\tfloat64ToInt64Bytes( N, bytes, 1, o );\n\n\t// Shape and strides: (byteoffset: 11 and 11+(ndims*8), respectively; bytelength: ndims*8 for both shape and strides, and, thus, ndims*16 total)\n\ts = N * 8; // stride length between a dimension (shape[i]) and its associated stride\n\to += 8;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tfloat64ToInt64Bytes( sh[i], bytes, 1, o );\n\t\tfloat64ToInt64Bytes( st[i]*nbytes, bytes, 1, o+s );\n\t\to += 8;\n\t}\n\t// Offset: (byteoffset: 11+(ndims*16); bytelength: 8)\n\to += s;\n\tfloat64ToInt64Bytes( this._offset*nbytes, bytes, 1, o );\n\n\t// Order: (byteoffset: 19+(ndims*16); bytelength: 1)\n\to += 8;\n\tv.setInt8( o, ORDERS[ this._order ] );\n\n\t// Mode: (byteoffset: 20+(ndims*16); bytelength: 1)\n\to += 1;\n\tv.setInt8( o, MODES[ m ] );\n\n\t// Number of submodes: (byteoffset: 21+(ndims*16); bytelength: 8)\n\to += 1;\n\tfloat64ToInt64Bytes( M, bytes, 1, o );\n\n\t// Submodes: (byteoffset: 29+(ndims*16); bytelength: nsubmodes*1)\n\to += 8;\n\tfor ( i = 0; i < M; i++ ) {\n\t\tv.setInt8( o, MODES[ sm[i] ] );\n\t\to += 1;\n\t}\n\t// Flags: (byteoffset: 29+(ndims*16)+nsubmodes; bytelength: 4)\n\tflgs = 0|0;\n\tflgs |= ( this._flags.READONLY ) ? 4 : 0; // 00000000 00000000 00000000 00000100\n\tv.setInt32( o, flgs, IS_LITTLE_ENDIAN );\n\n\t// Cache the serialized meta data:\n\tthis.__meta_dataview__ = v;\n\n\treturn v;\n\n\t/* eslint-enable no-invalid-this */\n}\n\n\n// EXPORTS //\n\nmodule.exports = meta2dataview;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-restricted-syntax, no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nvar hasBigIntSupport = require( '@stdlib/assert/has-bigint-support' );\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar setReadOnlyAccessor = require( '@stdlib/utils/define-nonenumerable-read-only-accessor' );\nvar bytesPerElement = require( './../../../base/bytes-per-element' );\nvar iterationOrder = require( './../../../base/iteration-order' );\nvar strides2order = require( './../../../base/strides2order' );\nvar Boolean = require( '@stdlib/boolean/ctor' );\nvar isColumnMajorContiguous = require( './is_column_major_contiguous.js' );\nvar isRowMajorContiguous = require( './is_row_major_contiguous.js' );\nvar isContiguous = require( './is_contiguous.js' );\nvar copyFlags = require( './copy_flags.js' );\nvar igetValue = require( './iget.js' );\nvar isetValue = require( './iset.js' );\nvar setValue = require( './set.js' );\nvar getValue = require( './get.js' );\nvar toJSON = require( './tojson.js' );\nvar toString = require( './tostring.js' ); // eslint-disable-line stdlib/no-redeclare\nvar meta2dataview = require( './meta2dataview.js' );\nvar meta2dataviewPolyfill = require( './meta2dataview.polyfill.js' );\n\n\n// MAIN //\n\n/**\n* ndarray constructor.\n*\n* ## Notes\n*\n* - To create a zero-dimensional array,\n*\n* ```javascript\n* var buffer = [ 1 ];\n* var shape = [];\n* var strides = [ 0 ];\n* var offset = 0;\n*\n* var out = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n* ```\n*\n* @constructor\n* @param {string} dtype - data type\n* @param {(ArrayLikeObject|TypedArray|Buffer)} buffer - data buffer\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - array strides\n* @param {NonNegativeInteger} offset - index offset\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var out = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*/\nfunction ndarray( dtype, buffer, shape, strides, offset, order ) {\n\tvar contiguous;\n\tvar nbytes;\n\tvar ord;\n\tvar len;\n\tvar i;\n\tif ( !(this instanceof ndarray) ) {\n\t\treturn new ndarray( dtype, buffer, shape, strides, offset, order );\n\t}\n\t// Compute the number of elements...\n\tlen = 1;\n\tfor ( i = 0; i < shape.length; i++ ) {\n\t\tlen *= shape[ i ];\n\t}\n\t// Compute the number of bytes...\n\tif ( buffer.BYTES_PER_ELEMENT ) {\n\t\tnbytes = buffer.BYTES_PER_ELEMENT * len;\n\t} else {\n\t\tnbytes = null;\n\t}\n\t// Set private properties...\n\tthis._byteLength = nbytes;\n\tthis._bytesPerElement = bytesPerElement( dtype );\n\tthis._buffer = buffer;\n\tthis._dtype = dtype;\n\tthis._length = len;\n\tthis._ndims = shape.length;\n\tthis._offset = offset;\n\tthis._order = order;\n\tthis._shape = shape;\n\tthis._strides = strides;\n\tthis._accessors = Boolean( buffer.get && buffer.set );\n\n\tthis._iterationOrder = iterationOrder( strides );\n\n\t// Determine if the array can be stored contiguously:\n\tcontiguous = isContiguous( len, shape, strides, offset, this._iterationOrder ); // eslint-disable-line max-len\n\n\t// Infer the array \"order\" from the stride array (this is supplementary to the `order` parameter):\n\tord = strides2order( strides );\n\n\tthis._flags = {\n\t\t'ROW_MAJOR_CONTIGUOUS': isRowMajorContiguous( ord, contiguous ),\n\t\t'COLUMN_MAJOR_CONTIGUOUS': isColumnMajorContiguous( ord, contiguous ),\n\t\t'READONLY': false\n\t};\n\n\t// Initialize a property for caching serialized meta data:\n\tthis.__meta_dataview__ = null;\n\n\treturn this;\n}\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof ndarray\n* @type {string}\n* @default 'ndarray'\n*\n* @example\n* var str = ndarray.name;\n* // returns 'ndarray'\n*/\nsetReadOnly( ndarray, 'name', 'ndarray' );\n\n/**\n* Size (in bytes) of the array (if known).\n*\n* @name byteLength\n* @memberof ndarray.prototype\n* @type {(NonNegativeInteger|null)}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var buffer = new Float64Array( [ 1, 2, 3, 4, 5, 6 ] );\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );\n*\n* var byteLength = x.byteLength;\n* // returns 48\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'byteLength', function get() {\n\treturn this._byteLength;\n});\n\n/**\n* Size (in bytes) of each array element (if known).\n*\n* @name BYTES_PER_ELEMENT\n* @memberof ndarray.prototype\n* @type {(PositiveInteger|null)}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var buffer = new Float64Array( [ 1, 2, 3, 4, 5, 6 ] );\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );\n*\n* var nbytes = x.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'BYTES_PER_ELEMENT', function get() {\n\treturn this._bytesPerElement;\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name data\n* @memberof ndarray.prototype\n* @type {(Array|TypedArray|Buffer)}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var data = x.data;\n* // returns [ 1, 2, 3, 4, 5, 6 ]\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'data', function get() {\n\treturn this._buffer;\n});\n\n/**\n* Underlying data type.\n*\n* @name dtype\n* @memberof ndarray.prototype\n* @type {string}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var dtype = x.dtype;\n* // returns 'generic'\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'dtype', function get() {\n\treturn this._dtype;\n});\n\n/**\n* Meta information, such as information concerning the memory layout of the array.\n*\n* @name flags\n* @memberof ndarray.prototype\n* @type {Object}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var flgs = x.flags;\n* // returns \n*/\nsetReadOnlyAccessor( ndarray.prototype, 'flags', function get() {\n\treturn copyFlags( this._flags );\n});\n\n/**\n* Length of the array.\n*\n* @name length\n* @memberof ndarray.prototype\n* @type {NonNegativeInteger}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var len = x.length;\n* // returns 6\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Number of dimensions.\n*\n* @name ndims\n* @memberof ndarray.prototype\n* @type {PositiveInteger}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var ndims = x.ndims;\n* // returns 2\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'ndims', function get() {\n\treturn this._ndims;\n});\n\n/**\n* Index offset which specifies the buffer index at which to start iterating over array elements.\n*\n* @name offset\n* @memberof ndarray.prototype\n* @type {NonNegativeInteger}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var o = x.offset;\n* // returns 0\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'offset', function get() {\n\treturn this._offset;\n});\n\n/**\n* Array order.\n*\n* ## Notes\n*\n* - The array order is either row-major (C-style) or column-major (Fortran-style).\n*\n* @name order\n* @memberof ndarray.prototype\n* @type {string}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var order = x.order;\n* // returns 'row-major'\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'order', function get() {\n\treturn this._order;\n});\n\n/**\n* Shape of the array.\n*\n* @name shape\n* @memberof ndarray.prototype\n* @type {NonNegativeIntegerArray}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var s = x.shape;\n* // returns [ 3, 2 ]\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'shape', function get() {\n\treturn this._shape.slice();\n});\n\n/**\n* Index strides which specify how to access data along corresponding array dimensions.\n*\n* @name strides\n* @memberof ndarray.prototype\n* @type {IntegerArray}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var s = x.strides;\n* // returns [ 2, 1 ]\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'strides', function get() {\n\treturn this._strides.slice();\n});\n\n/**\n* Returns an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @name get\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {...integer} [idx] - indices\n* @returns {*} array element\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.get( 1, 1 );\n* // returns 4\n*/\nsetReadOnly( ndarray.prototype, 'get', getValue );\n\n/**\n* Returns an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the input argument is ignored and, for clarity, should not be provided.\n*\n* @name iget\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {integer} [idx] - linear index\n* @returns {*} array element\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.iget( 3 );\n* // returns 4\n*/\nsetReadOnly( ndarray.prototype, 'iget', igetValue );\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @name set\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {...integer} [idx] - indices\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.get( 1, 1 );\n* // returns 4\n*\n* x.set( 1, 1, 10 );\n*\n* var b = x.data;\n* // returns [ 1, 2, 3, 10, 5, 6 ]\n*\n* v = x.get( 1, 1 );\n* // returns 10\n*/\nsetReadOnly( ndarray.prototype, 'set', setValue );\n\n/**\n* Sets an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the first, and only, argument should be the value to set.\n*\n* @name iset\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {integer} [idx] - linear index\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.iget( 3 );\n* // returns 4\n*\n* x.iset( 3, 10 );\n*\n* var b = x.data;\n* // returns [ 1, 2, 3, 10, 5, 6 ]\n*\n* v = x.iget( 3 );\n* // returns 10\n*/\nsetReadOnly( ndarray.prototype, 'iset', isetValue );\n\n/**\n* Serializes an ndarray as a string.\n*\n* ## Notes\n*\n* - The method does **not** serialize data outside of the buffer region defined by the array configuration.\n*\n* @name toString\n* @memberof ndarray.prototype\n* @type {Function}\n* @returns {string} serialized ndarray\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6, 7, 8 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 2;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var str = x.toString();\n* // returns \"ndarray( 'generic', [ 3, 4, 5, 6, 7, 8 ], [ 3, 2 ], [ 2, 1 ], 0, 'row-major' )\"\n*/\nsetReadOnly( ndarray.prototype, 'toString', toString );\n\n/**\n* Serializes an ndarray as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying an `ndarray` instance.\n* - The method does **not** serialize data outside of the buffer region defined by the array configuration.\n*\n* @name toJSON\n* @memberof ndarray.prototype\n* @type {Function}\n* @returns {Object} serialized ndarray\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6, 7, 8 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 2;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var o = x.toJSON();\n* // e.g., returns { 'type': 'ndarray', 'dtype': 'generic', 'flags': {...}, 'offset': 0, 'order': 'row-major', 'shape': [ 3, 2 ], 'strides': [ 2, 1 ], 'data': [ 3, 4, 5, 6, 7, 8 ] }\n*/\nsetReadOnly( ndarray.prototype, 'toJSON', toJSON );\n\n/**\n* Serializes ndarray meta data to a `DataView`.\n*\n* ## Notes\n*\n* - Meta data format:\n*\n* ```text\n* | (1 byte) | (2 bytes) | (8 bytes) | (ndims*8 bytes) | (ndims*8 bytes) | (8 bytes) | (1 byte) | (1 byte) | (8 bytes) | (nsubmodes*1 bytes) | (4 bytes) |\n* ```\n*\n* where `strides` and `offset` are in units of bytes.\n*\n* - If the endianness is `1`, the byte order is little endian. If the endianness is `0`, the byte order is big endian.\n*\n* - Serialization is performed according to host byte order (endianness).\n*\n* - Consumers of this method should treat the returned `DataView` as **immutable**. Otherwise, mutation can invalidate meta data and potentially affect other consumers.\n*\n* @private\n* @name __array_meta_dataview__\n* @memberof ndarray.prototype\n* @type {Function}\n* @returns {DataView} serialized meta data\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6, 7, 8 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 2;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var dv = x.__array_meta_dataview__();\n* // returns \n*/\nsetReadOnly( ndarray.prototype, '__array_meta_dataview__', ( hasBigIntSupport() ) ? meta2dataview : meta2dataviewPolyfill );\n\n\n// EXPORTS //\n\nmodule.exports = ndarray;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Multidimensional array constructor.\n*\n* @module @stdlib/ndarray/base/ctor\n*\n* @example\n* var ndarray = require( '@stdlib/ndarray/base/ctor' );\n*\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var out = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns default ndarray settings.\n*\n* @returns {Object} defaults\n*\n* @example\n* var o = defaults();\n* // returns {...}\n*/\nfunction defaults() {\n\treturn {\n\t\t// Data types:\n\t\t'dtypes': {\n\t\t\t'default': 'float64',\n\t\t\t'numeric': 'float64',\n\t\t\t'real': 'float64',\n\t\t\t'floating_point': 'float64',\n\t\t\t'real_floating_point': 'float64',\n\t\t\t'complex_floating_point': 'complex128',\n\t\t\t'integer': 'int32',\n\t\t\t'signed_integer': 'int32',\n\t\t\t'unsigned_integer': 'uint32'\n\t\t},\n\n\t\t// Memory layout:\n\t\t'order': 'row-major',\n\n\t\t// Casting mode:\n\t\t'casting': 'safe',\n\n\t\t// Index mode:\n\t\t'index_mode': 'throw'\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = defaults;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar defaults = require( './main.js' );\n\n\n// VARIABLES //\n\nvar DEFAULTS = defaults();\nvar HASH = {\n\t'dtypes.default': DEFAULTS.dtypes.default,\n\t'dtypes.numeric': DEFAULTS.dtypes.numeric,\n\t'dtypes.real': DEFAULTS.dtypes.real,\n\t'dtypes.floating_point': DEFAULTS.dtypes.floating_point,\n\t'dtypes.real_floating_point': DEFAULTS.dtypes.real_floating_point,\n\t'dtypes.complex_floating_point': DEFAULTS.dtypes.complex_floating_point,\n\t'dtypes.integer': DEFAULTS.dtypes.integer,\n\t'dtypes.signed_integer': DEFAULTS.dtypes.signed_integer,\n\t'dtypes.unsigned_integer': DEFAULTS.dtypes.unsigned_integer,\n\t'order': DEFAULTS.order,\n\t'casting': DEFAULTS.casting,\n\t'index_mode': DEFAULTS.index_mode\n};\n\n\n// MAIN //\n\n/**\n* Returns a default ndarray setting.\n*\n* @param {string} name - setting name\n* @returns {*} default setting or null\n*\n* @example\n* var v = get( 'dtypes.default' );\n* // returns \n*/\nfunction get( name ) {\n\tvar v = HASH[ name ];\n\treturn ( v === void 0 ) ? null : v;\n}\n\n\n// EXPORTS //\n\nmodule.exports = get;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return default ndarray settings.\n*\n* @module @stdlib/ndarray/defaults\n*\n* @example\n* var defaults = require( '@stdlib/ndarray/defaults' );\n*\n* var o = defaults();\n* // returns {...}\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar get = require( './get.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'get', get );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Restricts an index to the interval `[0,max]`.\n*\n* @param {integer} idx - index\n* @param {NonNegativeInteger} max - maximum index\n* @returns {NonNegativeInteger} index\n*\n* @example\n* var idx = clampIndex( -1, 10 );\n* // returns 0\n*\n* idx = clampIndex( 15, 10 );\n* // returns 10\n*\n* idx = clampIndex( 5, 10 );\n* // returns 5\n*/\nfunction clampIndex( idx, max ) {\n\tif ( idx < 0 ) {\n\t\treturn 0;\n\t}\n\tif ( idx > max ) {\n\t\treturn max;\n\t}\n\treturn idx;\n}\n\n\n// EXPORTS //\n\nmodule.exports = clampIndex;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Restrict an index to the interval `[0,max]`.\n*\n* @module @stdlib/ndarray/base/clamp-index\n*\n* @example\n* var clampIndex = require( '@stdlib/ndarray/base/clamp-index' );\n*\n* var idx = clampIndex( -1, 10 );\n* // returns 0\n*\n* idx = clampIndex( 15, 10 );\n* // returns 10\n*\n* idx = clampIndex( 5, 10 );\n* // returns 5\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Wraps an index on the interval `[0,max]`.\n*\n* @param {integer} idx - index\n* @param {NonNegativeInteger} max - maximum index\n* @returns {NonNegativeInteger} index\n*\n* @example\n* var idx = wrapIndex( -1, 10 );\n* // returns 10\n*\n* idx = wrapIndex( 13, 10 );\n* // returns 2\n*\n* idx = wrapIndex( 6, 10 );\n* // returns 6\n*/\nfunction wrapIndex( idx, max ) {\n\tvar mp1 = max + 1;\n\tif ( idx < 0 ) {\n\t\tidx += mp1; // slight optimization to avoid modulo arithmetic when |idx| <= max+1\n\t\tif ( idx < 0 ) {\n\t\t\tidx %= mp1;\n\t\t\tif ( idx !== 0 ) {\n\t\t\t\tidx += mp1;\n\t\t\t}\n\t\t}\n\t\treturn idx;\n\t}\n\tif ( idx > max ) {\n\t\tidx -= mp1; // slight optimization to avoid modulo arithmetic when max+1 < idx <= 2*(max+1)\n\t\tif ( idx > max ) {\n\t\t\tidx %= mp1;\n\t\t}\n\t\treturn idx;\n\t}\n\treturn idx;\n}\n\n\n// EXPORTS //\n\nmodule.exports = wrapIndex;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Wrap an index on the interval `[0,max]`.\n*\n* @module @stdlib/ndarray/base/wrap-index\n*\n* @example\n* var wrapIndex = require( '@stdlib/ndarray/base/wrap-index' );\n*\n* var idx = wrapIndex( -1, 10 );\n* // returns 10\n*\n* idx = wrapIndex( 14, 10 );\n* // returns 3\n*\n* idx = wrapIndex( 6, 10 );\n* // returns 6\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar clampIndex = require( './../../../base/clamp-index' );\nvar wrapIndex = require( './../../../base/wrap-index' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns an index given an index mode.\n*\n* @param {integer} idx - index\n* @param {NonNegativeInteger} max - maximum index\n* @param {string} mode - specifies how to handle an index outside the interval `[0,max]`\n* @throws {RangeError} index out-of-bounds\n* @returns {integer} index\n*\n* @example\n* var idx = ind( 2, 9, 'clamp' );\n* // returns 2\n*\n* idx = ind( 10, 9, 'clamp' );\n* // returns 9\n*\n* idx = ind( -1, 9, 'clamp' );\n* // returns 0\n*\n* @example\n* var idx = ind( 2, 9, 'wrap' );\n* // returns 2\n*\n* idx = ind( 10, 9, 'wrap' );\n* // returns 0\n*\n* idx = ind( -1, 9, 'wrap' );\n* // returns 9\n*\n* @example\n* var idx = ind( 2, 9, 'throw' );\n* // returns 2\n*\n* idx = ind( 10, 9, 'throw' );\n* // throws \n*\n* idx = ind( -1, 9, 'throw' );\n* // throws \n*/\nfunction ind( idx, max, mode ) {\n\tif ( mode === 'clamp' ) {\n\t\treturn clampIndex( idx, max );\n\t}\n\tif ( mode === 'wrap' ) {\n\t\treturn wrapIndex( idx, max );\n\t}\n\tif ( idx < 0 || idx > max ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index must be on the interval: [0, %d]. Value: `%d`.', max, idx ) );\n\t}\n\treturn idx;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ind;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return an index given an index mode.\n*\n* @module @stdlib/ndarray/base/ind\n*\n* @example\n* var ind = require( '@stdlib/ndarray/base/ind' );\n*\n* var idx = ind( -1, 10, 'wrap' );\n* // returns 10\n*\n* idx = ind( 14, 10, 'wrap' );\n* // returns 3\n*\n* idx = ind( 6, 10, 'wrap' );\n* // returns 6\n*\n* @example\n* var ind = require( '@stdlib/ndarray/base/ind' );\n*\n* var idx = ind( -1, 10, 'clamp' );\n* // returns 0\n*\n* idx = ind( 14, 10, 'clamp' );\n* // returns 10\n*\n* idx = ind( 6, 10, 'clamp' );\n* // returns 6\n*\n* @example\n* var ind = require( '@stdlib/ndarray/base/ind' );\n*\n* var idx = ind( 1, 10, 'throw' );\n* // returns 1\n*\n* idx = ind( 14, 10, 'throw' );\n* // throws \n*\n* idx = ind( -1, 10, 'throw' );\n* // throws \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nvar isInteger = require( '@stdlib/assert/is-integer' ).isPrimitive;\nvar getIndex = require( './../../base/ind' );\nvar parent = require( './../../base/ctor' ); // eslint-disable-line stdlib/no-redeclare\nvar format = require( '@stdlib/string/format' );\n\n\n// VARIABLES //\n\nvar base = parent.prototype.iget;\n\n\n// MAIN //\n\n/**\n* Returns an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the input argument is ignored and, for clarity, should not be provided.\n*\n* @private\n* @param {integer} [idx] - linear view index\n* @throws {TypeError} index must be an integer\n* @throws {RangeError} index exceeds array dimensions\n* @returns {*} array element\n*/\nfunction iget( idx ) {\n\tif ( this._ndims > 0 ) {\n\t\tif ( !isInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index must be an integer. Value: `%s`.', idx ) );\n\t\t}\n\t\tidx = getIndex( idx, this._length-1, this._mode );\n\t\treturn base.call( this, idx );\n\t}\n\treturn base.call( this );\n}\n\n\n// EXPORTS //\n\nmodule.exports = iget;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-invalid-this */\n\n'use strict';\n\n// METHODS //\n\nvar isInteger = require( '@stdlib/assert/is-integer' ).isPrimitive;\nvar getIndex = require( './../../base/ind' );\nvar parent = require( './../../base/ctor' ); // eslint-disable-line stdlib/no-redeclare\nvar format = require( '@stdlib/string/format' );\n\n\n// VARIABLES //\n\nvar base = parent.prototype.iset;\n\n\n// MAIN //\n\n/**\n* Sets an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the first, and only, argument should be the value to set.\n*\n* @private\n* @param {integer} [idx] - linear view index\n* @param {*} v - value to set\n* @throws {Error} cannot write to a read-only array\n* @throws {TypeError} index must be an integer\n* @throws {RangeError} index exceeds array dimensions\n* @returns {ndarray} ndarray instance\n*/\nfunction iset( idx, v ) {\n\tif ( this._flags.READONLY ) {\n\t\tthrow new Error( 'invalid invocation. Cannot write to a read-only array.' );\n\t}\n\tif ( this._ndims > 0 ) {\n\t\tif ( !isInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index must be an integer. Value: `%s`.', idx ) );\n\t\t}\n\t\tidx = getIndex( idx, this._length-1, this._mode );\n\t\tbase.call( this, idx, v );\n\t} else {\n\t\tbase.call( this, idx );\n\t}\n\treturn this;\n}\n\n\n// EXPORTS //\n\nmodule.exports = iset;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nvar isInteger = require( '@stdlib/assert/is-integer' ).isPrimitive;\nvar getIndex = require( './../../base/ind' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @private\n* @param {...integer} [idx] - indices\n* @throws {TypeError} provided indices must be integer valued\n* @throws {RangeError} index exceeds array dimensions\n* @throws {RangeError} number of indices must equal the number of dimensions\n* @returns {*} array element\n*/\nfunction get() {\n\tvar idx;\n\tvar ind;\n\tvar M;\n\tvar i;\n\n\tif ( arguments.length !== this._ndims ) {\n\t\tthrow new RangeError( format( 'invalid arguments. Number of indices must match the number of dimensions. ndims: `%u`. nargs: `%u`.', this._ndims, arguments.length ) );\n\t}\n\tidx = this._offset;\n\tM = this._submode.length;\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\tif ( !isInteger( arguments[ i ] ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Indices must be integer valued. Argument: `%u`. Value: `%s`.', i, arguments[ i ] ) );\n\t\t}\n\t\tind = getIndex( arguments[ i ], this._shape[ i ]-1, this._submode[ i%M ] ); // eslint-disable-line max-len\n\t\tidx += this._strides[ i ] * ind;\n\t}\n\tif ( this._accessors ) {\n\t\treturn this._buffer.get( idx );\n\t}\n\treturn this._buffer[ idx ];\n}\n\n\n// EXPORTS //\n\nmodule.exports = get;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nvar isInteger = require( '@stdlib/assert/is-integer' ).isPrimitive;\nvar getIndex = require( './../../base/ind' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @private\n* @param {...integer} [idx] - indices\n* @param {*} v - value to set\n* @throws {Error} cannot write to a read-only array\n* @throws {TypeError} provided indices must be integer valued\n* @throws {RangeError} index exceeds array dimensions\n* @throws {RangeError} number of indices must equal the number of dimensions\n* @returns {ndarray} ndarray instance\n*/\nfunction set() {\n\tvar idx;\n\tvar ind;\n\tvar M;\n\tvar i;\n\n\tif ( this._flags.READONLY ) {\n\t\tthrow new Error( 'invalid invocation. Cannot write to a read-only array.' );\n\t}\n\tif ( arguments.length !== this._ndims+1 ) {\n\t\tthrow new RangeError( format( 'invalid arguments. Number of indices must match the number of dimensions. ndims: `%u`. nargs: `%u`.', this._ndims, arguments.length ) );\n\t}\n\tidx = this._offset;\n\tM = this._submode.length;\n\tfor ( i = 0; i < arguments.length-1; i++ ) {\n\t\tif ( !isInteger( arguments[ i ] ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Indices must be integer valued. Argument: `%i`. Value: `%s`.', i, arguments[ i ] ) );\n\t\t}\n\t\tind = getIndex( arguments[ i ], this._shape[ i ]-1, this._submode[ i%M ] ); // eslint-disable-line max-len\n\t\tidx += this._strides[ i ] * ind;\n\t}\n\tif ( this._accessors ) {\n\t\tthis._buffer.set( arguments[ i ], idx );\n\t} else {\n\t\tthis._buffer[ idx ] = arguments[ i ];\n\t}\n\treturn this;\n}\n\n\n// EXPORTS //\n\nmodule.exports = set;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Copies the contents of array-like value to a new array.\n*\n* @private\n* @param {ArrayLike} arr - input array\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} output array\n*\n* @example\n* var arr = [ 1.0, 2.0, 3.0 ];\n*\n* var out = copy( arr, arr.length );\n* // returns [ 1.0, 2.0, 3.0 ]\n*\n* var bool = ( arr === out );\n* // returns false\n*/\nfunction copy( arr, len ) {\n\tvar out;\n\tvar i;\n\n\tout = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tout.push( arr[ i ] );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = copy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar modes = require( './../../../../index-modes' );\n\n\n// VARIABLES //\n\nvar MODES = modes();\nvar len = MODES.length;\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray index mode.\n*\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray index mode\n*\n* @example\n* var bool = isIndexMode( 'wrap' );\n* // returns true\n*\n* bool = isIndexMode( 'clamp' );\n* // returns true\n*\n* bool = isIndexMode( 'throw' );\n* // returns true\n*\n* bool = isIndexMode( 'foo' );\n* // returns false\n*/\nfunction isIndexMode( v ) {\n\tvar i;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tif ( v === MODES[ i ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nmodule.exports = isIndexMode;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test whether an input value is a supported ndarray index mode.\n*\n* @module @stdlib/ndarray/base/assert/is-index-mode\n*\n* @example\n* var isIndexMode = require( '@stdlib/ndarray/base/assert/is-index-mode' );\n*\n* var bool = isIndexMode( 'wrap' );\n* // returns true\n*\n* bool = isIndexMode( 'clamp' );\n* // returns true\n*\n* bool = isIndexMode( 'throw' );\n* // returns true\n*\n* bool = isIndexMode( 'foo' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isObject = require( '@stdlib/assert/is-plain-object' );\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar isArray = require( '@stdlib/assert/is-array' );\nvar isIndexMode = require( './../../base/assert/is-index-mode' );\nvar isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Validates function options.\n*\n* @private\n* @param {Object} opts - destination object\n* @param {Options} options - function options\n* @param {string} [options.mode] - specifies how to handle indices which exceed array dimensions\n* @param {string} [options.submode] - specifies how to handle subscripts which exceed array dimensions\n* @param {boolean} [options.readonly] - boolean indicating whether an array should be read-only\n* @returns {(Error|null)} null or an error object\n*\n* @example\n* var opts = {};\n* var options = {\n* 'mode': 'clamp',\n* 'submode': [ 'throw', 'wrap', 'clamp' ]\n* };\n* var err = validate( opts, options );\n* if ( err ) {\n* throw err;\n* }\n*/\nfunction validate( opts, options ) {\n\tvar i;\n\tif ( !isObject( options ) ) {\n\t\treturn new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t}\n\tif ( hasOwnProp( options, 'mode' ) ) {\n\t\topts.mode = options.mode;\n\t\tif ( !isIndexMode( opts.mode ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a recognized mode. Option: `%s`.', 'mode', opts.mode ) );\n\t\t}\n\t}\n\tif ( hasOwnProp( options, 'submode' ) ) {\n\t\topts.submode = options.submode;\n\t\tif ( !isArray( opts.submode ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.', 'submode', opts.submode ) );\n\t\t}\n\t\tif ( opts.submode.length === 0 ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.', 'submode', opts.submode.join( ',' ) ) );\n\t\t}\n\t\tfor ( i = 0; i < opts.submode.length; i++ ) {\n\t\t\tif ( !isIndexMode( opts.submode[ i ] ) ) {\n\t\t\t\treturn new TypeError( format( 'invalid option. Each submode must be a recognized mode. Option: `%s`.', opts.submode[ i ] ) );\n\t\t\t}\n\t\t}\n\t\topts.submode = opts.submode.slice();\n\t}\n\tif ( hasOwnProp( options, 'readonly' ) ) {\n\t\topts.readonly = options.readonly;\n\t\tif ( !isBoolean( opts.readonly ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'readonly', opts.readonly ) );\n\t\t}\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = validate;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar isCollection = require( '@stdlib/assert/is-collection' );\nvar isNonNegativeIntegerArray = require( '@stdlib/assert/is-nonnegative-integer-array' ).primitives;\nvar isNonNegativeInteger = require( '@stdlib/assert/is-nonnegative-integer' ).isPrimitive;\nvar isIntegerArray = require( '@stdlib/assert/is-integer-array' ).primitives;\nvar isFunction = require( '@stdlib/assert/is-function' );\nvar isOrder = require( './../../base/assert/is-order' );\nvar isDataType = require( './../../base/assert/is-data-type' );\nvar isBufferLengthCompatible = require( './../../base/assert/is-buffer-length-compatible' );\nvar numel = require( './../../base/numel' );\nvar parent = require( './../../base/ctor' ); // eslint-disable-line stdlib/no-redeclare\nvar defaults = require( './../../defaults' );\nvar inherit = require( '@stdlib/utils/inherit' );\nvar format = require( '@stdlib/string/format' );\nvar iget = require( './iget.js' );\nvar iset = require( './iset.js' );\nvar get = require( './get.js' );\nvar set = require( './set.js' );\nvar copy = require( './copy_array.js' );\nvar validate = require( './validate.js' );\n\n\n// VARIABLES //\n\n/*\n* See the following references:\n*\n* - https://stackoverflow.com/questions/22747068/is-there-a-max-number-of-arguments-javascript-functions-can-accept\n* - https://bugs.webkit.org/show_bug.cgi?id=80797\n* - https://github.com/numpy/numpy/issues/5744\n*\n* Note that the maximum number of function arguments can vary from engine to engine. Here, we choose something of a lowest common denominator which may **not** be valid everywhere.\n*/\nvar MAX_DIMS = 32767|0;\n\nvar INDEX_MODE = defaults.get( 'index_mode' );\nvar READONLY = false;\n\n\n// MAIN //\n\n/**\n* ndarray constructor.\n*\n* @constructor\n* @param {string} dtype - data type\n* @param {Collection} buffer - data buffer\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - array strides\n* @param {NonNegativeInteger} offset - index offset\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {Options} [options] - function options\n* @param {string} [options.mode=\"throw\"] - specifies how to handle indices which exceed array dimensions\n* @param {StringArray} [options.submode=[\"throw\"]] - specifies how to handle subscripts which exceed array dimensions on a per dimension basis\n* @param {boolean} [options.readonly=false] - boolean indicating whether an array should be read-only\n* @throws {TypeError} `dtype` argument must be a supported ndarray data type\n* @throws {TypeError} `buffer` argument must be an array-like object, typed-array-like, or a Buffer\n* @throws {TypeError} `buffer` argument `get` and `set` properties must be functions\n* @throws {TypeError} `shape` argument must be an array-like object containing nonnegative integers\n* @throws {Error} `shape` argument length must equal the number of dimensions\n* @throws {TypeError} `strides` argument must be an array-like object containing integers\n* @throws {Error} `strides` argument length must equal the number of dimensions (except for zero-dimensional arrays; in which case, the `strides` argument length must be equal to `1`)\n* @throws {Error} for zero-dimensional ndarrays, the `strides` argument must contain a single element equal to `0`\n* @throws {TypeError} `offset` argument must be a nonnegative integer\n* @throws {TypeError} `order` argument must be a supported ndarray order\n* @throws {Error} `buffer` argument must be compatible with specified meta data\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {RangeError} too many dimensions\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var out = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*/\nfunction ndarray( dtype, buffer, shape, strides, offset, order, options ) {\n\tvar ndims;\n\tvar opts;\n\tvar err;\n\tvar sh;\n\tvar st;\n\n\tif ( !(this instanceof ndarray) ) {\n\t\tif ( arguments.length < 7 ) {\n\t\t\treturn new ndarray( dtype, buffer, shape, strides, offset, order );\n\t\t}\n\t\treturn new ndarray( dtype, buffer, shape, strides, offset, order, options ); // eslint-disable-line max-len\n\t}\n\tif ( !isDataType( dtype ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a supported ndarray data type. Value: `%s`.', dtype ) );\n\t}\n\tif ( !isCollection( buffer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an array-like object, typed-array-like, or a Buffer. Value: `%s`.', buffer ) );\n\t} else if ( buffer.get && buffer.set && ( !isFunction( buffer.get ) || !isFunction( buffer.set ) ) ) { // eslint-disable-line max-len\n\t\tthrow new TypeError( format( 'invalid argument. Second argument `get` and `set` properties must be functions. Value: `%s`.', buffer ) );\n\t}\n\tif ( !isNonNegativeIntegerArray( shape ) ) {\n\t\tif ( !isCollection( shape) || shape.length > 0 ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an array-like object containing nonnegative integers. Value: `%s`.', shape ) );\n\t\t}\n\t}\n\tndims = shape.length;\n\tif ( ndims > MAX_DIMS ) {\n\t\tthrow new RangeError( format( 'invalid argument. Number of dimensions must not exceed %u due to stack limits. Value: `%u`.', MAX_DIMS, ndims ) );\n\t}\n\tif ( !isIntegerArray( strides ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Fourth argument must be an array-like object containing integers. Value: `%s`.', strides ) );\n\t}\n\tif ( ndims > 0 ) {\n\t\tif ( strides.length !== ndims ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Fourth argument length must match the number of dimensions. Expected number of dimensions: `%u`. Strides length: `%u`.', ndims, strides.length ) );\n\t\t}\n\t} else if ( strides.length !== 1 ) {\n\t\tthrow new RangeError( 'invalid argument. Fourth argument length must be equal to 1 when creating a zero-dimensional ndarray.' );\n\t} else if ( strides[ 0 ] !== 0 ) {\n\t\tthrow new RangeError( format( 'invalid argument. Fourth argument must contain a single element equal to 0. Value: `%d`.', strides[ 0 ] ) );\n\t}\n\tif ( !isNonNegativeInteger( offset ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Fifth argument must be a nonnegative integer. Value: `%s`.', offset ) );\n\t}\n\tif ( !isOrder( order ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Sixth argument must be a supported order. Value: `%s`.', order ) );\n\t}\n\tif ( ndims > 0 && !isBufferLengthCompatible( buffer.length, shape, strides, offset ) && numel( shape ) > 0 ) { // eslint-disable-line max-len\n\t\tthrow new Error( 'invalid arguments. Input buffer is incompatible with the specified meta data. Ensure that the offset is valid with regard to the strides array and that the buffer has enough elements to satisfy the desired array shape.' );\n\t}\n\topts = {};\n\topts.mode = INDEX_MODE;\n\topts.readonly = READONLY;\n\tif ( arguments.length > 6 ) {\n\t\terr = validate( opts, options );\n\t\tif ( err ) {\n\t\t\tthrow err;\n\t\t}\n\t}\n\tthis._mode = opts.mode;\n\tif ( opts.submode === void 0 ) {\n\t\topts.submode = [ this._mode ];\n\t}\n\tthis._submode = opts.submode;\n\n\t// Copy `shape` and `strides` to prevent external mutation:\n\tsh = copy( shape, ndims );\n\tst = copy( strides, ndims || 1 );\n\n\t// Call the parent constructor:\n\tparent.call( this, dtype, buffer, sh, st, offset, order );\n\tthis._flags.READONLY = opts.readonly;\n\n\treturn this;\n\n\t/* eslint-enable no-invalid-this */\n}\n\n// Inherit from the parent constructor:\ninherit( ndarray, parent );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof ndarray\n* @type {string}\n* @default 'ndarray'\n*\n* @example\n* var str = ndarray.name;\n* // returns 'ndarray'\n*/\nsetReadOnly( ndarray, 'name', 'ndarray' );\n\n/**\n* Returns an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @name get\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {...integer} [idx] - indices\n* @returns {*} array element\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.get( 1, 1 );\n* // returns 4\n*/\nsetReadOnly( ndarray.prototype, 'get', get );\n\n/**\n* Returns an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the input argument is ignored and, for clarity, should not be provided.\n*\n* @name iget\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {integer} [idx] - linear index\n* @returns {*} array element\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.iget( 3 );\n* // returns 4\n*/\nsetReadOnly( ndarray.prototype, 'iget', iget );\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @name set\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {...integer} [idx] - indices\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.get( 1, 1 );\n* // returns 4\n*\n* x.set( 1, 1, 10 );\n*\n* var b = x.data;\n* // returns [ 1, 2, 3, 10, 5, 6 ]\n*\n* v = x.get( 1, 1 );\n* // returns 10\n*/\nsetReadOnly( ndarray.prototype, 'set', set );\n\n/**\n* Sets an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the first, and only, argument should be the value to set.\n*\n* @name iset\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {integer} [idx] - linear index\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.iget( 3 );\n* // returns 4\n*\n* x.iset( 3, 10 );\n*\n* var b = x.data;\n* // returns [ 1, 2, 3, 10, 5, 6 ]\n*\n* v = x.iget( 3 );\n* // returns 10\n*/\nsetReadOnly( ndarray.prototype, 'iset', iset );\n\n\n// EXPORTS //\n\nmodule.exports = ndarray;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Multidimensional array constructor.\n*\n* @module @stdlib/ndarray/ctor\n*\n* @example\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n*\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var out = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "[\n\t\"none\",\n\t\"equiv\",\n\t\"safe\",\n\t\"same-kind\",\n\t\"unsafe\"\n]\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar MODES = require( './modes.json' );\n\n\n// MAIN //\n\n/**\n* Returns a list of ndarray casting modes.\n*\n* @returns {StringArray} list of ndarray casting modes\n*\n* @example\n* var list = modes();\n* // returns [ 'none', 'equiv', 'safe', 'same-kind', 'unsafe' ]\n*/\nfunction modes() {\n\treturn MODES.slice();\n}\n\n\n// EXPORTS //\n\nmodule.exports = modes;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an object mapping supported casting modes to integer values for purposes of C inter-operation.\n*\n* ## Notes\n*\n* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `NO_CASTING == 0`). Instead, the object should be used in an opaque manner.\n* - The main purpose of this function is JavaScript and C inter-operation of ndarray objects.\n*\n* @returns {Object} object mapping supported casting modes to integer values\n*\n* @example\n* var table = enumerated();\n* // returns \n*/\nfunction enumerated() {\n\t// NOTE: the following should match the C `casting_modes.h` enumeration!!!!\n\treturn {\n\t\t'none': 0,\n\t\t'equiv': 1,\n\t\t'safe': 2,\n\t\t'same-kind': 3,\n\t\t'unsafe': 4\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = enumerated;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a list of ndarray casting modes.\n*\n* @module @stdlib/ndarray/casting-modes\n*\n* @example\n* var modes = require( '@stdlib/ndarray/casting-modes' );\n*\n* var list = modes();\n* // returns [ 'none', 'equiv', 'safe', 'same-kind', 'unsafe' ]\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar modes = require( './main.js' );\nvar enumeration = require( './enum.js' );\n\n\n// MAIN //\n\nsetReadOnly( modes, 'enum', enumeration );\n\n\n// EXPORTS //\n\nmodule.exports = modes;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar modes = require( './../../../../casting-modes' );\n\n\n// VARIABLES //\n\nvar MODES = modes();\nvar len = MODES.length;\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray casting mode.\n*\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray casting mode\n*\n* @example\n* var bool = isCastingMode( 'none' );\n* // returns true\n*\n* bool = isCastingMode( 'equiv' );\n* // returns true\n*\n* bool = isCastingMode( 'safe' );\n* // returns true\n*\n* bool = isCastingMode( 'same-kind' );\n* // returns true\n*\n* bool = isCastingMode( 'unsafe' );\n* // returns true\n*\n* bool = isCastingMode( 'foo' );\n* // returns false\n*/\nfunction isCastingMode( v ) {\n\tvar i;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tif ( v === MODES[ i ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nmodule.exports = isCastingMode;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test whether an input value is a supported ndarray casting mode.\n*\n* @module @stdlib/ndarray/base/assert/is-casting-mode\n*\n* @example\n* var isCastingMode = require( '@stdlib/ndarray/base/assert/is-casting-mode' );\n*\n* var bool = isCastingMode( 'none' );\n* // returns true\n*\n* bool = isCastingMode( 'equiv' );\n* // returns true\n*\n* bool = isCastingMode( 'safe' );\n* // returns true\n*\n* bool = isCastingMode( 'same-kind' );\n* // returns true\n*\n* bool = isCastingMode( 'unsafe' );\n* // returns true\n*\n* bool = isCastingMode( 'foo' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar objectInverse = require( '@stdlib/utils/object-inverse' );\nvar enumeration = require( './../../../dtypes' ).enum;\n\n\n// VARIABLES //\n\nvar hash = objectInverse( enumeration(), {\n\t'duplicates': false\n});\n\n\n// MAIN //\n\n/**\n* Returns the data type string associated with an ndarray data type enumeration constant.\n*\n* @param {integer} dtype - data type enumeration constant\n* @returns {(string|null)} data type string or null\n*\n* @example\n* var str2enum = require( '@stdlib/ndarray/base/dtype-str2enum' );\n*\n* var v = str2enum( 'float64' );\n* // returns \n*\n* var dt = enum2str( v );\n* // returns 'float64'\n*/\nfunction enum2str( dtype ) {\n\tvar v = hash[ dtype ];\n\treturn ( typeof v === 'string' ) ? v : null; // note: we include this guard to prevent walking the prototype chain\n}\n\n\n// EXPORTS //\n\nmodule.exports = enum2str;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the data type string associated with an ndarray data type enumeration constant.\n*\n* @module @stdlib/ndarray/base/dtype-enum2str\n*\n* @example\n* var str2enum = require( '@stdlib/ndarray/base/dtype-str2enum' );\n* var enum2str = require( '@stdlib/ndarray/base/dtype-enum2str' );\n*\n* var v = str2enum( 'float64' );\n* // returns \n*\n* var dt = enum2str( v );\n* // returns 'float64'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar enumeration = require( './../../../dtypes' ).enum;\n\n\n// VARIABLES //\n\nvar ENUM = enumeration();\n\n\n// MAIN //\n\n/**\n* Returns the enumeration constant associated with an ndarray data type string.\n*\n* ## Notes\n*\n* - Downstream consumers of this function should **not** rely on specific integer values (e.g., `INT8 == 0`). Instead, the function should be used in an opaque manner.\n*\n* @param {string} dtype - data type string\n* @returns {(integer|null)} integer value or null\n*\n* @example\n* var v = str2enum( 'int8' );\n* // returns \n*/\nfunction str2enum( dtype ) {\n\tvar v = ENUM[ dtype ];\n\treturn ( typeof v === 'number' ) ? v : null; // note: we include this guard to prevent walking the prototype chain\n}\n\n\n// EXPORTS //\n\nmodule.exports = str2enum;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the enumeration constant associated with an ndarray data type string.\n*\n* @module @stdlib/ndarray/base/dtype-str2enum\n*\n* @example\n* var str2enum = require( '@stdlib/ndarray/base/dtype-str2enum' );\n*\n* var v = str2enum( 'float64' );\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar enum2str = require( './../../../base/dtype-enum2str' );\nvar str2enum = require( './../../../base/dtype-str2enum' );\n\n\n// MAIN //\n\n/**\n* Returns the data type string associated with a supported ndarray data type value.\n*\n* @param {*} dtype - data type value\n* @returns {(string|null)} data type string or null\n*\n* @example\n* var str2enum = require( '@stdlib/ndarray/base/dtype-str2enum' );\n*\n* var v = resolve( str2enum( 'float64' ) );\n* // returns 'float64'\n*/\nfunction resolve( dtype ) {\n\tvar t = ( typeof dtype );\n\tif ( t === 'string' ) {\n\t\treturn ( str2enum( dtype ) === null ) ? null : dtype;\n\t}\n\tif ( t === 'number' ) {\n\t\treturn enum2str( dtype );\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = resolve;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the data type string associated with a supported ndarray data type value.\n*\n* @module @stdlib/ndarray/base/dtype-resolve-str\n*\n* @example\n* var str2enum = require( '@stdlib/ndarray/base/dtype-str2enum' );\n* var resolve = require( '@stdlib/ndarray/base/dtype-resolve-str' );\n*\n* var v = resolve( str2enum( 'float64' ) );\n* // returns 'float64'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "{\n\t\"float64\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 0,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 0,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"float32\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"int32\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 0,\n\t\t\"int32\": 1,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 0,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"int16\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 1,\n\t\t\"int16\": 1,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"int8\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 1,\n\t\t\"int16\": 1,\n\t\t\"int8\": 1,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"uint32\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 0,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 1,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 0,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"uint16\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 1,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 1,\n\t\t\"uint16\": 1,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"uint8\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 1,\n\t\t\"int16\": 1,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 1,\n\t\t\"uint16\": 1,\n\t\t\"uint8\": 1,\n\t\t\"uint8c\": 1,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"uint8c\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 1,\n\t\t\"int16\": 1,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 1,\n\t\t\"uint16\": 1,\n\t\t\"uint8\": 1,\n\t\t\"uint8c\": 1,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"complex128\": {\n\t\t\"float64\": 0,\n\t\t\"float32\": 0,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 0,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"complex64\": {\n\t\t\"float64\": 0,\n\t\t\"float32\": 0,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"generic\": {\n\t\t\"float64\": 0,\n\t\t\"float32\": 0,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 0,\n\t\t\"complex64\": 0,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"binary\": {\n\t\t\"float64\": 0,\n\t\t\"float32\": 0,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 0,\n\t\t\"complex64\": 0,\n\t\t\"binary\": 1,\n\t\t\"generic\": 0\n\t}\n}\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar objectKeys = require( '@stdlib/utils/keys' );\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar resolve = require( './../../base/dtype-resolve-str' );\nvar SAFE_CASTS = require( './safe_casts.json' );\n\n\n// VARIABLES //\n\nvar TABLE;\n\n\n// FUNCTIONS //\n\n/**\n* Generates a full table of safe casts for each ndarray data type.\n*\n* @private\n* @returns {Object} table\n*/\nfunction generateFullTable() {\n\tvar dtypes;\n\tvar ntypes;\n\tvar out;\n\tvar tmp;\n\tvar dt1;\n\tvar dt2;\n\tvar o;\n\tvar j;\n\tvar i;\n\n\tout = {};\n\tdtypes = objectKeys( SAFE_CASTS );\n\tntypes = dtypes.length;\n\tfor ( i = 0; i < ntypes; i++ ) {\n\t\tdt1 = dtypes[ i ];\n\t\to = SAFE_CASTS[ dt1 ];\n\t\ttmp = {};\n\t\tfor ( j = 0; j < ntypes; j++ ) {\n\t\t\tdt2 = dtypes[ j ];\n\t\t\ttmp[ dt2 ] = o[ dt2 ];\n\t\t}\n\t\tout[ dt1 ] = tmp;\n\t}\n\treturn out;\n}\n\n/**\n* Generates a table of safe casts for each ndarray data type.\n*\n* @private\n* @returns {Object} table\n*/\nfunction generateTable() {\n\tvar dtypes;\n\tvar ntypes;\n\tvar out;\n\tvar tmp;\n\tvar dt1;\n\tvar dt2;\n\tvar o;\n\tvar j;\n\tvar i;\n\n\tout = {};\n\tdtypes = objectKeys( SAFE_CASTS );\n\tntypes = dtypes.length;\n\tfor ( i = 0; i < ntypes; i++ ) {\n\t\tdt1 = dtypes[ i ];\n\t\to = SAFE_CASTS[ dt1 ];\n\t\ttmp = [];\n\t\tfor ( j = 0; j < ntypes; j++ ) {\n\t\t\tdt2 = dtypes[ j ];\n\t\t\tif ( o[ dt2 ] === 1 ) {\n\t\t\t\ttmp.push( dt2 );\n\t\t\t}\n\t\t}\n\t\tout[ dt1 ] = tmp;\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Returns a list of ndarray data types to which a provided ndarray data type can be safely cast.\n*\n* @param {*} [dtype] - ndarray data type value\n* @returns {(Object|StringArray|null)} list of ndarray data types or null\n*\n* @example\n* var list = safeCasts( 'float32' );\n* // returns [...]\n*/\nfunction safeCasts( dtype ) {\n\tif ( arguments.length === 0 ) {\n\t\treturn generateFullTable();\n\t}\n\tif ( TABLE === void 0 ) {\n\t\t// Lazily generate table...\n\t\tTABLE = generateTable();\n\t}\n\tdtype = resolve( dtype );\n\tif ( hasOwnProp( TABLE, dtype ) ) {\n\t\treturn TABLE[ dtype ].slice();\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = safeCasts;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a list of ndarray data types to which a provided ndarray data type can be safely cast.\n*\n* @module @stdlib/ndarray/safe-casts\n*\n* @example\n* var safeCasts = require( '@stdlib/ndarray/safe-casts' );\n*\n* var list = safeCasts( 'float32' );\n* // returns [...]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar safeCasts = require( './../../../../safe-casts' );\n\n\n// VARIABLES //\n\nvar TABLE = safeCasts();\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type.\n*\n* @param {string} from - ndarray data type\n* @param {string} to - ndarray data type\n* @returns {boolean} boolean indicating if a data type can be safely cast to another data type\n*\n* @example\n* var bool = isSafeCast( 'float32', 'float64' );\n* // returns true\n*\n* bool = isSafeCast( 'float64', 'int32' );\n* // returns false\n*/\nfunction isSafeCast( from, to ) {\n\tif ( from === to ) {\n\t\treturn true;\n\t}\n\treturn ( TABLE[ from ][ to ] > 0 );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isSafeCast;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine if an ndarray data type can be safely cast to another ndarray data type.\n*\n* @module @stdlib/ndarray/base/assert/is-safe-data-type-cast\n*\n* @example\n* var isSafeCast = require( '@stdlib/ndarray/base/assert/is-safe-data-type-cast' );\n*\n* var bool = isSafeCast( 'float32', 'float64' );\n* // returns true\n*\n* bool = isSafeCast( 'float64', 'int32' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "{\n\t\"float64\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 0,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"float32\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"int32\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 0,\n\t\t\"int32\": 1,\n\t\t\"int16\": 1,\n\t\t\"int8\": 1,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 0,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"int16\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 1,\n\t\t\"int16\": 1,\n\t\t\"int8\": 1,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"int8\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 1,\n\t\t\"int16\": 1,\n\t\t\"int8\": 1,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"uint32\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 0,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 1,\n\t\t\"uint16\": 1,\n\t\t\"uint8\": 1,\n\t\t\"uint8c\": 1,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 0,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"uint16\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 1,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 1,\n\t\t\"uint16\": 1,\n\t\t\"uint8\": 1,\n\t\t\"uint8c\": 1,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"uint8\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 1,\n\t\t\"int16\": 1,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 1,\n\t\t\"uint16\": 1,\n\t\t\"uint8\": 1,\n\t\t\"uint8c\": 1,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"uint8c\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 1,\n\t\t\"int16\": 1,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 1,\n\t\t\"uint16\": 1,\n\t\t\"uint8\": 1,\n\t\t\"uint8c\": 1,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"complex128\": {\n\t\t\"float64\": 0,\n\t\t\"float32\": 0,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 0\n\t},\n\t\"complex64\": {\n\t\t\"float64\": 0,\n\t\t\"float32\": 0,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 0\n\t},\n\t\"generic\": {\n\t\t\"float64\": 0,\n\t\t\"float32\": 0,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 0,\n\t\t\"complex64\": 0,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"binary\": {\n\t\t\"float64\": 0,\n\t\t\"float32\": 0,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 0,\n\t\t\"complex64\": 0,\n\t\t\"binary\": 1,\n\t\t\"generic\": 0\n\t}\n}\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar objectKeys = require( '@stdlib/utils/keys' );\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar resolve = require( './../../base/dtype-resolve-str' );\nvar SAME_KIND_CASTS = require( './same_kind_casts.json' );\n\n\n// VARIABLES //\n\nvar TABLE;\n\n\n// FUNCTIONS //\n\n/**\n* Generates a full table of same \"kind\" casts for each ndarray data type.\n*\n* @private\n* @returns {Object} table\n*/\nfunction generateFullTable() {\n\tvar dtypes;\n\tvar ntypes;\n\tvar out;\n\tvar tmp;\n\tvar dt1;\n\tvar dt2;\n\tvar o;\n\tvar j;\n\tvar i;\n\n\tout = {};\n\tdtypes = objectKeys( SAME_KIND_CASTS );\n\tntypes = dtypes.length;\n\tfor ( i = 0; i < ntypes; i++ ) {\n\t\tdt1 = dtypes[ i ];\n\t\to = SAME_KIND_CASTS[ dt1 ];\n\t\ttmp = {};\n\t\tfor ( j = 0; j < ntypes; j++ ) {\n\t\t\tdt2 = dtypes[ j ];\n\t\t\ttmp[ dt2 ] = o[ dt2 ];\n\t\t}\n\t\tout[ dt1 ] = tmp;\n\t}\n\treturn out;\n}\n\n/**\n* Generates a table of same \"kind\" casts for each ndarray data type.\n*\n* @private\n* @returns {Object} table\n*/\nfunction generateTable() {\n\tvar dtypes;\n\tvar ntypes;\n\tvar out;\n\tvar tmp;\n\tvar dt1;\n\tvar dt2;\n\tvar o;\n\tvar j;\n\tvar i;\n\n\tout = {};\n\tdtypes = objectKeys( SAME_KIND_CASTS );\n\tntypes = dtypes.length;\n\tfor ( i = 0; i < ntypes; i++ ) {\n\t\tdt1 = dtypes[ i ];\n\t\to = SAME_KIND_CASTS[ dt1 ];\n\t\ttmp = [];\n\t\tfor ( j = 0; j < ntypes; j++ ) {\n\t\t\tdt2 = dtypes[ j ];\n\t\t\tif ( o[ dt2 ] === 1 ) {\n\t\t\t\ttmp.push( dt2 );\n\t\t\t}\n\t\t}\n\t\tout[ dt1 ] = tmp;\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Returns a list of ndarray data types to which a provided ndarray data type can be safely cast or cast within the same \"kind\".\n*\n* @param {*} [dtype] - ndarray data type value\n* @returns {(Object|StringArray|null)} list of ndarray data types or null\n*\n* @example\n* var list = sameKindCasts( 'float32' );\n* // returns [...]\n*/\nfunction sameKindCasts( dtype ) {\n\tif ( arguments.length === 0 ) {\n\t\treturn generateFullTable();\n\t}\n\tif ( TABLE === void 0 ) {\n\t\t// Lazily generate table...\n\t\tTABLE = generateTable();\n\t}\n\tdtype = resolve( dtype );\n\tif ( hasOwnProp( TABLE, dtype ) ) {\n\t\treturn TABLE[ dtype ].slice();\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sameKindCasts;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a list of ndarray data types to which a provided ndarray data type can be safely cast or cast within the same \"kind\".\n*\n* @module @stdlib/ndarray/same-kind-casts\n*\n* @example\n* var sameKindCasts = require( '@stdlib/ndarray/same-kind-casts' );\n*\n* var list = sameKindCasts( 'float32' );\n* // returns [...]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar sameKindCasts = require( './../../../../same-kind-casts' );\n\n\n// VARIABLES //\n\nvar TABLE = sameKindCasts();\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same \"kind\" as, another ndarray data type.\n*\n* @param {string} from - ndarray data type\n* @param {string} to - ndarray data type\n* @returns {boolean} boolean indicating if a data type can be cast to another data type\n*\n* @example\n* var bool = isSameKindCast( 'float32', 'float64' );\n* // returns true\n*\n* bool = isSameKindCast( 'uint16', 'int16' );\n* // returns false\n*/\nfunction isSameKindCast( from, to ) {\n\tif ( from === to ) {\n\t\treturn true;\n\t}\n\treturn ( TABLE[ from ][ to ] > 0 );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isSameKindCast;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine if an ndarray data type can be safely cast to, or is of the same \"kind\" as, another ndarray data type.\n*\n* @module @stdlib/ndarray/base/assert/is-same-kind-data-type-cast\n*\n* @example\n* var isSameKindCast = require( '@stdlib/ndarray/base/assert/is-same-kind-data-type-cast' );\n*\n* var bool = isSameKindCast( 'float32', 'float64' );\n* // returns true\n*\n* bool = isSameKindCast( 'uint16', 'int16' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isSafeCast = require( './../../../../base/assert/is-safe-data-type-cast' );\nvar isSameKindCast = require( './../../../../base/assert/is-same-kind-data-type-cast' );\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode.\n*\n* @param {string} from - ndarray data type\n* @param {string} to - ndarray data type\n* @param {string} casting - ndarray casting mode\n* @returns {boolean} boolean indicating if a data type can be cast to another data type\n*\n* @example\n* var bool = isAllowedCast( 'float32', 'float64', 'safe' );\n* // returns true\n*\n* bool = isAllowedCast( 'float64', 'int32', 'safe' );\n* // returns false\n*/\nfunction isAllowedCast( from, to, casting ) {\n\t// Anything goes for \"unsafe\" casting...\n\tif ( casting === 'unsafe' ) {\n\t\treturn true;\n\t}\n\t// \"Casting\" to the same data type is always allowed, regardless of the casting mode...\n\tif ( from === to ) {\n\t\treturn true;\n\t}\n\t// No casts between different data types are allowed in \"none\" or \"equiv\" casting modes...\n\tif ( casting === 'none' || casting === 'equiv' ) {\n\t\treturn false;\n\t}\n\t// In \"safe\" casting mode, only casts which preserve values are allowed...\n\tif ( casting === 'safe' ) {\n\t\treturn isSafeCast( from, to );\n\t}\n\t// In \"same-kind\" casting mode, in addition to \"safe\" casts, casts within a \"kind\" (e.g., between signed integers or between floating-point numbers) are allowed...\n\treturn isSameKindCast( from, to );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isAllowedCast;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine if an array data type can be cast to another array data type according to a specified casting rule.\n*\n* @module @stdlib/ndarray/base/assert/is-allowed-data-type-cast\n*\n* @example\n* var isAllowedCast = require( '@stdlib/ndarray/base/assert/is-allowed-data-type-cast' );\n*\n* var bool = isAllowedCast( 'float32', 'float64', 'safe' );\n* // returns true\n*\n* bool = isAllowedCast( 'float64', 'int32', 'safe' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar Buffer = require( '@stdlib/buffer/ctor' );\nvar Float64Array = require( '@stdlib/array/float64' );\nvar Float32Array = require( '@stdlib/array/float32' );\nvar Int16Array = require( '@stdlib/array/int16' );\nvar Int32Array = require( '@stdlib/array/int32' );\nvar Int8Array = require( '@stdlib/array/int8' );\nvar Uint16Array = require( '@stdlib/array/uint16' );\nvar Uint32Array = require( '@stdlib/array/uint32' );\nvar Uint8Array = require( '@stdlib/array/uint8' );\nvar Uint8ClampedArray = require( '@stdlib/array/uint8c' );\nvar Complex64Array = require( '@stdlib/array/complex64' );\nvar Complex128Array = require( '@stdlib/array/complex128' );\n\n\n// MAIN //\n\n// Mapping from data types to underlying buffer constructors...\nvar ctors = {\n\t'binary': Buffer,\n\t'float64': Float64Array,\n\t'float32': Float32Array,\n\t'generic': Array, // TODO: replace with `stdlib` pkg\n\t'int16': Int16Array,\n\t'int32': Int32Array,\n\t'int8': Int8Array,\n\t'uint16': Uint16Array,\n\t'uint32': Uint32Array,\n\t'uint8': Uint8Array,\n\t'uint8c': Uint8ClampedArray,\n\t'complex64': Complex64Array,\n\t'complex128': Complex128Array\n};\n\n\n// EXPORTS //\n\nmodule.exports = ctors;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar table = require( './ctors.js' );\n\n\n// MAIN //\n\n/**\n* Returns an ndarray data buffer constructor.\n*\n* @param {string} dtype - data type\n* @returns {(Function|null)} data buffer constructor or null\n*\n* @example\n* var ctor = ctors( 'float64' );\n* // returns \n*\n* @example\n* var ctor = ctors( 'float' );\n* // returns null\n*/\nfunction ctors( dtype ) {\n\treturn table[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ctors;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* ndarray data buffer constructors.\n*\n* @module @stdlib/ndarray/base/buffer-ctors\n*\n* @example\n* var ctors = require( '@stdlib/ndarray/base/buffer-ctors' );\n*\n* var ctor = ctors( 'float64' );\n* // returns \n*\n* ctor = ctors( 'int' );\n* // returns null\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Fills an array-like object with zeros.\n*\n* @private\n* @param {(Array|TypedArray|Buffer)} v - array-like object to fill\n* @returns {(Array|TypedArray|Buffer)} input value\n*\n* @example\n* var arr = zeros( new Array( 2 ) );\n* // returns [ 0, 0 ]\n*/\nfunction zeros( v ) {\n\tvar i;\n\tfor ( i = 0; i < v.length; i++ ) {\n\t\tv[ i ] = 0;\n\t}\n\treturn v;\n}\n\n\n// EXPORTS //\n\nmodule.exports = zeros;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar bufferCtors = require( './../../../base/buffer-ctors' );\nvar allocUnsafe = require( '@stdlib/buffer/alloc-unsafe' );\nvar zeros = require( './zeros.js' );\n\n\n// FUNCTIONS //\n\n/**\n* Returns a zero-filled generic array.\n*\n* @private\n* @param {NonNegativeInteger} size - buffer size\n* @returns {Array} zero-filled generic array\n*/\nfunction generic( size ) {\n\tvar buf;\n\tvar i;\n\n\tbuf = [];\n\tfor ( i = 0; i < size; i++ ) {\n\t\tbuf.push( 0 );\n\t}\n\treturn buf;\n}\n\n/**\n* Returns a zero-filled binary buffer.\n*\n* @private\n* @param {NonNegativeInteger} size - buffer size\n* @returns {Buffer} zero-filled binary buffer\n*/\nfunction binary( size ) {\n\treturn zeros( allocUnsafe( size ) );\n}\n\n/**\n* Returns a zero-filled typed array.\n*\n* @private\n* @param {string} dtype - data type\n* @param {NonNegativeInteger} size - buffer size\n* @returns {(TypedArray|null)} zero-filled typed array\n*/\nfunction typedarray( dtype, size ) {\n\tvar ctor = bufferCtors( dtype );\n\tif ( ctor ) {\n\t\treturn new ctor( size );\n\t}\n\treturn null;\n}\n\n\n// MAIN //\n\n/**\n* Returns a zero-filled contiguous linear ndarray data buffer.\n*\n* @param {string} dtype - data type\n* @param {NonNegativeInteger} size - buffer size\n* @returns {(Array|TypedArray|Buffer|null)} data buffer\n*\n* @example\n* var buf = buffer( 'float64', 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*/\nfunction buffer( dtype, size ) {\n\tif ( dtype === 'generic' ) {\n\t\treturn generic( size );\n\t}\n\tif ( dtype === 'binary' ) {\n\t\treturn binary( size );\n\t}\n\treturn typedarray( dtype, size );\n}\n\n\n// EXPORTS //\n\nmodule.exports = buffer;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create a zero-filled contiguous linear ndarray data buffer.\n*\n* @module @stdlib/ndarray/base/buffer\n*\n* @example\n* var buffer = require( '@stdlib/ndarray/base/buffer' );\n*\n* var buf = buffer( 'float64', 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n// Mapping from ndarray data buffer constructors to data types...\nvar dtypes = {\n\t'Buffer': 'binary',\n\t'Float32Array': 'float32',\n\t'Float64Array': 'float64',\n\t'Array': 'generic',\n\t'Int16Array': 'int16',\n\t'Int32Array': 'int32',\n\t'Int8Array': 'int8',\n\t'Object': 'generic',\n\t'Uint16Array': 'uint16',\n\t'Uint32Array': 'uint32',\n\t'Uint8Array': 'uint8',\n\t'Uint8ClampedArray': 'uint8c',\n\t'Complex64Array': 'complex64',\n\t'Complex128Array': 'complex128'\n};\n\n\n// EXPORTS //\n\nmodule.exports = dtypes;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar Float64Array = require( '@stdlib/array/float64' );\nvar Float32Array = require( '@stdlib/array/float32' );\nvar Uint32Array = require( '@stdlib/array/uint32' );\nvar Int32Array = require( '@stdlib/array/int32' );\nvar Uint16Array = require( '@stdlib/array/uint16' );\nvar Int16Array = require( '@stdlib/array/int16' );\nvar Uint8Array = require( '@stdlib/array/uint8' );\nvar Uint8ClampedArray = require( '@stdlib/array/uint8c' );\nvar Int8Array = require( '@stdlib/array/int8' );\nvar Complex64Array = require( '@stdlib/array/complex64' );\nvar Complex128Array = require( '@stdlib/array/complex128' );\n\n\n// MAIN //\n\n// Note: order should match `dtypes` order\nvar CTORS = [\n\tFloat64Array,\n\tFloat32Array,\n\tInt32Array,\n\tUint32Array,\n\tInt16Array,\n\tUint16Array,\n\tInt8Array,\n\tUint8Array,\n\tUint8ClampedArray,\n\tComplex64Array,\n\tComplex128Array\n];\n\n\n// EXPORTS //\n\nmodule.exports = CTORS;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n// Note: order should match `ctors` order\nvar DTYPES = [\n\t'float64',\n\t'float32',\n\t'int32',\n\t'uint32',\n\t'int16',\n\t'uint16',\n\t'int8',\n\t'uint8',\n\t'uint8c',\n\t'complex64',\n\t'complex128'\n];\n\n\n// EXPORTS //\n\nmodule.exports = DTYPES;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isBuffer = require( '@stdlib/assert/is-buffer' );\nvar isArray = require( '@stdlib/assert/is-array' );\nvar constructorName = require( '@stdlib/utils/constructor-name' );\nvar ctor2dtype = require( './ctor2dtype.js' );\nvar CTORS = require( './ctors.js' );\nvar DTYPES = require( './dtypes.js' );\n\n\n// VARIABLES //\n\nvar NTYPES = DTYPES.length;\n\n\n// MAIN //\n\n/**\n* Returns the data type of an ndarray data buffer.\n*\n* @param {*} value - input value\n* @returns {(string|null)} data type\n*\n* @example\n* var dt = dtype( [ 1, 2, 3 ] );\n* // returns 'generic'\n*\n* var dt = dtype( 'beep' );\n* // returns null\n*/\nfunction dtype( value ) {\n\tvar i;\n\tif ( isArray( value ) ) {\n\t\treturn 'generic';\n\t}\n\tif ( isBuffer( value ) ) {\n\t\treturn 'binary';\n\t}\n\tfor ( i = 0; i < NTYPES; i++ ) {\n\t\tif ( value instanceof CTORS[ i ] ) {\n\t\t\treturn DTYPES[ i ];\n\t\t}\n\t}\n\t// If the above failed, fall back to a more robust (and significantly slower) means for resolving underlying data types:\n\treturn ctor2dtype[ constructorName( value ) ] || null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dtype;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the data type of an ndarray data buffer.\n*\n* @module @stdlib/ndarray/base/buffer-dtype\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dtype = require( '@stdlib/ndarray/base/buffer-dtype' );\n*\n* var buf = new Float64Array( 10 );\n*\n* var dt = dtype( buf );\n* // returns 'float64'\n*\n* dt = dtype( {} );\n* // returns 'generic'\n*\n* dt = dtype( 'beep' );\n* // returns null\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isDataType = require( './../../base/assert/is-data-type' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns the data type of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @throws {TypeError} must provide an ndarray having a supported data type\n* @returns {string} data type\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'dtype': 'float64'\n* });\n*\n* var dt = dtype( x );\n* // returns 'float64'\n*/\nfunction dtype( x ) {\n\tvar dt;\n\n\t// Note: we intentionally avoid rigorous ndarray checks to minimize performance impacts. This obviously means that non-ndarray-like objects can sneak through, but this is likely all right for the purposes of this function...\n\tif ( typeof x !== 'object' || x === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\tdt = x.dtype;\n\tif ( isDataType( dt ) ) {\n\t\treturn dt;\n\t}\n\t// A data type is essential for interpreting the memory associated with an ndarray object, so no fallbacks or workarounds for data type resolution...\n\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray having a supported data type. Value: `%s`.', dt ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dtype;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the data type of a provided ndarray.\n*\n* @module @stdlib/ndarray/dtype\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var dtype = require( '@stdlib/ndarray/dtype' );\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'dtype': 'float64'\n* });\n*\n* var dt = dtype( x );\n* // returns 'float64'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isNonNegativeInteger = require( '@stdlib/assert/is-nonnegative-integer' ).isPrimitive;\nvar isCollection = require( '@stdlib/assert/is-collection' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns the shape of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @throws {TypeError} must provide an ndarray\n* @returns {NonNegativeIntegerArray} shape\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var out = shape( zeros( [ 3, 3, 3 ] ) );\n* // returns [ 3, 3, 3 ]\n*/\nfunction shape( x ) {\n\tvar out;\n\tvar sh;\n\tvar d;\n\tvar i;\n\n\t// Note: we intentionally avoid rigorous ndarray checks to minimize performance impacts. This obviously means that non-ndarray-like objects can sneak through, but this is likely all right for the purposes of this function...\n\tif ( typeof x !== 'object' || x === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\tsh = x.shape;\n\tif ( !isCollection( sh ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\t// Copy the shape in order to avoid unintended mutation...\n\tout = [];\n\tfor ( i = 0; i < sh.length; i++ ) {\n\t\td = sh[ i ];\n\t\tif ( !isNonNegativeInteger( d ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t\t}\n\t\tout.push( d );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = shape;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the shape of a provided ndarray.\n*\n* @module @stdlib/ndarray/shape\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var shape = require( '@stdlib/ndarray/shape' );\n*\n* var sh = shape( zeros( [ 3, 3, 3 ] ) );\n* // returns [ 3, 3, 3 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isInteger = require( '@stdlib/assert/is-integer' ).isPrimitive;\nvar isCollection = require( '@stdlib/assert/is-collection' );\nvar isOrder = require( './../../base/assert/is-order' );\nvar shape2strides = require( './../../base/shape2strides' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns the strides of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @throws {TypeError} must provide an ndarray\n* @returns {IntegerArray} strides\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var out = strides( zeros( [ 3, 3, 3 ] ) );\n* // returns [ 9, 3, 1 ]\n*/\nfunction strides( x ) {\n\tvar out;\n\tvar ord;\n\tvar sh;\n\tvar st;\n\tvar d;\n\tvar i;\n\n\t// Note: we intentionally avoid rigorous ndarray checks to minimize performance impacts. This obviously means that non-ndarray-like objects can sneak through, but this is likely all right for the purposes of this function...\n\tif ( typeof x !== 'object' || x === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\tst = x.strides; // TODO: consider whether we want to support ecosystem libraries, such as scijs/ndarray, which name this property `stride`\n\tif ( !isCollection( st ) ) {\n\t\t// WARNING: if no strides array, try to derive the strides from the shape. Note, however, that there is a lot that can go wrong here, as the only thing we are requiring is that the shape is a collection. The main point of going through the effort to compute strides is to support minimal ndarray-esque objects, where the only essential attributes are `shape` and `dtype` and where other attributes can be computed (e.g., `strides`, `offset`, `ndims`, `order`, etc), assuming single-segment contiguous data stored in row-major order...\n\t\tsh = x.shape;\n\t\tif ( !isCollection( sh ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t\t}\n\t\tif ( sh.length === 0 ) {\n\t\t\treturn [ 0 ];\n\t\t}\n\t\tord = x.order;\n\t\tif ( !isOrder( ord ) ) {\n\t\t\tord = 'row-major';\n\t\t}\n\t\treturn shape2strides( sh, ord );\n\t}\n\t// Copy the strides in order to avoid unintended mutation...\n\tout = [];\n\tfor ( i = 0; i < st.length; i++ ) {\n\t\td = st[ i ];\n\t\tif ( !isInteger( d ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t\t}\n\t\tout.push( d );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = strides;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the strides of a provided ndarray.\n*\n* @module @stdlib/ndarray/strides\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var strides = require( '@stdlib/ndarray/strides' );\n*\n* var sh = strides( zeros( [ 3, 3, 3 ] ) );\n* // returns [ 9, 3, 1 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isNonNegativeInteger = require( '@stdlib/assert/is-nonnegative-integer' ).isPrimitive;\nvar isCollection = require( '@stdlib/assert/is-collection' );\nvar strides2offset = require( './../../base/strides2offset' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns the index offset specifying the underlying buffer index of the first iterated ndarray element.\n*\n* @param {ndarrayLike} x - input ndarray\n* @throws {TypeError} must provide an ndarray\n* @returns {NonNegativeInteger} index offset\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var n = offset( zeros( [ 3, 3, 3 ] ) );\n* // returns 0\n*/\nfunction offset( x ) {\n\tvar st;\n\tvar sh;\n\tvar n;\n\n\t// Note: we intentionally avoid rigorous ndarray checks to minimize performance impacts. This obviously means that non-ndarray-like objects can sneak through, but this is likely all right for the purposes of this function...\n\tif ( typeof x !== 'object' || x === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\tn = x.offset;\n\tif ( isNonNegativeInteger( n ) ) {\n\t\treturn n;\n\t}\n\tsh = x.shape;\n\tif ( !isCollection( sh ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\tst = x.strides;\n\tif ( sh.length === 0 || !isCollection( st ) ) {\n\t\treturn 0;\n\t}\n\tn = strides2offset( sh, st );\n\tif ( isNonNegativeInteger( n ) ) {\n\t\treturn n;\n\t}\n\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = offset;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the index offset specifying the underlying buffer index of the first iterated ndarray element.\n*\n* @module @stdlib/ndarray/offset\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var offset = require( '@stdlib/ndarray/offset' );\n*\n* var n = offset( zeros( [ 3, 3, 3 ] ) );\n* // returns 0\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isNonNegativeInteger = require( '@stdlib/assert/is-nonnegative-integer' ).isPrimitive;\nvar isCollection = require( '@stdlib/assert/is-collection' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns the number of ndarray dimensions.\n*\n* @param {ndarrayLike} x - input ndarray\n* @throws {TypeError} must provide an ndarray\n* @returns {NonNegativeInteger} number of dimensions\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var n = ndims( zeros( [ 3, 3, 3 ] ) );\n* // returns 3\n*/\nfunction ndims( x ) {\n\tvar sh;\n\tvar n;\n\n\t// Note: we intentionally avoid rigorous ndarray checks to minimize performance impacts. This obviously means that non-ndarray-like objects can sneak through, but this is likely all right for the purposes of this function...\n\tif ( typeof x !== 'object' || x === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\tn = x.ndims;\n\tif ( isNonNegativeInteger( n ) ) {\n\t\treturn n;\n\t}\n\tsh = x.shape;\n\tif ( !isCollection( sh ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\treturn sh.length;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ndims;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the number of ndarray dimensions.\n*\n* @module @stdlib/ndarray/ndims\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var ndims = require( '@stdlib/ndarray/ndims' );\n*\n* var n = ndims( zeros( [ 3, 3, 3 ] ) );\n* // returns 3\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isOrder = require( './../../base/assert/is-order' );\nvar strides = require( './../../strides' );\nvar ndims = require( './../../ndims' );\nvar strides2order = require( './../../base/strides2order' );\nvar format = require( '@stdlib/string/format' );\n\n\n// VARIABLES //\n\nvar ROW_MAJOR = 'row-major';\nvar COLUMN_MAJOR = 'column-major';\n\n\n// MAIN //\n\n/**\n* Returns the layout order of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @throws {TypeError} must provide an ndarray\n* @returns {(string|null)} layout order\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'order': 'row-major'\n* });\n*\n* var out = order( x );\n* // returns 'row-major'\n*/\nfunction order( x ) {\n\tvar st;\n\tvar o;\n\n\t// Note: we intentionally avoid rigorous ndarray checks to minimize performance impacts. This obviously means that non-ndarray-like objects can sneak through, but this is likely all right for the purposes of this function...\n\tif ( typeof x !== 'object' || x === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\to = x.order;\n\tif ( isOrder( o ) ) {\n\t\treturn o;\n\t}\n\t// Try to infer the layout order from the strides array...\n\tst = strides( x );\n\to = strides2order( st );\n\tif ( o === 1 || o === 3 ) {\n\t\treturn ROW_MAJOR; // for o == 3 (both row- and column-major; e.g., one-dimensional ndarrays), default to row-major\n\t}\n\tif ( o === 2 ) {\n\t\treturn COLUMN_MAJOR;\n\t}\n\t// o === 0\n\tif ( ndims( x ) === 0 ) {\n\t\treturn ROW_MAJOR; // default to row-major for zero-dimensional ndarrays\n\t}\n\t// Case: mixed strides (e.g., [ 2, 3, 1 ] )\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = order;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the layout order of a provided ndarray.\n*\n* @module @stdlib/ndarray/order\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var order = require( '@stdlib/ndarray/order' );\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'order': 'row-major'\n* });\n*\n* var out = order( x );\n* // returns 'row-major'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isCollection = require( '@stdlib/assert/is-collection' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns the underlying data buffer of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @throws {TypeError} must provide an ndarray\n* @returns {Collection} underlying data buffer\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'dtype': 'float64'\n* });\n*\n* var out = data( x );\n* // returns \n*/\nfunction data( x ) {\n\tvar out;\n\n\t// Note: we intentionally avoid rigorous ndarray checks to minimize performance impacts. This obviously means that non-ndarray-like objects can sneak through, but this is likely all right for the purposes of this function...\n\tif ( typeof x !== 'object' || x === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\tout = x.data;\n\tif ( isCollection( out ) ) {\n\t\treturn out;\n\t}\n\t// A data buffer is essential for operating on an ndarray object, so no fallbacks or workarounds for data buffer resolution...\n\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = data;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the underlying data buffer of a provided ndarray.\n*\n* @module @stdlib/ndarray/data-buffer\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var data = require( '@stdlib/ndarray/data-buffer' );\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'dtype': 'float64'\n* });\n*\n* var out = data( x );\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar PINF = require( '@stdlib/constants/float64/pinf' );\nvar isInteger = require( '@stdlib/math/base/assert/is-integer' );\n\n\n// MAIN //\n\n/**\n* Tests (loosely) if an input value is an array-like object.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if an input value is an array-like object\n*\n* @example\n* var bool = isArrayLikeObject( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( '' );\n* // returns false\n*/\nfunction isArrayLikeObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length < PINF\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isArrayLikeObject;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar settings = require( './../../defaults' );\n\n\n// MAIN //\n\n/**\n* Returns default options.\n*\n* @private\n* @returns {Object} default options\n*\n* @example\n* var o = defaults();\n* // returns {...}\n*/\nfunction defaults() {\n\treturn {\n\t\t'casting': settings.get( 'casting' ),\n\t\t'copy': false,\n\t\t'dtype': settings.get( 'dtypes.default' ),\n\t\t'flatten': true,\n\t\t'mode': settings.get( 'index_mode' ),\n\t\t'ndmin': 0,\n\t\t'order': settings.get( 'order' ),\n\t\t'readonly': false\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = defaults;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar bufferCtors = require( './../../base/buffer-ctors' );\nvar allocUnsafe = require( '@stdlib/buffer/alloc-unsafe' );\n\n\n// MAIN //\n\n/**\n* Casts buffer elements by copying those elements to a buffer of another data type.\n*\n* @private\n* @param {(Array|TypedArray|Buffer)} buffer - input buffer\n* @param {NonNegativeInteger} len - number of elements to cast\n* @param {string} dtype - data type\n* @returns {(Array|TypedArray|Buffer)} output buffer\n*\n* @example\n* var b = castBuffer( [ 1.0, 2.0, 3.0 ], 3, 'float64' );\n* // returns [ 1.0, 2.0, 3.0 ]\n*/\nfunction castBuffer( buffer, len, dtype ) {\n\tvar ctor;\n\tvar out;\n\tvar i;\n\n\tctor = bufferCtors( dtype );\n\tif ( dtype === 'generic') {\n\t\tout = [];\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tout.push( buffer[ i ] );\n\t\t}\n\t} else if ( dtype === 'binary' ) {\n\t\tout = allocUnsafe( len );\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tout[ i ] = buffer[ i ];\n\t\t}\n\t} else {\n\t\tout = new ctor( len );\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tout[ i ] = buffer[ i ]; // TODO: wrap and use accessors here and above\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = castBuffer;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar bufferCtors = require( './../../base/buffer-ctors' );\nvar allocUnsafe = require( '@stdlib/buffer/alloc-unsafe' );\n\n\n// FUNCTIONS //\n\n/**\n* Copies a \"generic\" ndarray view.\n*\n* @private\n* @param {ndarray} arr - input ndarray\n* @returns {Array} output data buffer\n*/\nfunction generic( arr ) {\n\tvar len;\n\tvar out;\n\tvar i;\n\n\tlen = arr.length;\n\tout = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tout.push( arr.get( i ) ); // FIXME: what if `arr` has more than one dimensions?\n\t}\n\treturn out;\n}\n\n/**\n* Copies a \"binary\" ndarray view.\n*\n* @private\n* @param {ndarray} arr - input ndarray\n* @returns {Array} output data buffer\n*/\nfunction binary( arr ) {\n\tvar len;\n\tvar out;\n\tvar i;\n\n\tlen = arr.length;\n\tout = allocUnsafe( len );\n\tfor ( i = 0; i < len; i++ ) {\n\t\tout[ i ] = arr.get( i ); // FIXME: what if `arr` has more than one dimensions?\n\t}\n\treturn out;\n}\n\n/**\n* Copies a \"typed\" ndarray view.\n*\n* @private\n* @param {ndarray} arr - input ndarray\n* @param {string} dtype - data type\n* @returns {Array} output data buffer\n*/\nfunction typed( arr, dtype ) {\n\tvar ctor;\n\tvar len;\n\tvar out;\n\tvar i;\n\n\tctor = bufferCtors( dtype );\n\tlen = arr.length;\n\tout = new ctor( len ); // FIXME: need to account for complex number arrays; in which case, we may want to do something similar to `array/convert`\n\tfor ( i = 0; i < len; i++ ) {\n\t\tout[ i ] = arr.get( i ); // FIXME: what if `arr` has more than one dimensions?\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Copies an ndarray view to a data buffer.\n*\n* @private\n* @param {ndarray} arr - input ndarray\n* @param {string} dtype - data type\n* @returns {(Array|TypedArray|Buffer)} output data buffer\n*\n* @example\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n*\n* var buffer = [ 1.0, 2.0, 3.0 ];\n* var shape = [ 3 ];\n* var strides = [ -1 ];\n* var vec = ndarray( 'generic', buffer, shape, strides, 2, 'row-major' );\n*\n* var b = copyView( vec, 'float64' );\n* // returns [ 3.0, 2.0, 1.0 ]\n*/\nfunction copyView( arr, dtype ) {\n\t// TODO: handle complex number dtypes!!\n\tif ( dtype === 'generic') {\n\t\treturn generic( arr );\n\t}\n\tif ( dtype === 'binary' ) {\n\t\treturn binary( arr );\n\t}\n\treturn typed( arr, dtype );\n}\n\n\n// EXPORTS //\n\nmodule.exports = copyView;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Prepends singleton dimensions in order to satisfy a minimum number of dimensions.\n*\n* @private\n* @param {NonNegativeInteger} ndims - number of dimensions\n* @param {Array} shape - array dimensions\n* @param {NonNegativeInteger} ndmin - minimum number of dimensions\n* @returns {Array} output shape array\n*/\nfunction expandShape( ndims, shape, ndmin ) {\n\tvar out;\n\tvar i;\n\n\tout = [];\n\tfor ( i = 0; i < ndmin-ndims; i++ ) {\n\t\tout.push( 1 );\n\t}\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tout.push( shape[ i ] );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = expandShape;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Expands a strides array to accommodate an expanded array shape (i.e., an array shape with prepended singleton dimensions).\n*\n* @private\n* @param {NonNegativeInteger} ndims - number of dimensions\n* @param {Array} shape - expanded array shape\n* @param {Array} strides - strides array\n* @param {string} order - memory layout order\n* @returns {Array} output strides array\n*\n* @example\n* var out = expandStrides( 4, [ 1, 1, 2, 2 ], [ 1, 2 ], 'column-major' );\n* // returns [ 1, 1, 1, 2 ]\n*\n* @example\n* var out = expandStrides( 4, [ 1, 1, 2, 2 ], [ 2, 1 ], 'row-major' );\n* // returns [ 4, 4, 2, 1 ]\n*/\nfunction expandStrides( ndims, shape, strides, order ) {\n\tvar out;\n\tvar N;\n\tvar s;\n\tvar i;\n\tvar j;\n\n\tN = strides.length;\n\tj = ndims - N;\n\tout = [];\n\tif ( order === 'row-major' ) {\n\t\ts = abs( strides[ 0 ] ) * shape[ j ]; // at `j` is the size of the first non-prepended dimension\n\t\tfor ( i = 0; i < j; i++ ) {\n\t\t\tout.push( s );\n\t\t}\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tout.push( strides[ i ] );\n\t\t}\n\t} else { // column-major\n\t\tfor ( i = 0; i < j; i++ ) {\n\t\t\tout.push( 1 );\n\t\t}\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tout.push( strides[ i ] );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = expandStrides;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar isObject = require( '@stdlib/assert/is-plain-object' );\nvar isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;\nvar isArray = require( '@stdlib/assert/is-array' );\nvar isNonNegativeInteger = require( '@stdlib/assert/is-nonnegative-integer' ).isPrimitive;\nvar isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );\nvar shape2strides = require( './../../base/shape2strides' );\nvar strides2offset = require( './../../base/strides2offset' );\nvar strides2order = require( './../../base/strides2order' );\nvar numel = require( './../../base/numel' );\nvar ndarray = require( './../../ctor' );\nvar isDataType = require( './../../base/assert/is-data-type' );\nvar isOrder = require( './../../base/assert/is-order' );\nvar isCastingMode = require( './../../base/assert/is-casting-mode' );\nvar isAllowedCast = require( './../../base/assert/is-allowed-data-type-cast' );\nvar createBuffer = require( './../../base/buffer' );\nvar getBufferDType = require( './../../base/buffer-dtype' );\nvar getDType = require( './../../dtype' );\nvar getShape = require( './../../shape' );\nvar getStrides = require( './../../strides' );\nvar getOffset = require( './../../offset' );\nvar getOrder = require( './../../order' );\nvar getData = require( './../../data-buffer' );\nvar arrayShape = require( '@stdlib/array/shape' );\nvar flatten = require( '@stdlib/array/base/flatten' );\nvar format = require( '@stdlib/string/format' );\nvar isArrayLikeObject = require( './is_array_like_object.js' );\nvar getDefaults = require( './defaults.js' );\nvar castBuffer = require( './cast_buffer.js' );\nvar copyView = require( './copy_view.js' );\nvar expandShape = require( './expand_shape.js' );\nvar expandStrides = require( './expand_strides.js' );\n\n\n// VARIABLES //\n\nvar defaults = getDefaults();\n\n\n// MAIN //\n\n/**\n* Returns a multidimensional array.\n*\n* @param {(ArrayLikeObject|TypedArrayLike|Buffer|ndarrayLike)} [buffer] - data source\n* @param {Options} [options] - function options\n* @param {(ArrayLikeObject|TypedArrayLike|Buffer|ndarrayLike)} [options.buffer] - data source\n* @param {string} [options.dtype=\"float64\"] - underlying storage data type (if the input data is not of the same type, this option specifies the data type to which to cast the input data)\n* @param {string} [options.order=\"row-major\"] - specifies the memory layout of the array as either row-major (C-style) or column-major (Fortran-style)\n* @param {NonNegativeIntegerArray} [options.shape] - array shape\n* @param {string} [options.mode=\"throw\"] - specifies how to handle indices which exceed array dimensions\n* @param {StringArray} [options.submode=[\"throw\"]] - specifies how to handle subscripts which exceed array dimensions on a per dimension basis\n* @param {boolean} [options.copy=false] - boolean indicating whether to copy source data to a new data buffer\n* @param {boolean} [options.flatten=true] - boolean indicating whether to automatically flatten generic array data sources\n* @param {NonNegativeInteger} [options.ndmin=0] - minimum number of dimensions\n* @param {string} [options.casting=\"safe\"] - casting rule used to determine what constitutes an acceptable cast\n* @param {boolean} [options.readonly=false] - boolean indicating if an array should be read-only\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {Error} must provide either an array shape, data source, or both\n* @throws {Error} invalid cast\n* @throws {RangeError} data source must be compatible with specified meta data\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var arr = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var v = arr.get( 0, 0 );\n* // returns 1\n*\n* @example\n* var opts = {\n* 'dtype': 'generic',\n* 'flatten': false\n* };\n*\n* var arr = array( [ [ 1, 2 ], [ 3, 4 ] ], opts );\n* // returns \n*\n* var v = arr.get( 0 );\n* // returns [ 1, 2 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var opts = {\n* 'shape': [ 2, 2 ]\n* };\n*\n* var arr = array( new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] ), opts );\n* // returns \n*\n* var v = arr.get( 0, 0 );\n* // returns 1.0\n*/\nfunction array() {\n\tvar options;\n\tvar strides;\n\tvar buffer;\n\tvar offset;\n\tvar order;\n\tvar dtype;\n\tvar btype;\n\tvar shape;\n\tvar ndims;\n\tvar nopts;\n\tvar opts;\n\tvar osh;\n\tvar len;\n\tvar ord;\n\tvar FLG;\n\n\tif ( arguments.length === 1 ) {\n\t\tif ( isArrayLikeObject( arguments[ 0 ] ) ) {\n\t\t\tbuffer = arguments[ 0 ];\n\t\t\toptions = {};\n\t\t} else {\n\t\t\toptions = arguments[ 0 ];\n\t\t\tif ( !isObject( options ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide either a valid data source, options argument, or both. Value: `%s`.', options ) );\n\t\t\t}\n\t\t\tif ( hasOwnProp( options, 'buffer' ) ) {\n\t\t\t\tbuffer = options.buffer;\n\t\t\t\tif ( !isArrayLikeObject( buffer ) ) { // weak test\n\t\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be an array-like object, typed-array-like, a Buffer, or an ndarray. Option: `%s`.', 'buffer', buffer ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\tbuffer = arguments[ 0 ];\n\t\tif ( !isArrayLikeObject( buffer ) ) { // weak test\n\t\t\tthrow new TypeError( format( 'invalid option. Data source must be an array-like object, typed-array-like, a Buffer, or an ndarray. Value: `%s`.', buffer ) );\n\t\t}\n\t\toptions = arguments[ 1 ];\n\t\tif ( !isObject( options ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t\t}\n\t\t// Note: we ignore whether `options` has a `buffer` property\n\t}\n\tif ( buffer ) {\n\t\tif ( isndarrayLike( buffer ) ) {\n\t\t\tbtype = getDType( buffer );\n\t\t\tFLG = true;\n\t\t} else {\n\t\t\tbtype = getBufferDType( buffer );\n\t\t\tFLG = false;\n\t\t}\n\t}\n\tnopts = {};\n\topts = {};\n\n\t// Validate some options before others...\n\tif ( hasOwnProp( options, 'casting' ) ) {\n\t\topts.casting = options.casting;\n\t\tif ( !isCastingMode( opts.casting ) ) {\n\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a recognized casting mode. Option: `%s`.', 'casting', opts.casting ) );\n\t\t}\n\t} else {\n\t\topts.casting = defaults.casting;\n\t}\n\tif ( hasOwnProp( options, 'flatten' ) ) {\n\t\topts.flatten = options.flatten;\n\t\tif ( !isBoolean( opts.flatten ) ) {\n\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'flatten', opts.flatten ) );\n\t\t}\n\t} else {\n\t\topts.flatten = defaults.flatten;\n\t}\n\tif ( hasOwnProp( options, 'ndmin' ) ) {\n\t\topts.ndmin = options.ndmin;\n\t\tif ( !isNonNegativeInteger( opts.ndmin ) ) {\n\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a nonnegative integer. Option: `%s`.', 'ndmin', opts.ndmin ) );\n\t\t}\n\t\t// TODO: validate that minimum number of dimensions does not exceed the maximum number of possible dimensions (in theory, infinite; in practice, determined by max array length; see https://github.com/stdlib-js/stdlib/blob/ac350059877c036640775d6b30d0e98e840d07cf/lib/node_modules/%40stdlib/ndarray/ctor/lib/main.js#L57)\n\t} else {\n\t\topts.ndmin = defaults.ndmin;\n\t}\n\n\t// Validate the remaining options...\n\tif ( hasOwnProp( options, 'dtype' ) ) {\n\t\tdtype = options.dtype;\n\t\tif ( !isDataType( dtype ) ) {\n\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a recognized data type. Option: `%s`.', 'dtype', dtype ) );\n\t\t}\n\t\tif ( btype && !isAllowedCast( btype, dtype, opts.casting ) ) {\n\t\t\tthrow new Error( format( 'invalid option. Data type cast is not allowed. Casting mode: `%s`. From: `%s`. To: `%s`.', opts.casting, btype, dtype ) );\n\t\t}\n\t} else if ( btype ) {\n\t\t// TODO: reconcile difference in behavior when provided a generic array and no `dtype` option. Currently, we cast here, but do not allow casting a generic array (by default) when explicitly providing a `dtype` option.\n\n\t\t// Only cast generic array data sources when not provided an ndarray...\n\t\tif ( !FLG && btype === 'generic' ) {\n\t\t\tdtype = defaults.dtype;\n\t\t} else {\n\t\t\tdtype = btype;\n\t\t}\n\t} else {\n\t\tdtype = defaults.dtype;\n\t}\n\tif ( hasOwnProp( options, 'order' ) ) {\n\t\torder = options.order;\n\t\tif ( order === 'any' || order === 'same' ) {\n\t\t\tif ( FLG ) {\n\t\t\t\t// If the user indicated that \"any\" order suffices (meaning the user does not care about ndarray order), then we use the default order, unless the input ndarray is either unequivocally \"row-major\" or \"column-major\" or configured as such....\n\t\t\t\tif ( order === 'any' ) {\n\t\t\t\t\t// Compute the layout order in order to ascertain whether an ndarray can be considered both \"row-major\" and \"column-major\":\n\t\t\t\t\tord = strides2order( getStrides( buffer ) );\n\n\t\t\t\t\t// If the ndarray can be considered both \"row-major\" and \"column-major\", then use the default order; otherwise, use the ndarray's stated layout order...\n\t\t\t\t\tif ( ord === 3 ) {\n\t\t\t\t\t\torder = defaults.order;\n\t\t\t\t\t} else {\n\t\t\t\t\t\torder = getOrder( buffer );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Otherwise, use the same order as the provided ndarray...\n\t\t\t\telse if ( order === 'same' ) {\n\t\t\t\t\torder = getOrder( buffer );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\torder = defaults.order;\n\t\t\t}\n\t\t} else if ( !isOrder( order ) ) {\n\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a recognized order. Option: `%s`.', 'order', order ) );\n\t\t}\n\t} else {\n\t\torder = defaults.order;\n\t}\n\tif ( hasOwnProp( options, 'mode' ) ) {\n\t\tnopts.mode = options.mode;\n\t} else {\n\t\tnopts.mode = defaults.mode;\n\t}\n\tif ( hasOwnProp( options, 'submode' ) ) {\n\t\tnopts.submode = options.submode;\n\t} else {\n\t\tnopts.submode = [ nopts.mode ];\n\t}\n\tif ( hasOwnProp( options, 'readonly' ) ) {\n\t\tnopts.readonly = options.readonly;\n\t} else {\n\t\tnopts.readonly = defaults.readonly;\n\t}\n\tif ( hasOwnProp( options, 'copy' ) ) {\n\t\topts.copy = options.copy;\n\t\tif ( !isBoolean( opts.copy ) ) {\n\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'copy', opts.copy ) );\n\t\t}\n\t} else {\n\t\topts.copy = defaults.copy;\n\t}\n\t// If not provided a shape, infer from a provided data source...\n\tif ( hasOwnProp( options, 'shape' ) ) {\n\t\tshape = options.shape;\n\t\tif ( !isArrayLikeObject( shape ) ) { // weak test\n\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be an array-like object containing nonnegative integers. Option: `%s`.', 'shape', shape ) );\n\t\t}\n\t\tndims = shape.length;\n\t\tlen = numel( shape );\n\t} else if ( buffer ) {\n\t\tif ( FLG ) {\n\t\t\tshape = getShape( buffer );\n\t\t\tndims = shape.length;\n\t\t\tlen = numel( shape );\n\t\t} else if ( opts.flatten && isArray( buffer ) ) {\n\t\t\tshape = arrayShape( buffer );\n\t\t\tosh = shape; // cache a reference to the inferred shape\n\t\t\tndims = shape.length;\n\t\t\tlen = numel( shape );\n\t\t} else {\n\t\t\tndims = 1;\n\t\t\tlen = buffer.length;\n\t\t\tshape = [ len ]; // assume a 1-dimensional array (vector)\n\t\t}\n\t} else {\n\t\tthrow new Error( 'invalid arguments. Must provide either a data source, array shape, or both.' );\n\t}\n\t// Adjust the array shape to satisfy the minimum number of dimensions...\n\tif ( ndims < opts.ndmin ) {\n\t\tshape = expandShape( ndims, shape, opts.ndmin );\n\t\tndims = opts.ndmin;\n\t}\n\t// If not provided a data buffer, create it; otherwise, see if we need to cast a provided data buffer to another data type or perform a copy...\n\tif ( FLG ) {\n\t\tif ( numel( buffer.shape ) !== len ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Array shape is incompatible with provided data source. Number of data source elements does not match array shape.' );\n\t\t}\n\t\tif ( btype !== dtype || opts.copy ) {\n\t\t\tbuffer = copyView( buffer, dtype );\n\t\t} else {\n\t\t\tstrides = getStrides( buffer );\n\t\t\toffset = getOffset( buffer );\n\t\t\tbuffer = getData( buffer );\n\t\t\tif ( strides.length < ndims ) {\n\t\t\t\t// Account for augmented dimensions (note: expanding the strides array to account for prepended singleton dimensions does **not** affect the index offset):\n\t\t\t\tstrides = expandStrides( ndims, shape, strides, order );\n\t\t\t}\n\t\t}\n\t} else if ( buffer ) {\n\t\tif ( btype === 'generic' && opts.flatten ) {\n\t\t\tbuffer = flatten( buffer, osh || arrayShape( buffer ), false );\n\t\t}\n\t\tif ( buffer.length !== len ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Array shape is incompatible with provided data source. Number of data source elements does not match array shape.' );\n\t\t}\n\t\tif ( btype !== dtype || opts.copy ) {\n\t\t\tbuffer = castBuffer( buffer, len, dtype );\n\t\t}\n\t} else {\n\t\tbuffer = createBuffer( dtype, len );\n\t}\n\t// If we have yet to determine array strides, we assume that we can compute the strides, along with the index offset, for a **contiguous** data source based solely on the array shape and specified memory layout order...\n\tif ( strides === void 0 ) {\n\t\tstrides = shape2strides( shape, order );\n\t\toffset = strides2offset( shape, strides );\n\t}\n\treturn new ndarray( dtype, buffer, shape, strides, offset, order, nopts );\n}\n\n\n// EXPORTS //\n\nmodule.exports = array;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Multidimensional array.\n*\n* @module @stdlib/ndarray/array\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var arr = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var v = arr.get( 0, 0 );\n* // returns 1\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var opts = {\n* 'dtype': 'generic',\n* 'flatten': false\n* };\n*\n* var arr = array( [ [ 1, 2 ], [ 3, 4 ] ], opts );\n* // returns \n*\n* var v = arr.get( 0 );\n* // returns [ 1, 2 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var opts = {\n* 'shape': [ 2, 2 ]\n* };\n*\n* var arr = array( new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] ), opts );\n* // returns \n*\n* var v = arr.get( 0, 0 );\n* // returns 1.0\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar numel = require( './../../../../base/numel' );\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a buffer length is compatible with a provided shape array.\n*\n* @param {NonNegativeInteger} len - buffer length\n* @param {NonNegativeIntegerArray} shape - array shape\n* @returns {boolean} boolean indicating if a buffer length is compatible with a provided shape array\n*\n* @example\n* var shape = [ 2, 2 ];\n*\n* var bool = isBufferLengthCompatibleShape( 4, shape );\n* // returns true\n*\n* @example\n* var shape = [ 2, 2 ];\n*\n* var bool = isBufferLengthCompatibleShape( 3, shape );\n* // returns false\n*/\nfunction isBufferLengthCompatibleShape( len, shape ) { // eslint-disable-line id-length\n\treturn ( len >= numel( shape ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isBufferLengthCompatibleShape;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a boolean indicating if a buffer length is compatible with a provided shape array.\n*\n* @module @stdlib/ndarray/base/assert/is-buffer-length-compatible-shape\n*\n* @example\n* var isBufferLengthCompatibleShape = require( '@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape' );\n*\n* var shape = [ 2, 2 ];\n*\n* var bool = isBufferLengthCompatibleShape( 10, shape );\n* // returns true\n*\n* @example\n* var isBufferLengthCompatibleShape = require( '@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape' );\n*\n* var shape = [ 2, 2 ];\n*\n* var bool = isBufferLengthCompatibleShape( 3, shape );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if an array is column-major based on a provided stride array.\n*\n* @param {IntegerArray} strides - stride array\n* @returns {boolean} boolean indicating if an array is column-major\n*\n* @example\n* var bool = isColumnMajor( [ 1, 2 ] );\n* // returns true\n*\n* bool = isColumnMajor( [ 2, 1 ] );\n* // returns false\n*/\nfunction isColumnMajor( strides ) {\n\tvar ndims;\n\tvar s1;\n\tvar s2;\n\tvar i;\n\n\tndims = strides.length;\n\tif ( ndims === 0 ) {\n\t\treturn false;\n\t}\n\ts1 = abs( strides[ 0 ] );\n\tfor ( i = 1; i < ndims; i++ ) {\n\t\ts2 = abs( strides[ i ] );\n\t\tif ( s2 < s1 ) {\n\t\t\treturn false;\n\t\t}\n\t\ts1 = s2;\n\t}\n\treturn true;\n}\n\n\n// EXPORTS //\n\nmodule.exports = isColumnMajor;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Given a stride array, determine whether an array is column-major.\n*\n* @module @stdlib/ndarray/base/assert/is-column-major\n*\n* @example\n* var isColumnMajor = require( '@stdlib/ndarray/base/assert/is-column-major' );\n*\n* var bool = isColumnMajor( [ 1, 2 ] );\n* // returns true\n*\n* bool = isColumnMajor( [ 2, 1 ] );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar numel = require( './../../../../base/numel' );\nvar minmax = require( './../../../../base/minmax-view-buffer-index' );\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if an array is compatible with a single memory segment.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @returns {boolean} boolean indicating if an array is compatible with a single memory segment\n*\n* @example\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var bool = isSingleSegmentCompatible( shape, strides, offset );\n* // returns true\n*\n* @example\n* var shape = [ 10 ];\n* var strides = [ 3 ];\n* var offset = 0;\n*\n* var bool = isSingleSegmentCompatible( shape, strides, offset );\n* // returns false\n*/\nfunction isSingleSegmentCompatible( shape, strides, offset ) {\n\tvar len;\n\tvar buf;\n\n\t// Compute the total number of elements:\n\tlen = numel( shape );\n\tif ( len === 0 ) {\n\t\treturn false;\n\t}\n\t// Determine the minimum and maximum linear indices which are accessible by the array view:\n\tbuf = minmax( shape, strides, offset );\n\n\treturn ( len === ( buf[1]-buf[0]+1 ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isSingleSegmentCompatible;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a boolean indicating if an array is compatible with a single memory segment.\n*\n* @module @stdlib/ndarray/base/assert/is-single-segment-compatible\n*\n* @example\n* var isSingleSegmentCompatible = require( '@stdlib/ndarray/base/assert/is-single-segment-compatible' );\n*\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var bool = isSingleSegmentCompatible( shape, strides, offset );\n* // returns true\n*\n* @example\n* var isSingleSegmentCompatible = require( '@stdlib/ndarray/base/assert/is-single-segment-compatible' );\n*\n* var shape = [ 10 ];\n* var strides = [ 3 ];\n* var offset = 0;\n*\n* var bool = isSingleSegmentCompatible( shape, strides, offset );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isSingleSegmentCompatible = require( './../../../../base/assert/is-single-segment-compatible' );\nvar iterationOrder = require( './../../../../base/iteration-order' );\nvar isColumnMajor = require( './../../../../base/assert/is-column-major' );\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if an array is column-major contiguous.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @returns {boolean} boolean indicating if an array is column-major contiguous\n*\n* @example\n* var shape = [ 2, 2 ];\n* var strides = [ 1, 2 ];\n* var offset = 0;\n*\n* var bool = isColumnMajorContiguous( shape, strides, offset );\n* // returns true\n*\n* @example\n* var shape = [ 2, 2 ];\n* var strides = [ 1, -2 ];\n* var offset = 2;\n*\n* var bool = isColumnMajorContiguous( shape, strides, offset );\n* // returns false\n*\n* @example\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 2 ];\n* var offset = 0;\n*\n* var bool = isColumnMajorContiguous( shape, strides, offset );\n* // returns false\n*/\nfunction isColumnMajorContiguous( shape, strides, offset ) {\n\treturn (\n\t\titerationOrder( strides ) !== 0 &&\n\t\tisColumnMajor( strides ) &&\n\t\tisSingleSegmentCompatible( shape, strides, offset )\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isColumnMajorContiguous;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine if an array is column-major contiguous.\n*\n* @module @stdlib/ndarray/base/assert/is-column-major-contiguous\n*\n* @example\n* var isColumnMajorContiguous = require( '@stdlib/ndarray/base/assert/is-column-major-contiguous' );\n*\n* var shape = [ 2, 2 ];\n* var strides = [ 1, 2 ];\n* var offset = 0;\n*\n* var bool = isColumnMajorContiguous( shape, strides, offset );\n* // returns true\n*\n* @example\n* var isColumnMajorContiguous = require( '@stdlib/ndarray/base/assert/is-column-major-contiguous' );\n*\n* var shape = [ 2, 2 ];\n* var strides = [ 1, -2 ];\n* var offset = 2;\n*\n* var bool = isColumnMajorContiguous( shape, strides, offset );\n* // returns false\n*\n* @example\n* var isColumnMajorContiguous = require( '@stdlib/ndarray/base/assert/is-column-major-contiguous' );\n*\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 2 ];\n* var offset = 0;\n*\n* var bool = isColumnMajorContiguous( shape, strides, offset );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar contains = require( '@stdlib/array/base/assert/contains' ).factory;\nvar dtypes = require( './../../../../dtypes' );\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray complex-valued floating-point data type.\n*\n* @name isComplexFloatingPointDataType\n* @type {Function}\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type\n*\n* @example\n* var bool = isComplexFloatingPointDataType( 'binary' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'complex64' );\n* // returns true\n*\n* bool = isComplexFloatingPointDataType( 'complex128' );\n* // returns true\n*\n* bool = isComplexFloatingPointDataType( 'float32' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'float64' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'generic' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'int16' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'int32' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'int8' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'uint16' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'uint32' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'uint8' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'uint8c' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'foo' );\n* // returns false\n*/\nvar isComplexFloatingPointDataType = contains( dtypes( 'complex_floating_point' ) ); // eslint-disable-line id-length\n\n\n// EXPORTS //\n\nmodule.exports = isComplexFloatingPointDataType;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test whether an input value is a supported ndarray complex-valued floating-point data type.\n*\n* @module @stdlib/ndarray/base/assert/is-complex-floating-point-data-type\n*\n* @example\n* var isComplexFloatingPointDataType = require( '@stdlib/ndarray/base/assert/is-complex-floating-point-data-type' );\n*\n* var bool = isComplexFloatingPointDataType( 'binary' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'complex64' );\n* // returns true\n*\n* bool = isComplexFloatingPointDataType( 'complex128' );\n* // returns true\n*\n* bool = isComplexFloatingPointDataType( 'float32' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'float64' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'generic' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'int16' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'int32' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'int8' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'uint16' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'uint32' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'uint8' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'uint8c' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'foo' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isSingleSegmentCompatible = require( './../../../../base/assert/is-single-segment-compatible' );\nvar iterationOrder = require( './../../../../base/iteration-order' );\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if an array is contiguous.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @returns {boolean} boolean indicating if an array is contiguous\n*\n* @example\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var bool = isContiguous( shape, strides, offset );\n* // returns true\n*\n* @example\n* var shape = [ 2, 2 ];\n* var strides = [ -2, 1 ];\n* var offset = 2;\n*\n* var bool = isContiguous( shape, strides, offset );\n* // returns false\n*\n* @example\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 2 ];\n* var offset = 0;\n*\n* var bool = isContiguous( shape, strides, offset );\n* // returns false\n*/\nfunction isContiguous( shape, strides, offset ) {\n\treturn (\n\t\titerationOrder( strides ) !== 0 &&\n\t\tisSingleSegmentCompatible( shape, strides, offset )\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isContiguous;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine if an array is contiguous.\n*\n* @module @stdlib/ndarray/base/assert/is-contiguous\n*\n* @example\n* var isContiguous = require( '@stdlib/ndarray/base/assert/is-contiguous' );\n*\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var bool = isContiguous( shape, strides, offset );\n* // returns true\n*\n* @example\n* var isContiguous = require( '@stdlib/ndarray/base/assert/is-contiguous' );\n*\n* var shape = [ 2, 2 ];\n* var strides = [ -2, 1 ];\n* var offset = 2;\n*\n* var bool = isContiguous( shape, strides, offset );\n* // returns false\n*\n* @example\n* var isContiguous = require( '@stdlib/ndarray/base/assert/is-contiguous' );\n*\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 2 ];\n* var offset = 0;\n*\n* var bool = isContiguous( shape, strides, offset );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar contains = require( '@stdlib/array/base/assert/contains' ).factory;\nvar dtypes = require( './../../../../dtypes' );\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray floating-point data type.\n*\n* @name isFloatingPointDataType\n* @type {Function}\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray floating-point data type\n*\n* @example\n* var bool = isFloatingPointDataType( 'binary' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'float32' );\n* // returns true\n*\n* bool = isFloatingPointDataType( 'float64' );\n* // returns true\n*\n* bool = isFloatingPointDataType( 'generic' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'int16' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'int32' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'int8' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'uint16' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'uint32' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'uint8' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'uint8c' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'foo' );\n* // returns false\n*/\nvar isFloatingPointDataType = contains( dtypes( 'floating_point' ) );\n\n\n// EXPORTS //\n\nmodule.exports = isFloatingPointDataType;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test whether an input value is a supported ndarray floating-point data type.\n*\n* @module @stdlib/ndarray/base/assert/is-floating-point-data-type\n*\n* @example\n* var isFloatingPointDataType = require( '@stdlib/ndarray/base/assert/is-floating-point-data-type' );\n*\n* var bool = isFloatingPointDataType( 'binary' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'float32' );\n* // returns true\n*\n* bool = isFloatingPointDataType( 'float64' );\n* // returns true\n*\n* bool = isFloatingPointDataType( 'generic' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'int16' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'int32' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'int8' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'uint16' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'uint32' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'uint8' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'uint8c' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'foo' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar contains = require( '@stdlib/array/base/assert/contains' ).factory;\nvar dtypes = require( './../../../../dtypes' );\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray integer data type.\n*\n* @name isIntegerDataType\n* @type {Function}\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray integer data type\n*\n* @example\n* var bool = isIntegerDataType( 'binary' );\n* // returns false\n*\n* bool = isIntegerDataType( 'float32' );\n* // returns false\n*\n* bool = isIntegerDataType( 'float64' );\n* // returns false\n*\n* bool = isIntegerDataType( 'generic' );\n* // returns false\n*\n* bool = isIntegerDataType( 'int16' );\n* // returns true\n*\n* bool = isIntegerDataType( 'int32' );\n* // returns true\n*\n* bool = isIntegerDataType( 'int8' );\n* // returns true\n*\n* bool = isIntegerDataType( 'uint16' );\n* // returns true\n*\n* bool = isIntegerDataType( 'uint32' );\n* // returns true\n*\n* bool = isIntegerDataType( 'uint8' );\n* // returns true\n*\n* bool = isIntegerDataType( 'uint8c' );\n* // returns true\n*\n* bool = isIntegerDataType( 'foo' );\n* // returns false\n*/\nvar isIntegerDataType = contains( dtypes( 'integer' ) );\n\n\n// EXPORTS //\n\nmodule.exports = isIntegerDataType;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test whether an input value is a supported ndarray integer data type.\n*\n* @module @stdlib/ndarray/base/assert/is-integer-data-type\n*\n* @example\n* var isIntegerDataType = require( '@stdlib/ndarray/base/assert/is-integer-data-type' );\n*\n* var bool = isIntegerDataType( 'binary' );\n* // returns false\n*\n* bool = isIntegerDataType( 'float32' );\n* // returns false\n*\n* bool = isIntegerDataType( 'float64' );\n* // returns false\n*\n* bool = isIntegerDataType( 'generic' );\n* // returns false\n*\n* bool = isIntegerDataType( 'int16' );\n* // returns true\n*\n* bool = isIntegerDataType( 'int32' );\n* // returns true\n*\n* bool = isIntegerDataType( 'int8' );\n* // returns true\n*\n* bool = isIntegerDataType( 'uint16' );\n* // returns true\n*\n* bool = isIntegerDataType( 'uint32' );\n* // returns true\n*\n* bool = isIntegerDataType( 'uint8' );\n* // returns true\n*\n* bool = isIntegerDataType( 'uint8c' );\n* // returns true\n*\n* bool = isIntegerDataType( 'foo' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar contains = require( '@stdlib/array/base/assert/contains' ).factory;\nvar dtypes = require( './../../../../dtypes' );\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray numeric data type.\n*\n* @name isNumericDataType\n* @type {Function}\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray numeric data type\n*\n* @example\n* var bool = isNumericDataType( 'binary' );\n* // returns false\n*\n* bool = isNumericDataType( 'float32' );\n* // returns true\n*\n* bool = isNumericDataType( 'float64' );\n* // returns true\n*\n* bool = isNumericDataType( 'generic' );\n* // returns false\n*\n* bool = isNumericDataType( 'int16' );\n* // returns true\n*\n* bool = isNumericDataType( 'int32' );\n* // returns true\n*\n* bool = isNumericDataType( 'int8' );\n* // returns true\n*\n* bool = isNumericDataType( 'uint16' );\n* // returns true\n*\n* bool = isNumericDataType( 'uint32' );\n* // returns true\n*\n* bool = isNumericDataType( 'uint8' );\n* // returns true\n*\n* bool = isNumericDataType( 'uint8c' );\n* // returns true\n*\n* bool = isNumericDataType( 'foo' );\n* // returns false\n*/\nvar isNumericDataType = contains( dtypes( 'numeric' ) );\n\n\n// EXPORTS //\n\nmodule.exports = isNumericDataType;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test whether an input value is a supported ndarray numeric data type.\n*\n* @module @stdlib/ndarray/base/assert/is-numeric-data-type\n*\n* @example\n* var isNumericDataType = require( '@stdlib/ndarray/base/assert/is-numeric-data-type' );\n*\n* var bool = isNumericDataType( 'binary' );\n* // returns false\n*\n* bool = isNumericDataType( 'float32' );\n* // returns true\n*\n* bool = isNumericDataType( 'float64' );\n* // returns true\n*\n* bool = isNumericDataType( 'generic' );\n* // returns false\n*\n* bool = isNumericDataType( 'int16' );\n* // returns true\n*\n* bool = isNumericDataType( 'int32' );\n* // returns true\n*\n* bool = isNumericDataType( 'int8' );\n* // returns true\n*\n* bool = isNumericDataType( 'uint16' );\n* // returns true\n*\n* bool = isNumericDataType( 'uint32' );\n* // returns true\n*\n* bool = isNumericDataType( 'uint8' );\n* // returns true\n*\n* bool = isNumericDataType( 'uint8c' );\n* // returns true\n*\n* bool = isNumericDataType( 'foo' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests whether an ndarray is read-only.\n*\n* @param {ndarray} arr - input ndarray\n* @returns {boolean} boolean indicating whether an ndarray is read-only\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ 1, 2, 3, 4 ], {\n* 'readonly': true\n* });\n* var bool = isReadOnly( x );\n* // returns true\n*\n* x = array( [ 1, 2, 3, 4 ] );\n* bool = isReadOnly( x );\n* // returns false\n*/\nfunction isReadOnly( arr ) {\n\tvar flags = arr.flags;\n\treturn ( flags && flags.READONLY === true );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isReadOnly;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test whether an ndarray is read-only.\n*\n* @module @stdlib/ndarray/base/assert/is-read-only\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var isReadOnly = require( '@stdlib/ndarray/base/assert/is-read-only' );\n*\n* var x = array( [ 1, 2, 3, 4 ], {\n* 'readonly': true\n* });\n* var bool = isReadOnly( x );\n* // returns true\n*\n* x = array( [ 1, 2, 3, 4 ] );\n* bool = isReadOnly( x );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar contains = require( '@stdlib/array/base/assert/contains' ).factory;\nvar dtypes = require( './../../../../dtypes' );\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray real-valued data type.\n*\n* @name isRealDataType\n* @type {Function}\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray real-valued data type\n*\n* @example\n* var bool = isRealDataType( 'binary' );\n* // returns false\n*\n* bool = isRealDataType( 'float32' );\n* // returns true\n*\n* bool = isRealDataType( 'float64' );\n* // returns true\n*\n* bool = isRealDataType( 'complex128' );\n* // returns false\n*\n* bool = isRealDataType( 'generic' );\n* // returns false\n*\n* bool = isRealDataType( 'int16' );\n* // returns true\n*\n* bool = isRealDataType( 'int32' );\n* // returns true\n*\n* bool = isRealDataType( 'int8' );\n* // returns true\n*\n* bool = isRealDataType( 'uint16' );\n* // returns true\n*\n* bool = isRealDataType( 'uint32' );\n* // returns true\n*\n* bool = isRealDataType( 'uint8' );\n* // returns true\n*\n* bool = isRealDataType( 'uint8c' );\n* // returns true\n*\n* bool = isRealDataType( 'foo' );\n* // returns false\n*/\nvar isRealDataType = contains( dtypes( 'real' ) );\n\n\n// EXPORTS //\n\nmodule.exports = isRealDataType;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test whether an input value is a supported ndarray real-valued data type.\n*\n* @module @stdlib/ndarray/base/assert/is-real-data-type\n*\n* @example\n* var isRealDataType = require( '@stdlib/ndarray/base/assert/is-real-data-type' );\n*\n* var bool = isRealDataType( 'binary' );\n* // returns false\n*\n* bool = isRealDataType( 'float32' );\n* // returns true\n*\n* bool = isRealDataType( 'float64' );\n* // returns true\n*\n* bool = isRealDataType( 'complex128' );\n* // returns false\n*\n* bool = isRealDataType( 'generic' );\n* // returns false\n*\n* bool = isRealDataType( 'int16' );\n* // returns true\n*\n* bool = isRealDataType( 'int32' );\n* // returns true\n*\n* bool = isRealDataType( 'int8' );\n* // returns true\n*\n* bool = isRealDataType( 'uint16' );\n* // returns true\n*\n* bool = isRealDataType( 'uint32' );\n* // returns true\n*\n* bool = isRealDataType( 'uint8' );\n* // returns true\n*\n* bool = isRealDataType( 'uint8c' );\n* // returns true\n*\n* bool = isRealDataType( 'foo' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar contains = require( '@stdlib/array/base/assert/contains' ).factory;\nvar dtypes = require( './../../../../dtypes' );\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray real-valued floating-point data type.\n*\n* @name isRealFloatingPointDataType\n* @type {Function}\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray real-valued floating-point data type\n*\n* @example\n* var bool = isRealFloatingPointDataType( 'binary' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'float32' );\n* // returns true\n*\n* bool = isRealFloatingPointDataType( 'float64' );\n* // returns true\n*\n* bool = isRealFloatingPointDataType( 'generic' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'int16' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'int32' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'int8' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'uint16' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'uint32' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'uint8' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'uint8c' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'foo' );\n* // returns false\n*/\nvar isRealFloatingPointDataType = contains( dtypes( 'real_floating_point' ) ); // eslint-disable-line id-length\n\n\n// EXPORTS //\n\nmodule.exports = isRealFloatingPointDataType;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test whether an input value is a supported ndarray real-valued floating-point data type.\n*\n* @module @stdlib/ndarray/base/assert/is-real-floating-point-data-type\n*\n* @example\n* var isRealFloatingPointDataType = require( '@stdlib/ndarray/base/assert/is-real-floating-point-data-type' );\n*\n* var bool = isRealFloatingPointDataType( 'binary' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'float32' );\n* // returns true\n*\n* bool = isRealFloatingPointDataType( 'float64' );\n* // returns true\n*\n* bool = isRealFloatingPointDataType( 'generic' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'int16' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'int32' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'int8' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'uint16' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'uint32' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'uint8' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'uint8c' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'foo' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if an array is row-major based on a provided stride array.\n*\n* @param {IntegerArray} strides - stride array\n* @returns {boolean} boolean indicating if an array is row-major\n*\n* @example\n* var bool = isRowMajor( [ 2, 1 ] );\n* // returns true\n*\n* bool = isRowMajor( [ 1, 2 ] );\n* // returns false\n*/\nfunction isRowMajor( strides ) {\n\tvar ndims;\n\tvar s1;\n\tvar s2;\n\tvar i;\n\n\tndims = strides.length;\n\tif ( ndims === 0 ) {\n\t\treturn false;\n\t}\n\ts1 = abs( strides[ 0 ] );\n\tfor ( i = 1; i < ndims; i++ ) {\n\t\ts2 = abs( strides[ i ] );\n\t\tif ( s2 > s1 ) {\n\t\t\treturn false;\n\t\t}\n\t\ts1 = s2;\n\t}\n\treturn true;\n}\n\n\n// EXPORTS //\n\nmodule.exports = isRowMajor;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Given a stride array, determine whether an array is row-major.\n*\n* @module @stdlib/ndarray/base/assert/is-row-major\n*\n* @example\n* var isRowMajor = require( '@stdlib/ndarray/base/assert/is-row-major' );\n*\n* var bool = isRowMajor( [ 2, 1 ] );\n* // returns true\n*\n* bool = isRowMajor( [ 1, 2 ] );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isSingleSegmentCompatible = require( './../../../../base/assert/is-single-segment-compatible' );\nvar iterationOrder = require( './../../../../base/iteration-order' );\nvar isRowMajor = require( './../../../../base/assert/is-row-major' );\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if an array is row-major contiguous.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @returns {boolean} boolean indicating if an array is row-major contiguous\n*\n* @example\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var bool = isRowMajorContiguous( shape, strides, offset );\n* // returns true\n*\n* @example\n* var shape = [ 2, 2 ];\n* var strides = [ -2, 1 ];\n* var offset = 2;\n*\n* var bool = isRowMajorContiguous( shape, strides, offset );\n* // returns false\n*\n* @example\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 2 ];\n* var offset = 0;\n*\n* var bool = isRowMajorContiguous( shape, strides, offset );\n* // returns false\n*/\nfunction isRowMajorContiguous( shape, strides, offset ) {\n\treturn (\n\t\titerationOrder( strides ) !== 0 &&\n\t\tisRowMajor( strides ) &&\n\t\tisSingleSegmentCompatible( shape, strides, offset )\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isRowMajorContiguous;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine if an array is row-major contiguous.\n*\n* @module @stdlib/ndarray/base/assert/is-row-major-contiguous\n*\n* @example\n* var isRowMajorContiguous = require( '@stdlib/ndarray/base/assert/is-row-major-contiguous' );\n*\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var bool = isRowMajorContiguous( shape, strides, offset );\n* // returns true\n*\n* @example\n* var isRowMajorContiguous = require( '@stdlib/ndarray/base/assert/is-row-major-contiguous' );\n*\n* var shape = [ 2, 2 ];\n* var strides = [ -2, 1 ];\n* var offset = 2;\n*\n* var bool = isRowMajorContiguous( shape, strides, offset );\n* // returns false\n*\n* @example\n* var isRowMajorContiguous = require( '@stdlib/ndarray/base/assert/is-row-major-contiguous' );\n*\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 2 ];\n* var offset = 0;\n*\n* var bool = isRowMajorContiguous( shape, strides, offset );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar contains = require( '@stdlib/array/base/assert/contains' ).factory;\nvar dtypes = require( './../../../../dtypes' );\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray signed integer data type.\n*\n* @name isSignedIntegerDataType\n* @type {Function}\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray signed integer data type\n*\n* @example\n* var bool = isSignedIntegerDataType( 'binary' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'float32' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'float64' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'generic' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'int16' );\n* // returns true\n*\n* bool = isSignedIntegerDataType( 'int32' );\n* // returns true\n*\n* bool = isSignedIntegerDataType( 'int8' );\n* // returns true\n*\n* bool = isSignedIntegerDataType( 'uint16' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'uint32' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'uint8' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'uint8c' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'foo' );\n* // returns false\n*/\nvar isSignedIntegerDataType = contains( dtypes( 'signed_integer' ) );\n\n\n// EXPORTS //\n\nmodule.exports = isSignedIntegerDataType;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test whether an input value is a supported ndarray signed integer data type.\n*\n* @module @stdlib/ndarray/base/assert/is-signed-integer-data-type\n*\n* @example\n* var isSignedIntegerDataType = require( '@stdlib/ndarray/base/assert/is-signed-integer-data-type' );\n*\n* var bool = isSignedIntegerDataType( 'binary' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'float32' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'float64' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'generic' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'int16' );\n* // returns true\n*\n* bool = isSignedIntegerDataType( 'int32' );\n* // returns true\n*\n* bool = isSignedIntegerDataType( 'int8' );\n* // returns true\n*\n* bool = isSignedIntegerDataType( 'uint16' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'uint32' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'uint8' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'uint8c' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'foo' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar contains = require( '@stdlib/array/base/assert/contains' ).factory;\nvar dtypes = require( './../../../../dtypes' );\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray unsigned integer data type.\n*\n* @name isUnsignedIntegerDataType\n* @type {Function}\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray unsigned integer data type\n*\n* @example\n* var bool = isUnsignedIntegerDataType( 'binary' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'float32' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'float64' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'generic' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'int16' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'int32' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'int8' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'uint16' );\n* // returns true\n*\n* bool = isUnsignedIntegerDataType( 'uint32' );\n* // returns true\n*\n* bool = isUnsignedIntegerDataType( 'uint8' );\n* // returns true\n*\n* bool = isUnsignedIntegerDataType( 'uint8c' );\n* // returns true\n*\n* bool = isUnsignedIntegerDataType( 'foo' );\n* // returns false\n*/\nvar isUnsignedIntegerDataType = contains( dtypes( 'unsigned_integer' ) );\n\n\n// EXPORTS //\n\nmodule.exports = isUnsignedIntegerDataType;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test whether an input value is a supported ndarray unsigned integer data type.\n*\n* @module @stdlib/ndarray/base/assert/is-unsigned-integer-data-type\n*\n* @example\n* var isUnsignedIntegerDataType = require( '@stdlib/ndarray/base/assert/is-unsigned-integer-data-type' );\n*\n* var bool = isUnsignedIntegerDataType( 'binary' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'float32' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'float64' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'generic' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'int16' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'int32' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'int8' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'uint16' );\n* // returns true\n*\n* bool = isUnsignedIntegerDataType( 'uint32' );\n* // returns true\n*\n* bool = isUnsignedIntegerDataType( 'uint8' );\n* // returns true\n*\n* bool = isUnsignedIntegerDataType( 'uint8c' );\n* // returns true\n*\n* bool = isUnsignedIntegerDataType( 'foo' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( './../../../base/assert/is-allowed-data-type-cast' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( './../../../base/assert/is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( './../../../base/assert/is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( './../../../base/assert/is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( './../../../base/assert/is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( './../../../base/assert/is-column-major-contiguous' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( './../../../base/assert/is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( './../../../base/assert/is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( './../../../base/assert/is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( './../../../base/assert/is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( './../../../base/assert/is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( './../../../base/assert/is-integer-data-type' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( './../../../base/assert/is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( './../../../base/assert/is-order' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( './../../../base/assert/is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( './../../../base/assert/is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( './../../../base/assert/is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( './../../../base/assert/is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( './../../../base/assert/is-row-major-contiguous' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( './../../../base/assert/is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( './../../../base/assert/is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( './../../../base/assert/is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( './../../../base/assert/is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( './../../../base/assert/is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Simultaneously sorts two arrays based on the sort order of the first array using insertion sort.\n*\n* ## Notes\n*\n* - The first array is sorted in increasing order according to absolute value.\n* - The algorithm has space complexity `O(1)` and worst case time complexity `O(N^2)`.\n* - The algorithm is efficient for small arrays (typically `N <= 20``) and is particularly efficient for sorting arrays which are already substantially sorted.\n* - The algorithm is **stable**, meaning that the algorithm does **not** change the order of array elements which are equal or equivalent.\n* - The input arrays are sorted in-place (i.e., the input arrays are mutated).\n*\n* @private\n* @param {Array} x - first array\n* @param {Array} y - second array\n* @returns {void}\n*\n* @example\n* var x = [ -4, -2, 3, 1 ];\n* var y = [ 0, 1, 2, 3 ];\n*\n* sort2ins( x, y );\n*\n* console.log( x );\n* // => [ 1, -2, 3, -4 ]\n*\n* console.log( y );\n* // => [ 3, 1, 2, 0 ]\n*/\nfunction sort2ins( x, y ) {\n\tvar avx;\n\tvar aux;\n\tvar ix;\n\tvar iy;\n\tvar jx;\n\tvar jy;\n\tvar vx;\n\tvar vy;\n\tvar ux;\n\tvar i;\n\n\tix = 1;\n\tiy = 1;\n\n\t// Sort in increasing order...\n\tfor ( i = 1; i < x.length; i++ ) {\n\t\tvx = x[ ix ];\n\t\tavx = ( vx < 0 ) ? -vx : vx;\n\n\t\tvy = y[ iy ];\n\n\t\tjx = ix - 1;\n\t\tjy = iy - 1;\n\n\t\t// Shift all larger values to the left of the current element to the right...\n\t\twhile ( jx >= 0 ) {\n\t\t\tux = x[ jx ];\n\t\t\taux = ( ux < 0 ) ? -ux : ux;\n\t\t\tif ( aux <= avx ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tx[ jx+1 ] = ux;\n\t\t\ty[ jy+1 ] = y[ jy ];\n\t\t\tjx -= 1;\n\t\t\tjy -= 1;\n\t\t}\n\t\tx[ jx+1 ] = vx;\n\t\ty[ jy+1 ] = vy;\n\t\tix += 1;\n\t\tiy += 1;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = sort2ins;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar zeroTo = require( '@stdlib/array/base/zero-to' );\nvar copy = require( '@stdlib/array/base/copy-indexed' );\nvar take = require( '@stdlib/array/base/take' );\nvar filled = require( '@stdlib/array/base/filled' );\nvar strides2order = require( './../../../base/strides2order' );\nvar sort2ins = require( './sort2ins.js' );\n\n\n// VARIABLES //\n\n// Number of arrays:\nvar N = 3;\n\n\n// MAIN //\n\n/**\n* Reorders ndarray dimensions and associated strides for loop interchange.\n*\n* ## Notes\n*\n* - The returned object has the following properties:\n*\n* - **sh**: dimensions sorted in loop order.\n* - **sx**: first input ndarray strides sorted in loop order.\n* - **sy**: second input ndarray strides sorted in loop order.\n* - **sz**: output ndarray strides sorted in loop order.\n*\n* @param {NonNegativeIntegerArray} sh - array dimensions\n* @param {IntegerArray} sx - first input array stride lengths\n* @param {IntegerArray} sy - second input array stride lengths\n* @param {IntegerArray} sz - output array stride lengths\n* @returns {Object} loop interchange data\n*\n* @example\n* var sh = [ 2, 3, 4 ];\n*\n* var sx = [ 12, 4, 1 ]; // row-major\n* var sy = [ 24, 8, 1 ]; // row-major\n* var sz = [ 1, -2, 6 ]; // column-major\n*\n* var o = loopOrder( sh, sx, sy, sz );\n* // returns {...}\n*\n* var ssh = o.sh;\n* // returns [ 4, 3, 2 ]\n*\n* var ssx = o.sx;\n* // returns [ 1, 4, 12 ]\n*\n* var ssy = o.sy;\n* // returns [ 1, 8, 24 ]\n*\n* var ssz = o.sz;\n* // returns [ 6, -2, 1 ]\n*/\nfunction loopOrder( sh, sx, sy, sz ) {\n\tvar idx;\n\tvar tmp;\n\tvar max;\n\tvar len;\n\tvar arr;\n\tvar ox;\n\tvar oy;\n\tvar oz;\n\tvar i;\n\tvar j;\n\n\t// Initialize a loop interchange index array for generating a loop order permutation:\n\tidx = zeroTo( sh.length );\n\n\t// Determine the order (layout) of each array:\n\tox = strides2order( sx );\n\toy = strides2order( sy );\n\toz = strides2order( sz );\n\n\t// Determine which array should be used to generate the loop order:\n\ttmp = filled( [], 4 );\n\ttmp[ ox ].push( sx );\n\ttmp[ oy ].push( sy );\n\ttmp[ oz ].push( sz );\n\tmax = tmp[ 0 ].length;\n\tif ( max === N ) {\n\t\t// If all arrays are \"disorganized\", then just use the first array, as, generally, each array is likely to be as un-ideal as every other:\n\t\tarr = sx;\n\t} else if ( max === N-1 ) {\n\t\t// If all but one array is \"disorganized\", find the \"organized\" array...\n\t\tfor ( i = 1; i < 4; i++ ) {\n\t\t\tif ( tmp[ i ].length ) {\n\t\t\t\tarr = tmp[ i ][ 0 ];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// Find the layout which is most common...\n\t\tj = 0;\n\t\tfor ( i = 1; i < 4; i++ ) {\n\t\t\tlen = tmp[ i ].length;\n\t\t\tif ( len >= max ) {\n\t\t\t\tmax = len;\n\t\t\t\tj = i;\n\t\t\t}\n\t\t}\n\t\t// Use the strides of the first array having the most common layout:\n\t\tarr = tmp[ j ][ 0 ];\n\t}\n\t// Sort array strides in increasing order (of magnitude):\n\tarr = copy( arr );\n\tsort2ins( arr, idx );\n\n\t// Permute the shape and array strides based on the sorted strides:\n\tsh = take( sh, idx );\n\tsx = ( sx === arr ) ? arr : take( sx, idx );\n\tsy = ( sy === arr ) ? arr : take( sy, idx );\n\tsz = ( sz === arr ) ? arr : take( sz, idx );\n\n\treturn {\n\t\t'sh': sh,\n\t\t'sx': sx,\n\t\t'sy': sy,\n\t\t'sz': sz\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = loopOrder;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Reorder ndarray dimensions and associated strides for loop interchange.\n*\n* @module @stdlib/ndarray/base/binary-loop-interchange-order\n*\n* @example\n* var binaryLoopOrder = require( '@stdlib/ndarray/base/binary-loop-interchange-order' );\n*\n* var sh = [ 2, 3, 4 ];\n*\n* var sx = [ 12, 4, 1 ]; // row-major\n* var sy = [ 24, 8, 1 ]; // row-major\n* var sz = [ 1, -2, 6 ]; // column-major\n*\n* var o = loopOrder( sh, sx, sy, sz );\n* // returns {...}\n*\n* var ssh = o.sh;\n* // returns [ 4, 3, 2 ]\n*\n* var ssx = o.sx;\n* // returns [ 1, 4, 12 ]\n*\n* var ssy = o.sy;\n* // returns [ 1, 8, 24 ]\n*\n* var ssz = o.sz;\n* // returns [ 6, -2, 1 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar defaults = {\n\t// Define a default block size (in bytes):\n\t'BLOCK_SIZE_IN_BYTES': 64|0, // 64b is a common cache line size. How applicable the common cache line size is here is debatable, given that, depending on the associated stride(s), the innermost loop may not iterate over adjacent elements. The primary goal is to have a block size in which all data within a block can always fit in (L1) cache, regardless of cache size (i.e., cache-oblivious). For reference, a common L1 cache size is 32kB per core. For best performance, block sizes should be tuned based on system hardware; however, such tuning is not readily available to us here. Without obvious better alternatives, 64b has some theoretical (and practical) underpinning, and it should be good enough for most inputs, especially for ndarrays with near contiguity.\n\n\t// Define a default block size (in elements):\n\t'BLOCK_SIZE_IN_ELEMENTS': 8|0 // 64 bytes / 8 bytes per element (i.e., default element size is same as a double)\n};\n\n\n// EXPORTS //\n\nmodule.exports = defaults;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar bytesPerElement = require( './../../../base/bytes-per-element' );\nvar defaults = require( './defaults.js' );\n\n\n// MAIN //\n\n/**\n* Returns a loop block size for multi-dimensional array tiled loops.\n*\n* @param {string} dtypeX - first input array data type\n* @param {string} dtypeY - second input array data type\n* @param {string} dtypeZ - output array data type\n* @returns {integer} block size (in units of elements)\n*\n* @example\n* var bsize = binaryBlockSize( 'float64', 'float64', 'float64' );\n* // returns \n*/\nfunction binaryBlockSize( dtypeX, dtypeY, dtypeZ ) {\n\tvar nbx;\n\tvar nby;\n\tvar nbz;\n\n\tnbx = bytesPerElement( dtypeX );\n\tnby = bytesPerElement( dtypeY );\n\tnbz = bytesPerElement( dtypeZ );\n\tif ( nbx === null || nby === null || nbz === null ) { // e.g., \"generic\" arrays\n\t\treturn defaults.BLOCK_SIZE_IN_ELEMENTS;\n\t}\n\tif ( nbx > nby && nbx > nbz ) {\n\t\treturn ( defaults.BLOCK_SIZE_IN_BYTES/nbx )|0; // asm type annotation\n\t}\n\tif ( nby > nbz ) {\n\t\treturn ( defaults.BLOCK_SIZE_IN_BYTES/nby )|0; // asm type annotation\n\t}\n\treturn ( defaults.BLOCK_SIZE_IN_BYTES/nbz )|0; // asm type annotation\n}\n\n\n// EXPORTS //\n\nmodule.exports = binaryBlockSize;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Resolve a loop block size for multi-dimensional array tiled loops.\n*\n* @module @stdlib/ndarray/base/binary-tiling-block-size\n*\n* @example\n* var binaryBlockSize = require( '@stdlib/ndarray/base/binary-tiling-block-size' );\n*\n* var bsize = binaryBlockSize( 'float64', 'float64', 'float64' );\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar format = require( '@stdlib/string/format' );\nvar trunc = require( '@stdlib/math/base/special/trunc' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Converts a linear index in an underlying data buffer to a linear index in an array view.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - location of the first indexed value **based** on the stride array\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {integer} idx - linear index in an underlying data buffer\n* @param {string} mode - specifies how to handle a linear index which exceeds array dimensions\n* @throws {RangeError} linear index must not exceed array dimensions\n* @returns {NonNegativeInteger} linear index in an array view\n*\n* @example\n* var shape = [ 3, 3 ];\n* var strides = [ -3, 1 ];\n* var offset = 6;\n* var order = 'row-major';\n* var mode = 'throw';\n*\n* var ind = bind2vind( shape, strides, offset, order, 7, mode );\n* // returns 1\n*/\nfunction bind2vind( shape, strides, offset, order, idx, mode ) {\n\tvar ndims;\n\tvar len;\n\tvar ind;\n\tvar k;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\tlen = 1;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tlen *= shape[ i ];\n\t}\n\tif ( mode === 'clamp' ) {\n\t\tif ( idx < 0 ) {\n\t\t\tidx = 0;\n\t\t} else if ( idx >= len ) {\n\t\t\tidx = len - 1;\n\t\t}\n\t} else if ( mode === 'wrap' ) {\n\t\tif ( idx < 0 ) {\n\t\t\tidx += len; // slight optimization to avoid modulo arithmetic when |idx| <= len\n\t\t\tif ( idx < 0 ) {\n\t\t\t\tidx %= len;\n\t\t\t\tif ( idx !== 0 ) {\n\t\t\t\t\tidx += len;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( idx >= len ) {\n\t\t\tidx -= len; // slight optimization to avoid modulo arithmetic when len < idx <= 2*len\n\t\t\tif ( idx >= len ) {\n\t\t\t\tidx %= len;\n\t\t\t}\n\t\t}\n\t} else if ( idx < 0 || idx >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.', len, idx ) );\n\t}\n\t// The approach which follows is to resolve a buffer index to its subscripts and then plug the subscripts into the standard formula for computing the linear index in the array view (i.e., where all strides are positive and offset is 0)...\n\tind = 0;\n\tif ( order === 'column-major' ) {\n\t\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\t\ts = strides[ i ];\n\t\t\tif ( s < 0 ) {\n\t\t\t\tk = trunc( idx/s );\n\t\t\t\tidx -= k * s;\n\t\t\t\tk += shape[ i ] - 1;\n\t\t\t} else {\n\t\t\t\tk = trunc( idx/s );\n\t\t\t\tidx -= k * s;\n\t\t\t}\n\t\t\tind += k * abs( s );\n\t\t}\n\t\treturn ind;\n\t}\n\t// Case: row-major\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\ts = strides[ i ];\n\t\tif ( s < 0 ) {\n\t\t\tk = trunc( idx/s );\n\t\t\tidx -= k * s;\n\t\t\tk += shape[ i ] - 1;\n\t\t} else {\n\t\t\tk = trunc( idx/s );\n\t\t\tidx -= k * s;\n\t\t}\n\t\tind += k * abs( s );\n\t}\n\treturn ind;\n}\n\n\n// EXPORTS //\n\nmodule.exports = bind2vind;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a linear index in an underlying data buffer to a linear index in an array view.\n*\n* @module @stdlib/ndarray/base/bind2vind\n*\n* @example\n* var bind2vind = require( '@stdlib/ndarray/base/bind2vind' );\n*\n* var shape = [ 3, 3 ];\n* var strides = [ -3, 1 ];\n* var offset = 6;\n* var order = 'row-major';\n* var mode = 'throw';\n*\n* var ind = bind2vind( shape, strides, offset, order, 7, mode );\n* // returns 1\n*/\n\n// MODULES //\n\nvar bind2vind = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = bind2vind;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar copyIndexed = require( '@stdlib/array/base/copy-indexed' );\n\n\n// MAIN //\n\n/**\n* Returns the shape of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @param {boolean} copy - boolean indicating whether to explicitly copy the value assigned to the input ndarray's `shape` property\n* @returns {NonNegativeIntegerArray} shape\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var out = shape( zeros( [ 3, 3, 3 ] ), false );\n* // returns [ 3, 3, 3 ]\n*/\nfunction shape( x, copy ) {\n\tvar sh = x.shape;\n\tif ( copy ) {\n\t\treturn copyIndexed( sh );\n\t}\n\treturn sh;\n}\n\n\n// EXPORTS //\n\nmodule.exports = shape;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the shape of a provided ndarray.\n*\n* @module @stdlib/ndarray/base/shape\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var shape = require( '@stdlib/ndarray/base/shape' );\n*\n* var sh = shape( zeros( [ 3, 3, 3 ] ), false );\n* // returns [ 3, 3, 3 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar shape2strides = require( './../../../base/shape2strides' );\nvar copyIndexed = require( '@stdlib/array/base/copy-indexed' );\n\n\n// VARIABLES //\n\nvar ROW_MAJOR = 'row-major';\n\n\n// MAIN //\n\n/**\n* Returns the strides of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @param {boolean} copy - boolean indicating whether to explicitly copy the value assigned to the input ndarray's `strides` property\n* @returns {IntegerArray} strides\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var out = strides( zeros( [ 3, 3, 3 ] ), false );\n* // returns [ 9, 3, 1 ]\n*/\nfunction strides( x, copy ) {\n\tvar ord;\n\tvar sh;\n\tvar st;\n\n\tst= x.strides;\n\tif ( typeof st !== 'object' || st === null ) {\n\t\tsh = x.shape;\n\t\tif ( sh.length === 0 ) {\n\t\t\treturn [ 0 ];\n\t\t}\n\t\tord = x.order;\n\t\tif ( typeof ord !== 'string' ) {\n\t\t\tord = ROW_MAJOR;\n\t\t}\n\t\treturn shape2strides( sh, ord );\n\t}\n\tif ( copy ) {\n\t\treturn copyIndexed( st );\n\t}\n\treturn st;\n}\n\n\n// EXPORTS //\n\nmodule.exports = strides;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the strides of a provided ndarray.\n*\n* @module @stdlib/ndarray/base/strides\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var strides = require( '@stdlib/ndarray/base/strides' );\n*\n* var st = strides( zeros( [ 3, 3, 3 ] ), false );\n* // returns [ 9, 3, 1 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar strides2offset = require( './../../../base/strides2offset' );\n\n\n// MAIN //\n\n/**\n* Returns the index offset specifying the underlying buffer index of the first iterated ndarray element.\n*\n* @param {ndarrayLike} x - input ndarray\n* @returns {NonNegativeInteger} index offset\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var n = offset( zeros( [ 3, 3, 3 ] ) );\n* // returns 0\n*/\nfunction offset( x ) {\n\tvar st;\n\tvar sh;\n\tvar o;\n\n\to = x.offset;\n\tif ( typeof o === 'number' ) {\n\t\treturn o;\n\t}\n\tsh = x.shape;\n\tif ( sh.length === 0 ) {\n\t\treturn 0;\n\t}\n\tst = x.strides;\n\tif ( typeof st !== 'object' || st === null ) {\n\t\treturn 0;\n\t}\n\treturn strides2offset( sh, st );\n}\n\n\n// EXPORTS //\n\nmodule.exports = offset;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the index offset specifying the underlying buffer index of the first iterated ndarray element.\n*\n* @module @stdlib/ndarray/base/offset\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var offset = require( '@stdlib/ndarray/base/offset' );\n*\n* var n = offset( zeros( [ 3, 3, 3 ] ) );\n* // returns 0\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar strides2order = require( './../../../base/strides2order' );\n\n\n// VARIABLES //\n\nvar ROW_MAJOR = 'row-major';\nvar COLUMN_MAJOR = 'column-major';\n\n\n// MAIN //\n\n/**\n* Returns the layout order of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @returns {(string|null)} layout order\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'order': 'row-major'\n* });\n*\n* var out = order( x );\n* // returns 'row-major'\n*/\nfunction order( x ) {\n\tvar st;\n\tvar o;\n\n\to = x.order;\n\tif ( typeof o === 'string' ) {\n\t\treturn o;\n\t}\n\t// Try to infer the layout order from the strides array...\n\tst = x.strides;\n\tif ( typeof st !== 'object' || st === null ) {\n\t\treturn ROW_MAJOR; // WARNING: default to row-major for ndarray-like objects lacking strides. This may or may not be accurate, and we're defaulting to row-major here based on the belief that row-major is more likely given that, e.g., JavaScript arrays are similar to C arrays (i.e., stored in row-major order).\n\t}\n\to = strides2order( st );\n\tif ( o === 1 || o === 3 ) {\n\t\treturn ROW_MAJOR; // for o == 3 (both row- and column-major; e.g., one-dimensional ndarrays), default to row-major\n\t}\n\tif ( o === 2 ) {\n\t\treturn COLUMN_MAJOR;\n\t}\n\t// o === 0\n\tif ( x.shape.length === 0 ) {\n\t\treturn ROW_MAJOR; // default to row-major for zero-dimensional ndarrays\n\t}\n\t// Case: mixed strides (e.g., [ 2, 3, 1 ] )\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = order;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the layout order of a provided ndarray.\n*\n* @module @stdlib/ndarray/base/order\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var order = require( '@stdlib/ndarray/base/order' );\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'order': 'row-major'\n* });\n*\n* var out = order( x );\n* // returns 'row-major'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the data type of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @returns {string} data type\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'dtype': 'float64'\n* });\n*\n* var dt = dtype( x );\n* // returns 'float64'\n*/\nfunction dtype( x ) {\n\treturn x.dtype;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dtype;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the data type of a provided ndarray.\n*\n* @module @stdlib/ndarray/base/dtype\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var dtype = require( '@stdlib/ndarray/base/dtype' );\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'dtype': 'float64'\n* });\n*\n* var dt = dtype( x );\n* // returns 'float64'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the underlying data buffer of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @returns {Collection} underlying data buffer\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'dtype': 'float64'\n* });\n*\n* var out = data( x );\n* // returns \n*/\nfunction data( x ) {\n\treturn x.data;\n}\n\n\n// EXPORTS //\n\nmodule.exports = data;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the underlying data buffer of a provided ndarray.\n*\n* @module @stdlib/ndarray/base/data-buffer\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var data = require( '@stdlib/ndarray/base/data-buffer' );\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'dtype': 'float64'\n* });\n*\n* var out = data( x );\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar copy = require( '@stdlib/array/base/copy-indexed' );\nvar ndarray = require( './../../../base/ctor' );\nvar getShape = require( './../../../base/shape' );\nvar getStrides = require('./../../../base/strides' );\nvar getOffset = require( './../../../base/offset' );\nvar getOrder = require( './../../../base/order' );\nvar getDType = require( './../../../base/dtype' );\nvar getData = require( './../../../base/data-buffer' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Broadcasts an ndarray to a specified shape.\n*\n* ## Notes\n*\n* - The returned array is a view on the input array data buffer. The view is typically **not** contiguous. As more than one element of a returned view may refer to the same memory location, writing to the view may affect multiple elements. If you need to write to the returned array, copy the array before performing operations which may mutate elements.\n*\n* @param {ndarray} arr - input array\n* @param {NonNegativeIntegerArray} shape - desired shape\n* @throws {Error} input array cannot have more dimensions than the desired shape\n* @throws {Error} input array dimension sizes must be `1` or equal to the corresponding dimension in the provided shape\n* @throws {Error} input array and desired shape must be broadcast compatible\n* @returns {ndarray} broadcasted array\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var shx = x.shape;\n* // returns [ 2, 2 ]\n*\n* var y = broadcastArray( x, [ 3, 2, 2 ] );\n* // returns \n*\n* var shy = y.shape;\n* // returns [ 3, 2, 2 ]\n*\n* var v = y.get( 0, 0, 0 );\n* // returns 1\n*\n* v = y.get( 0, 0, 1 );\n* // returns 2\n*\n* v = y.get( 1, 0, 0 );\n* // returns 1\n*\n* v = y.get( 1, 1, 0 );\n* // returns 3\n*\n* v = y.get( 2, 0, 0 );\n* // returns 1\n*\n* v = y.get( 2, 1, 1 );\n* // returns 4\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var y = broadcastArray( x, [ 3, 2 ] );\n* // throws \n*/\nfunction broadcastArray( arr, shape ) {\n\tvar strides;\n\tvar dim;\n\tvar sh;\n\tvar st;\n\tvar N;\n\tvar M;\n\tvar d;\n\tvar i;\n\tvar j;\n\n\tN = shape.length;\n\tsh = getShape( arr, false );\n\tM = sh.length;\n\tif ( N < M ) {\n\t\tthrow new Error( 'invalid argument. Cannot broadcast an array to a shape having fewer dimensions. Arrays can only be broadcasted to shapes having the same or more dimensions.' );\n\t}\n\t// Initialize a strides array...\n\tstrides = [];\n\tfor ( i = 0; i < N; i++ ) {\n\t\tstrides.push( 0 );\n\t}\n\t// Determine the output array strides...\n\tst = getStrides( arr, false );\n\tfor ( i = N-1; i >= 0; i-- ) {\n\t\tj = M - N + i;\n\t\tif ( j < 0 ) {\n\t\t\t// Prepended singleton dimension; stride is zero...\n\t\t\tcontinue;\n\t\t}\n\t\td = sh[ j ];\n\t\tdim = shape[ i ];\n\t\tif ( dim !== 0 && dim < d ) {\n\t\t\tthrow new Error( format( 'invalid argument. Input array cannot be broadcast to the specified shape, as the specified shape has a dimension whose size is less than the size of the corresponding dimension in the input array. Array shape: (%s). Desired shape: (%s). Dimension: %u.', copy( sh ).join( ', ' ), copy( shape ).join( ', ' ), i ) );\n\t\t}\n\t\tif ( d === dim ) {\n\t\t\tstrides[ i ] = st[ j ];\n\t\t} else if ( d === 1 ) {\n\t\t\t// In order to broadcast dimensions, we set the stride for that dimension to zero...\n\t\t\tstrides[ i ] = 0;\n\t\t} else {\n\t\t\t// At this point, we know that `dim > d` and that `d` does not equal `1` (e.g., `dim=3` and `d=2`); in which case, the shapes are considered incompatible (even for desired shapes which are multiples of array dimensions, as might be desired when \"tiling\" an array; e.g., `dim=4` and `d=2`)...\n\t\t\tthrow new Error( format( 'invalid argument. Input array and the specified shape are broadcast incompatible. Array shape: (%s). Desired shape: (%s). Dimension: %u.', copy( sh ).join( ', ' ), copy( shape ).join( ', ' ), i ) );\n\t\t}\n\t}\n\treturn ndarray( getDType( arr ), getData( arr ), copy( shape ), strides, getOffset( arr ), getOrder( arr ) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = broadcastArray;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Broadcast an ndarray to a specified shape.\n*\n* @module @stdlib/ndarray/base/broadcast-array\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var broadcastArray = require( '@stdlib/ndarray/base/broadcast-array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var shx = x.shape;\n* // returns [ 2, 2 ]\n*\n* var y = broadcastArray( x, [ 3, 2, 2 ] );\n* // returns \n*\n* var shy = y.shape;\n* // returns [ 3, 2, 2 ]\n*\n* var v = y.get( 0, 0, 0 );\n* // returns 1\n*\n* v = y.get( 0, 0, 1 );\n* // returns 2\n*\n* v = y.get( 1, 0, 0 );\n* // returns 1\n*\n* v = y.get( 1, 1, 0 );\n* // returns 3\n*\n* v = y.get( 2, 0, 0 );\n* // returns 1\n*\n* v = y.get( 2, 1, 1 );\n* // returns 4\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isAccessorArray = require( '@stdlib/array/base/assert/is-accessor-array' );\nvar accessorSetter = require( '@stdlib/array/base/accessor-setter' );\nvar setter = require( '@stdlib/array/base/setter' );\nvar zeros = require( '@stdlib/array/base/zeros' );\nvar buffer = require( './../../../base/buffer' );\nvar ndarray = require( './../../../base/ctor' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Broadcasts a scalar value to an ndarray having a specified shape.\n*\n* @param {*} value - scalar value\n* @param {string} dtype - output array data type\n* @param {NonNegativeIntegerArray} shape - output array shape\n* @param {string} order - memory layout (either row-major or column-major)\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {ndarray} ndarray\n*\n* @example\n* var x = broadcastScalar( 1.0, 'float64', [ 2, 2 ], 'row-major' );\n* // returns \n*\n* var sh = x.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = x.dtype;\n* // returns 'float64'\n*\n* var v = x.get( 0, 1 );\n* // returns 1.0\n*/\nfunction broadcastScalar( value, dtype, shape, order ) {\n\tvar buf;\n\tvar set;\n\n\tbuf = buffer( dtype, 1 );\n\tif ( buf === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a recognized data type. Value: `%s`.', dtype ) );\n\t}\n\tif ( /^complex/.test( dtype ) && typeof value === 'number' ) {\n\t\tvalue = [ value, 0.0 ]; // note: we're assuming that the ComplexXXArray setter accepts an array of interleaved real and imaginary components\n\t}\n\tif ( isAccessorArray( buf ) ) {\n\t\tset = accessorSetter( dtype );\n\t} else {\n\t\tset = setter( dtype );\n\t}\n\tset( buf, 0, value );\n\treturn new ndarray( dtype, buf, shape, zeros( shape.length ), 0, order );\n}\n\n\n// EXPORTS //\n\nmodule.exports = broadcastScalar;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Broadcast a scalar value to an ndarray having a specified shape.\n*\n* @module @stdlib/ndarray/base/broadcast-scalar\n*\n* @example\n* var broadcastScalar = require( '@stdlib/ndarray/base/broadcast-scalar' );\n*\n* var x = broadcastScalar( 1.0, 'float64', [ 2, 2 ], 'row-major' );\n* // returns \n*\n* var sh = x.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = x.dtype;\n* // returns 'float64'\n*\n* var v = x.get( 0, 1 );\n* // returns 1.0\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Broadcasts array shapes to a single shape.\n*\n* ## Notes\n*\n* - Two respective dimensions in two shape arrays are compatible if\n*\n* 1. the dimensions are equal.\n* 2. one dimension is `1`.\n*\n* - The function returns `null` if provided incompatible shapes (i.e., shapes which cannot be broadcast with one another).\n*\n* @param {Array} shapes - array of shape arrays\n* @returns {(NonNegativeIntegerArray|null)} broadcast shape (or `null`)\n*\n* @example\n* var shapes = [\n* [ 8, 1, 6, 1 ],\n* [ 7, 1, 5 ]\n* ];\n*\n* var out = broadcastShapes( shapes );\n* // returns [ 8, 7, 6, 5 ]\n*\n* @example\n* var shapes = [\n* [ 5, 4 ],\n* [ 1 ]\n* ];\n*\n* var out = broadcastShapes( shapes );\n* // returns [ 5, 4 ]\n*\n* @example\n* var shapes = [\n* [ 5, 4 ],\n* [ 4 ]\n* ];\n*\n* var out = broadcastShapes( shapes );\n* // returns [ 5, 4 ]\n*\n* @example\n* var shapes = [\n* [ 15, 3, 5 ],\n* [ 15, 1, 5 ]\n* ];\n*\n* var out = broadcastShapes( shapes );\n* // returns [ 15, 3, 5 ]\n*\n* @example\n* var shapes = [\n* [ 15, 3, 5 ],\n* [ 3, 5 ]\n* ];\n*\n* var out = broadcastShapes( shapes );\n* // returns [ 15, 3, 5 ]\n*\n* @example\n* var shapes = [\n* [ 15, 3, 5 ],\n* [ 3, 1 ]\n* ];\n*\n* var out = broadcastShapes( shapes );\n* // returns [ 15, 3, 5 ]\n*\n* @example\n* var shapes = [\n* [ 8, 1, 1, 6, 1 ],\n* [ 1, 7, 1, 5 ],\n* [ 8, 4, 1, 6, 5 ]\n* ];\n*\n* var out = broadcastShapes( shapes );\n* // returns [ 8, 4, 7, 6, 5 ]\n*\n* @example\n* var shapes = [\n* [ 8, 1, 1, 6, 1 ],\n* [ 0 ]\n* ];\n*\n* var out = broadcastShapes( shapes );\n* // returns [ 8, 1, 1, 6, 0 ]\n*\n* @example\n* var shapes = [\n* [ 8, 1, 1, 6, 1 ],\n* [ 8, 0, 1, 6, 1 ]\n* ];\n*\n* var out = broadcastShapes( shapes );\n* // returns [ 8, 0, 1, 6, 1 ]\n*\n* @example\n* var shapes = [\n* [ 8, 8, 1, 6, 1 ],\n* [ 8, 0, 1, 6, 1 ]\n* ];\n*\n* var out = broadcastShapes( shapes );\n* // returns null\n*\n* @example\n* var shapes = [\n* [ 8, 0, 1, 6, 1 ],\n* [ 8, 8, 1, 6, 1 ]\n* ];\n*\n* var out = broadcastShapes( shapes );\n* // returns null\n*\n* @example\n* var shapes = [\n* []\n* ];\n*\n* var out = broadcastShapes( shapes );\n* // returns []\n*\n* @example\n* var shapes = [\n* [],\n* []\n* ];\n*\n* var out = broadcastShapes( shapes );\n* // returns []\n*\n* @example\n* var shapes = [];\n*\n* var out = broadcastShapes( shapes );\n* // returns []\n*\n* @example\n* var shapes = [\n* [ 3, 2, 1 ],\n* []\n* ];\n*\n* var out = broadcastShapes( shapes );\n* // returns [ 3, 2, 1 ]\n*\n* @example\n* var shapes = [\n* [],\n* [ 3, 2, 1 ]\n* ];\n*\n* var out = broadcastShapes( shapes );\n* // returns [ 3, 2, 1 ]\n*/\nfunction broadcastShapes( shapes ) {\n\tvar ndims;\n\tvar out;\n\tvar dim;\n\tvar sh;\n\tvar n1;\n\tvar n2;\n\tvar d;\n\tvar M;\n\tvar N;\n\tvar i;\n\tvar j;\n\n\tM = shapes.length;\n\tout = [];\n\tif ( M === 0 ) {\n\t\treturn out;\n\t}\n\tsh = shapes[ 0 ];\n\tN = sh.length;\n\n\t// If provided a single input shape array, then the broadcast shape is input shape...\n\tif ( M === 1 ) {\n\t\t// Need to manually copy to output shape, as shapes could be array-like objects...\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tout.push( sh[ i ] );\n\t\t}\n\t\treturn out;\n\t}\n\t// Determine the maximum dimensionality...\n\tndims = [ N ];\n\tfor ( i = 1; i < M; i++ ) {\n\t\tndims.push( shapes[ i ].length );\n\t\tif ( ndims[ i ] > N ) {\n\t\t\tN = ndims[ i ];\n\t\t}\n\t}\n\t// Initialize the output array...\n\tfor ( i = 0; i < N; i++ ) {\n\t\tout.push( 0 );\n\t}\n\t// Compute the broadcast shape...\n\ti = N - 1;\n\twhile ( i >= 0 ) {\n\t\tn1 = ndims[ 0 ] - N + i;\n\t\tif ( n1 >= 0 ) {\n\t\t\tdim = sh[ n1 ];\n\t\t} else {\n\t\t\tdim = 1;\n\t\t}\n\t\tfor ( j = 1; j < M; j++ ) {\n\t\t\tn2 = ndims[ j ] - N + i;\n\t\t\tif ( n2 >= 0 ) {\n\t\t\t\td = shapes[ j ][ n2 ];\n\t\t\t} else {\n\t\t\t\td = 1;\n\t\t\t}\n\t\t\tif ( dim === 1 ) {\n\t\t\t\tdim = d;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( d === 1 || dim === d ) {\n\t\t\t\t// When either `d` is `1` or `d` equals the current output shape dimension, the current output shape dimension remains the same...\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// The current shape cannot be broadcast against one of the other shapes...\n\t\t\treturn null;\n\t\t}\n\t\tout[ i ] = dim;\n\t\ti -= 1;\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = broadcastShapes;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Broadcast array shapes to a single shape.\n*\n* @module @stdlib/ndarray/base/broadcast-shapes\n*\n* @example\n* var broadcastShapes = require( '@stdlib/ndarray/base/broadcast-shapes' );\n*\n* var shapes = [\n* [ 8, 1, 6, 1 ],\n* [ 7, 1, 5 ]\n* ];\n*\n* var out = broadcastShapes( shapes );\n* // returns [ 8, 7, 6, 5 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar str2enum = require( './../../../base/dtype-str2enum' );\nvar dtype = require( './../../../base/buffer-dtype' );\n\n\n// MAIN //\n\n/**\n* Returns the data type enumeration constant for a provided ndarray data buffer.\n*\n* @param {Collection} arr - strided array\n* @returns {(integer|null)} data type enumeration constant or null\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( 10 );\n*\n* var c = dtypeEnum( x );\n* // returns \n*/\nfunction dtypeEnum( arr ) {\n\tvar dt = dtype( arr );\n\tif ( dt ) {\n\t\treturn str2enum( dt );\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dtypeEnum;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the data type enumeration constant for an ndarray data buffer.\n*\n* @module @stdlib/ndarray/base/buffer-dtype-enum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dtypeEnum = require( '@stdlib/ndarray/base/buffer-dtype-enum' );\n*\n* var x = new Float64Array( 10 );\n*\n* var c = dtypeEnum( x );\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an object mapping data type strings to single letter abbreviations.\n*\n* @private\n* @returns {Object} object mapping data type string to single letter abbreviations\n*/\nfunction table() {\n\treturn {\n\t\t'binary': 'r',\n\n\t\t'bool': 'x',\n\n\t\t'complex64': 'c',\n\t\t'complex128': 'z',\n\n\t\t'float16': 'h',\n\t\t'bfloat16': 'e',\n\t\t'float32': 'f',\n\t\t'float64': 'd',\n\t\t'float128': 'g',\n\n\t\t'generic': 'o',\n\n\t\t'int8': 's',\n\t\t'int16': 'k',\n\t\t'int32': 'i',\n\t\t'int64': 'l',\n\t\t'int128': 'm',\n\t\t'int256': 'n',\n\n\t\t'uint8': 'b',\n\t\t'uint8c': 'a',\n\t\t'uint16': 't',\n\t\t'uint32': 'u',\n\t\t'uint64': 'v',\n\t\t'uint128': 'w',\n\t\t'uint256': 'y'\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = table;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar resolve = require( './../../../base/dtype-resolve-str' );\nvar table = require( './table.js' );\n\n\n// VARIABLES //\n\nvar TABLE;\n\n\n// MAIN //\n\n/**\n* Returns the single letter character abbreviation for an underlying array data type.\n*\n* @param {*} [dtype] - data type value\n* @returns {(Object|string|null)} single letter character abbreviation(s)\n*\n* @example\n* var obj = dtypeChar();\n* // returns {...}\n*\n* @example\n* var ch = dtypeChar( 'float64' );\n* // returns 'd'\n*\n* ch = dtypeChar( 'generic' );\n* // returns 'o'\n*/\nfunction dtypeChar( dtype ) {\n\tif ( arguments.length === 0 ) {\n\t\treturn table();\n\t}\n\tif ( TABLE === void 0 ) {\n\t\tTABLE = table();\n\t}\n\treturn TABLE[ resolve( dtype ) ] || null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dtypeChar;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the single letter character abbreviation for an underlying array data type.\n*\n* @module @stdlib/ndarray/base/dtype-char\n*\n* @example\n* var dtypeChar = require( '@stdlib/ndarray/base/dtype-char' );\n*\n* var ch = dtypeChar( 'float64' );\n* // returns 'd'\n*\n* ch = dtypeChar( 'generic' );\n* // returns 'o'\n*\n* @example\n* var dtypeChar = require( '@stdlib/ndarray/base/dtype-char' );\n*\n* var obj = dtypeChar();\n* // returns {...}\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar objectInverse = require( '@stdlib/utils/object-inverse' );\nvar dtypeChar = require( './../../../base/dtype-char' );\n\n\n// VARIABLES //\n\nvar TABLE;\n\n\n// MAIN //\n\n/**\n* Returns the data type string associated with a provided single letter abbreviation.\n*\n* @param {string} ch - single letter character abbreviation\n* @returns {(Object|string|null)} data type string\n*\n* @example\n* var obj = char2dtype();\n* // returns {...}\n*\n* @example\n* var out = char2dtype( 'd' );\n* // returns 'float64'\n*\n* out = char2dtype( '(' );\n* // returns null\n*/\nfunction char2dtype( ch ) {\n\tif ( arguments.length === 0 ) {\n\t\treturn objectInverse( dtypeChar() );\n\t}\n\tif ( TABLE === void 0 ) {\n\t\tTABLE = objectInverse( dtypeChar() );\n\t}\n\treturn TABLE[ ch ] || null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = char2dtype;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the data type string associated with a provided single letter abbreviation.\n*\n* @module @stdlib/ndarray/base/char2dtype\n*\n* @example\n* var char2dtype = require( '@stdlib/ndarray/base/char2dtype' );\n*\n* var out = char2dtype();\n* // returns {...}\n*\n* @example\n* var char2dtype = require( '@stdlib/ndarray/base/char2dtype' );\n*\n* var out = char2dtype( 'd' );\n* // returns 'float64'\n*\n* out = char2dtype( '(' );\n* // returns null\n*/\n\n// MODULES //\n\nvar char2dtype = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = char2dtype;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an object mapping data type strings to descriptions.\n*\n* @private\n* @returns {Object} object mapping data type strings to descriptions\n*/\nfunction table() {\n\treturn {\n\t\t'binary': 'byte',\n\n\t\t'bool': 'boolean',\n\n\t\t'complex64': 'single-precision floating-point complex number',\n\t\t'complex128': 'double-precision floating-point complex number',\n\n\t\t'float16': 'half-precision floating-point number',\n\t\t'bfloat16': 'brain floating-point number',\n\t\t'float32': 'single-precision floating-point number',\n\t\t'float64': 'double-precision floating-point number',\n\t\t'float128': 'quadruple-precision floating-point number',\n\n\t\t'generic': 'generic array value',\n\n\t\t'int8': 'signed 8-bit integer',\n\t\t'int16': 'signed 16-bit integer',\n\t\t'int32': 'signed 32-bit integer',\n\t\t'int64': 'signed 64-bit integer',\n\t\t'int128': 'signed 128-bit integer',\n\t\t'int256': 'signed 256-bit integer',\n\n\t\t'uint8': 'unsigned 8-bit integer',\n\t\t'uint8c': 'unsigned 8-bit integer (clamped)',\n\t\t'uint16': 'unsigned 16-bit integer',\n\t\t'uint32': 'unsigned 32-bit integer',\n\t\t'uint64': 'unsigned 64-bit integer',\n\t\t'uint128': 'unsigned 128-bit integer',\n\t\t'uint256': 'unsigned 256-bit integer'\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = table;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar resolve = require( './../../../base/dtype-resolve-str' );\nvar table = require( './table.js' );\n\n\n// VARIABLES //\n\nvar TABLE;\n\n\n// MAIN //\n\n/**\n* Returns the description for a provided data type.\n*\n* @param {*} [dtype] - data type value\n* @returns {(Object|string|null)} description(s)\n*\n* @example\n* var obj = dtypeDesc();\n* // returns {...}\n*\n* @example\n* var desc = dtypeDesc( 'float64' );\n* // returns '...'\n*\n* desc = dtypeDesc( 'generic' );\n* // returns '...'\n*/\nfunction dtypeDesc( dtype ) {\n\tif ( arguments.length === 0 ) {\n\t\treturn table();\n\t}\n\tif ( TABLE === void 0 ) {\n\t\tTABLE = table();\n\t}\n\treturn TABLE[ resolve( dtype ) ] || null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dtypeDesc;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the description for a specified data type.\n*\n* @module @stdlib/ndarray/base/dtype-desc\n*\n* @example\n* var dtypeDesc = require( '@stdlib/ndarray/base/dtype-desc' );\n*\n* var out = dtypeDesc( 'float64' );\n* // returns '...'\n*\n* out = dtypeDesc( 'generic' );\n* // returns '...'\n*\n* @example\n* var dtypeDesc = require( '@stdlib/ndarray/base/dtype-desc' );\n*\n* var obj = dtypeDesc();\n* // returns {...}\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar enum2str = require( './../../../base/dtype-enum2str' );\nvar str2enum = require( './../../../base/dtype-str2enum' );\n\n\n// MAIN //\n\n/**\n* Returns the enumeration constant associated with a supported ndarray data type value.\n*\n* ## Notes\n*\n* - Downstream consumers of this function should **not** rely on specific integer values (e.g., `INT8 == 0`). Instead, the function should be used in an opaque manner.\n*\n* @param {*} dtype - data type value\n* @returns {(integer|null)} enumeration constant or null\n*\n* @example\n* var v = resolve( 'int8' );\n* // returns \n*/\nfunction resolve( dtype ) {\n\tvar t = ( typeof dtype );\n\tif ( t === 'number' ) {\n\t\treturn ( enum2str( dtype ) ) ? dtype : null;\n\t}\n\tif ( t === 'string' ) {\n\t\treturn str2enum( dtype );\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = resolve;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the enumeration constant associated with a supported ndarray data type value.\n*\n* @module @stdlib/ndarray/base/dtype-resolve-enum\n*\n* @example\n* var resolve = require( '@stdlib/ndarray/base/dtype-resolve-enum' );\n*\n* var v = resolve( 'float64' );\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "{\n\t\"binary\": null,\n\t\"bool\": \"bool\",\n\t\"complex64\": \"stdlib_complex64_t\",\n\t\"complex128\": \"stdlib_complex128_t\",\n\t\"float16\": null,\n\t\"bfloat16\": null,\n\t\"float32\": \"float\",\n\t\"float64\": \"double\",\n\t\"float128\": null,\n\t\"generic\": null,\n\t\"int8\": \"int8_t\",\n\t\"int16\": \"int16_t\",\n\t\"int32\": \"int32_t\",\n\t\"int64\": \"int64_t\",\n\t\"int128\": null,\n\t\"int256\": null,\n\t\"uint8\": \"uint8_t\",\n\t\"uint8c\": null,\n\t\"uint16\": \"uint16_t\",\n\t\"uint32\": \"uint32_t\",\n\t\"uint64\": \"uint64_t\",\n\t\"uint128\": null,\n\t\"uint256\": null\n}\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar resolve = require( './../../../base/dtype-resolve-str' );\nvar TABLE = require( './table.json' );\n\n\n// MAIN //\n\n/**\n* Returns the C data type associated with a provided data type string.\n*\n* @param {*} dtype - data type value\n* @returns {(string|null)} C data type\n*\n* @example\n* var out = dtype2c( 'float64' );\n* // returns 'double'\n*\n* out = dtype2c( 'generic' );\n* // returns null\n*/\nfunction dtype2c( dtype ) {\n\treturn TABLE[ resolve( dtype ) ] || null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dtype2c;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the C data type associated with a provided data type value.\n*\n* @module @stdlib/ndarray/base/dtype2c\n*\n* @example\n* var dtype2c = require( '@stdlib/ndarray/base/dtype2c' );\n*\n* var out = dtype2c( 'float64' );\n* // returns 'double'\n*\n* out = dtype2c( 'generic' );\n* // returns null\n*/\n\n// MODULES //\n\nvar dtype2c = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = dtype2c;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isArrayLikeObject = require( '@stdlib/assert/is-array-like-object' );\nvar isNonNegativeInteger = require( '@stdlib/assert/is-nonnegative-integer' ).isPrimitive;\nvar resolve = require( './../../../base/dtype-resolve-str' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Transforms a list of array argument data types into a list of signatures.\n*\n* @param {ArrayLikeObject} dtypes - list of array argument data types\n* @param {NonNegativeInteger} nin - number of input array arguments\n* @param {NonNegativeInteger} nout - number of output array arguments\n* @throws {TypeError} first argument must be an array-like object\n* @throws {TypeError} second argument must be a nonnegative integer\n* @throws {TypeError} third argument must be a nonnegative integer\n* @throws {RangeError} first argument must contain at least one element\n* @throws {RangeError} length of the first argument is incompatible with the second and third arguments\n* @returns {StringArray} list of signatures\n*\n* @example\n* var dtypes = [\n* 'float64', 'float64',\n* 'float32', 'float32'\n* ];\n*\n* var sigs = dtypes2signatures( dtypes, 1, 1 );\n* // returns [ '(float64) => (float64)', '(float32) => (float32)' ]\n*/\nfunction dtypes2signatures( dtypes, nin, nout ) {\n\tvar len;\n\tvar out;\n\tvar tmp;\n\tvar dt;\n\tvar N;\n\tvar M;\n\tvar i;\n\tvar m;\n\n\tif ( !isArrayLikeObject( dtypes ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object. Value: `%s`.', dtypes ) );\n\t}\n\tif ( !isNonNegativeInteger( nin ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a nonnegative integer. Value: `%s`.', nin ) );\n\t}\n\tif ( !isNonNegativeInteger( nout ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Third argument must be a nonnegative integer. Value: `%s`.', nout ) );\n\t}\n\tlen = dtypes.length;\n\tif ( len === 0 ) {\n\t\tthrow new RangeError( 'invalid argument. First argument must contain at least one element.' );\n\t}\n\tN = nin + nout;\n\tif ( len%N !== 0 ) {\n\t\tthrow new RangeError( 'invalid arguments. Length of the first argument is incompatible with the second and third arguments.' );\n\t}\n\tout = [];\n\n\t// Create a temporary array for storing signatures...\n\ttmp = [];\n\n\t// [ '(', , ', ', ..., ') => (', , ', ', ..., ')' ] => 1+nin+nin-1+1+nout+nout-1+1 => 1 + (2*nin) + (2*nout) => 1 + (2*(nin+nout))\n\tM = 2 * N;\n\tm = 2 * nin;\n\tfor ( i = 0; i <= M; i++ ) {\n\t\tif ( i === 0 ) {\n\t\t\tif ( i === m ) {\n\t\t\t\ttmp.push( '() => (' );\n\t\t\t} else {\n\t\t\t\ttmp.push( '(' );\n\t\t\t}\n\t\t} else if ( i === M ) {\n\t\t\tif ( i === m ) {\n\t\t\t\ttmp.push( ') => ()' );\n\t\t\t} else {\n\t\t\t\ttmp.push( ')' );\n\t\t\t}\n\t\t} else if ( i === m ) {\n\t\t\ttmp.push( ') => (' );\n\t\t} else if ( i%2 === 1 ) {\n\t\t\ttmp.push( '' );\n\t\t} else {\n\t\t\ttmp.push( ', ' );\n\t\t}\n\t}\n\tfor ( i = 0; i < len; i++ ) {\n\t\tdt = resolve( dtypes[ i ] );\n\t\tif ( dt === null ) {\n\t\t\tdt = dtypes[ i ];\n\t\t}\n\t\tm = i % N;\n\t\ttmp[ (2*m)+1 ] = dt;\n\t\tif ( m === N-1 ) {\n\t\t\tout.push( tmp.join( '' ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dtypes2signatures;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Transform a list of array argument data types into a list of signatures.\n*\n* @module @stdlib/ndarray/base/dtypes2signatures\n*\n* @example\n* var dtypes2signatures = require( '@stdlib/ndarray/base/dtypes2signatures' );\n*\n* var dtypes = [\n* 'float64', 'float64',\n* 'float32', 'float32'\n* ];\n*\n* var sigs = dtypes2signatures( dtypes, 2, 0 );\n* // returns [ '(float64) => (float64)', '(float32) => (float32)' ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar shape2strides = require( './../../../base/shape2strides' );\nvar strides2offset = require( './../../../base/strides2offset' );\nvar ndarray = require( './../../../base/ctor' );\nvar numel = require( './../../../base/numel' );\nvar emptyArray = require( '@stdlib/array/empty' );\nvar allocUnsafe = require( '@stdlib/buffer/alloc-unsafe' );\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized ndarray having a specified shape and data type.\n*\n* @param {string} dtype - data type\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {string} order - array order\n* @throws {TypeError} first argument must be a recognized data type\n* @returns {ndarray} ndarray\n*\n* @example\n* var arr = empty( 'float32', [ 2, 2 ], 'row-major' );\n* // returns \n*\n* var sh = arr.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = arr.dtype;\n* // returns 'float32'\n*/\nfunction empty( dtype, shape, order ) {\n\tvar ndims;\n\tvar buf;\n\tvar len;\n\tvar st;\n\n\tndims = shape.length;\n\tif ( ndims > 0 ) {\n\t\tlen = numel( shape );\n\t\tst = shape2strides( shape, order );\n\t} else {\n\t\t// For 0-dimensional arrays, the buffer should contain a single element...\n\t\tlen = 1;\n\t\tst = [ 0 ];\n\t}\n\tif ( dtype === 'binary' ) {\n\t\tbuf = allocUnsafe( len );\n\t} else {\n\t\tbuf = emptyArray( len, dtype );\n\t}\n\treturn new ndarray( dtype, buf, shape, st, strides2offset( shape, st ), order ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = empty;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create an uninitialized ndarray having a specified shape and data type.\n*\n* @module @stdlib/ndarray/base/empty\n*\n* @example\n* var empty = require( '@stdlib/ndarray/base/empty' );\n*\n* var arr = empty( 'float32', [ 2, 2 ], 'row-major' );\n* // returns \n*\n* var sh = arr.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = arr.dtype;\n* // returns 'float32'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar shape2strides = require( './../../../base/shape2strides' );\nvar strides2offset = require( './../../../base/strides2offset' );\nvar numel = require( './../../../base/numel' );\nvar getDType = require( './../../../base/dtype' );\nvar getShape = require( './../../../base/shape' );\nvar getOrder = require( './../../../base/order' );\nvar emptyArray = require( '@stdlib/array/empty' );\nvar allocUnsafe = require( '@stdlib/buffer/alloc-unsafe' );\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized ndarray having the same shape and data type as a provided ndarray.\n*\n* @param {ndarray} x - input array\n* @throws {TypeError} first argument must have a recognized data type\n* @returns {ndarray} ndarray\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/base/zeros' );\n*\n* var x = zeros( 'float32', [ 2, 2 ], 'row-major' );\n* // returns \n*\n* var y = emptyLike( x );\n* // returns \n*\n* var sh = y.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = y.dtype;\n* // returns 'float32'\n*/\nfunction emptyLike( x ) {\n\tvar ndims;\n\tvar len;\n\tvar buf;\n\tvar ord;\n\tvar sh;\n\tvar st;\n\tvar dt;\n\n\tdt = getDType( x );\n\tsh = getShape( x, true );\n\tord = getOrder( x );\n\n\tndims = sh.length;\n\tif ( ndims > 0 ) {\n\t\tlen = numel( sh );\n\t\tst = shape2strides( sh, ord );\n\t} else {\n\t\t// For 0-dimensional arrays, the buffer should contain a single element...\n\t\tlen = 1;\n\t\tst = [ 0 ];\n\t}\n\tif ( dt === 'binary' ) {\n\t\tbuf = allocUnsafe( len );\n\t} else {\n\t\tbuf = emptyArray( len, dt );\n\t}\n\treturn new x.constructor( dt, buf, sh, st, strides2offset( sh, st ), ord );\n}\n\n\n// EXPORTS //\n\nmodule.exports = emptyLike;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create an uninitialized ndarray having the same shape and data type as a provided ndarray.\n*\n* @module @stdlib/ndarray/base/empty-like\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/base/zeros' );\n* var emptyLike = require( '@stdlib/ndarray/base/empty-like' );\n*\n* var x = zeros( 'float32', [ 2, 2 ], 'row-major' );\n* // returns \n*\n* var y = emptyLike( x );\n* // returns \n*\n* var sh = y.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = y.dtype;\n* // returns 'float32'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isReadOnly = require( './../../../base/assert/is-read-only' );\nvar getDType = require( './../../../base/dtype' );\nvar getShape = require( './../../../base/shape' );\nvar getStrides = require( './../../../base/strides' );\nvar getOffset = require( './../../../base/offset' );\nvar getOrder = require( './../../../base/order' );\nvar getData = require( './../../../base/data-buffer' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Expands the shape of an array by inserting a new dimension of size one at a specified axis.\n*\n* ## Notes\n*\n* - A provided axis must reside on the interval `[-N-1, N]`, where `N` is the rank (i.e., number of dimensions) of the provided input array. If provided a negative `axis`, the axis position at which to insert a singleton dimension is computed as `N + axis + 1`. Hence, if provided `-1`, the resolved axis position is `N` (i.e., a singleton dimension is appended to the input array).\n*\n* @param {ndarray} x - input array\n* @param {integer} axis - axis at which to insert a singleton dimension\n* @throws {RangeError} must provide a valid axis\n* @returns {ndarray} output array\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var shx = x.shape;\n* // returns [ 2, 2 ]\n*\n* var y = expandDimensions( x, 1 );\n* // returns \n*\n* var shy = y.shape;\n* // returns [ 2, 1, 2 ]\n*\n* var v = y.get( 0, 0, 0 );\n* // returns 1\n*\n* v = y.get( 0, 0, 1 );\n* // returns 2\n*\n* v = y.get( 1, 0, 0 );\n* // returns 3\n*\n* v = y.get( 1, 0, 1 );\n* // returns 4\n*/\nfunction expandDimensions( x, axis ) {\n\tvar strides;\n\tvar shape;\n\tvar ord;\n\tvar sh;\n\tvar st;\n\tvar N;\n\tvar i;\n\n\tsh = getShape( x, false );\n\tst = getStrides( x, false );\n\tord = getOrder( x );\n\tN = sh.length;\n\n\tstrides = [];\n\tshape = [];\n\n\tif ( axis < 0 ) {\n\t\tif ( axis < -N-1 ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Specified axis is out-of-bounds. Must be on the interval: [-%u-1, %u]. Value: `%d`.', N, N, axis ) );\n\t\t}\n\t\taxis += N + 1;\n\t} else if ( axis > N ) {\n\t\tthrow new RangeError( format( 'invalid argument. Specified axis is out-of-bounds. Must be on the interval: [-%u-1, %u]. Value: `%d`.', N, N, axis ) );\n\t}\n\tif ( axis === 0 ) {\n\t\t// Prepend singleton dimension...\n\t\tshape.push( 1 );\n\t\tstrides.push( st[ 0 ] );\n\n\t\t// Copy remaining dimensions...\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tshape.push( sh[ i ] );\n\t\t\tstrides.push( st[ i ] );\n\t\t}\n\t} else if ( axis === N ) {\n\t\t// Copy dimensions...\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tshape.push( sh[ i ] );\n\t\t\tstrides.push( st[ i ] );\n\t\t}\n\t\t// Append singleton dimension...\n\t\tshape.push( 1 );\n\t\tstrides.push( st[ N-1 ] );\n\t} else {\n\t\t// Insert a singleton dimension...\n\t\tfor ( i = 0; i < N+1; i++ ) {\n\t\t\tif ( i === axis ) {\n\t\t\t\tshape.push( 1 );\n\t\t\t\tif ( ord === 'row-major' ) {\n\t\t\t\t\tstrides.push( st[ i-1 ] );\n\t\t\t\t} else { // ord === 'column-major'\n\t\t\t\t\tstrides.push( st[ i ] );\n\t\t\t\t}\n\t\t\t} else if ( i < axis ) {\n\t\t\t\tshape.push( sh[ i ] );\n\t\t\t\tstrides.push( st[ i ] );\n\t\t\t} else { // i > axis\n\t\t\t\tshape.push( sh[ i-1 ] );\n\t\t\t\tstrides.push( st[ i-1 ] );\n\t\t\t}\n\t\t}\n\t}\n\tif ( isReadOnly( x ) ) {\n\t\t// If provided a read-only view, the returned array should also be read-only...\n\t\treturn new x.constructor( getDType( x ), getData( x ), shape, strides, getOffset( x ), ord, { // eslint-disable-line max-len\n\t\t\t'readonly': true\n\t\t});\n\t}\n\treturn new x.constructor( getDType( x ), getData( x ), shape, strides, getOffset( x ), ord ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = expandDimensions;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Expand the shape of an array by inserting a new dimension of size one at a specified axis.\n*\n* @module @stdlib/ndarray/base/expand-dimensions\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var expandDimensions = require( '@stdlib/ndarray/base/expand-dimensions' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var shx = x.shape;\n* // returns [ 2, 2 ]\n*\n* var y = expandDimensions( x, 1 );\n* // returns \n*\n* var shy = y.shape;\n* // returns [ 2, 1, 2 ]\n*\n* var v = y.get( 0, 0, 0 );\n* // returns 1\n*\n* v = y.get( 0, 0, 1 );\n* // returns 2\n*\n* v = y.get( 1, 0, 0 );\n* // returns 3\n*\n* v = y.get( 1, 0, 1 );\n* // returns 4\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isAccessorArray = require( '@stdlib/array/base/assert/is-accessor-array' );\nvar accessorSetter = require( '@stdlib/array/base/accessor-setter' );\nvar setter = require( '@stdlib/array/base/setter' );\nvar buffer = require( './../../../base/buffer' );\nvar ndarray = require( './../../../base/ctor' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns a zero-dimensional ndarray containing a provided scalar value.\n*\n* @param {*} value - scalar value\n* @param {string} dtype - output array data type\n* @param {string} order - memory layout (either 'row-major' or 'column-major')\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {ndarray} ndarray\n*\n* @example\n* var x = scalar2ndarray( 1.0, 'float64', 'row-major' );\n* // returns \n*\n* var sh = x.shape;\n* // returns []\n*\n* var dt = x.dtype;\n* // returns 'float64'\n*\n* var v = x.get();\n* // returns 1.0\n*/\nfunction scalar2ndarray( value, dtype, order ) {\n\tvar buf;\n\tvar set;\n\n\tbuf = buffer( dtype, 1 );\n\tif ( buf === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a recognized data type. Value: `%s`.', dtype ) );\n\t}\n\tif ( /^complex/.test( dtype ) && typeof value === 'number' ) {\n\t\tvalue = [ value, 0.0 ]; // note: we're assuming that the ComplexXXArray setter accepts an array of interleaved real and imaginary components\n\t}\n\tif ( isAccessorArray( buf ) ) {\n\t\tset = accessorSetter( dtype );\n\t} else {\n\t\tset = setter( dtype );\n\t}\n\tset( buf, 0, value );\n\treturn new ndarray( dtype, buf, [], [ 0 ], 0, order );\n}\n\n\n// EXPORTS //\n\nmodule.exports = scalar2ndarray;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a scalar value to a zero-dimensional ndarray.\n*\n* @module @stdlib/ndarray/base/from-scalar\n*\n* @example\n* var scalar2ndarray = require( '@stdlib/ndarray/base/from-scalar' );\n*\n* var x = scalar2ndarray( 1.0, 'float64', 'row-major' );\n* // returns \n*\n* var sh = x.shape;\n* // returns []\n*\n* var dt = x.dtype;\n* // returns 'float64'\n*\n* var v = x.get();\n* // returns 1.0\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar format = require( '@stdlib/string/format' );\nvar trunc = require( '@stdlib/math/base/special/trunc' );\n\n\n// MAIN //\n\n/**\n* Converts a linear index to an array of subscripts.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - location of the first indexed value **based** on the stride array\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {integer} idx - linear index\n* @param {string} mode - specifies how to handle a linear index which exceeds array dimensions\n* @param {(Array|TypedArray|Object)} out - destination object\n* @throws {RangeError} linear index must not exceed array dimensions\n* @returns {(Array|TypedArray|Object)} subscripts\n*\n* @example\n* var shape = [ 3, 3, 3 ];\n* var strides = [ 9, 6, 1 ];\n* var offset = 0;\n* var order = 'row-major';\n*\n* var s = [ 0, 0, 0 ];\n* var out = ind2sub( shape, strides, offset, order, 17, 'throw', s );\n* // returns [ 1, 2, 2 ]\n*\n* var bool = ( out === s );\n* // returns true\n*/\nfunction ind2sub( shape, strides, offset, order, idx, mode, out ) {\n\tvar ndims;\n\tvar len;\n\tvar k;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\tlen = 1;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tlen *= shape[ i ];\n\t}\n\tif ( mode === 'clamp' ) {\n\t\tif ( idx < 0 ) {\n\t\t\tidx = 0;\n\t\t} else if ( idx >= len ) {\n\t\t\tidx = len - 1;\n\t\t}\n\t} else if ( mode === 'wrap' ) {\n\t\tif ( idx < 0 ) {\n\t\t\tidx += len; // slight optimization to avoid modulo arithmetic when |idx| <= len\n\t\t\tif ( idx < 0 ) {\n\t\t\t\tidx %= len;\n\t\t\t\tif ( idx !== 0 ) {\n\t\t\t\t\tidx += len;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( idx >= len ) {\n\t\t\tidx -= len; // slight optimization to avoid modulo arithmetic when len < idx <= 2*len\n\t\t\tif ( idx >= len ) {\n\t\t\t\tidx %= len;\n\t\t\t}\n\t\t}\n\t} else if ( idx < 0 || idx >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.', len, idx ) );\n\t}\n\tif ( offset === 0 ) {\n\t\tif ( order === 'column-major' ) {\n\t\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\t\ts = idx % shape[ i ];\n\t\t\t\tidx -= s;\n\t\t\t\tidx /= shape[ i ];\n\t\t\t\tout[ i ] = s;\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\t// Case: row-major\n\t\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\t\ts = idx % shape[ i ];\n\t\t\tidx -= s;\n\t\t\tidx /= shape[ i ];\n\t\t\tout[ i ] = s;\n\t\t}\n\t\treturn out;\n\t}\n\tif ( order === 'column-major' ) {\n\t\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\t\ts = strides[ i ];\n\t\t\tif ( s < 0 ) {\n\t\t\t\tk = trunc( idx/s );\n\t\t\t\tidx -= k * s;\n\t\t\t\tout[ i ] = shape[ i ] - 1 + k;\n\t\t\t} else {\n\t\t\t\tk = trunc( idx/s );\n\t\t\t\tidx -= k * s;\n\t\t\t\tout[ i ] = k;\n\t\t\t}\n\t\t}\n\t\treturn out;\n\t}\n\t// Case: row-major\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\ts = strides[ i ];\n\t\tif ( s < 0 ) {\n\t\t\tk = trunc( idx/s );\n\t\t\tidx -= k * s;\n\t\t\tout[ i ] = shape[ i ] - 1 + k;\n\t\t} else {\n\t\t\tk = trunc( idx/s );\n\t\t\tidx -= k * s;\n\t\t\tout[ i ] = k;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ind2sub;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar getSubscripts = require( './assign.js' );\n\n\n// MAIN //\n\n/**\n* Converts a linear index to an array of subscripts.\n*\n* ## Notes\n*\n* - The function accepts the following \"modes\":\n*\n* - `throw`: throws an error when a linear index exceeds array dimensions.\n* - `wrap`: wrap around a linear index exceeding array dimensions using modulo arithmetic.\n* - `clamp`: set a linear index exceeding array dimensions to either `0` (minimum linear index) or the maximum linear index.\n*\n* - When provided a stride array containing negative strides, if an `offset` is greater than `0`, the function interprets the linear index as an index into the underlying data buffer for the array, thus returning subscripts from the perspective of that buffer. If an `offset` is equal to `0`, the function treats the linear index as an index into an array view, thus returning subscripts from the perspective of that view.\n*\n* ```text\n* Dims: 2x2\n* Buffer: [ 1, 2, 3, 4 ]\n*\n* View = [ a00, a01,\n* a10, a11 ]\n*\n* Strides: 2,1\n* Offset: 0\n*\n* View = [ 1, 2,\n* 3, 4 ]\n*\n* Strides: 2,-1\n* Offset: 1\n*\n* View = [ 2, 1,\n* 4, 3 ]\n*\n* Strides: -2,1\n* Offset: 2\n*\n* View = [ 3, 4,\n* 1, 2 ]\n*\n* Strides: -2,-1\n* Offset: 3\n*\n* View = [ 4, 3,\n* 2, 1 ]\n* ```\n*\n* ```javascript\n* var shape = [ 2, 2 ];\n* var order = 'row-major';\n* var strides = [ -2, 1 ];\n* var offset = 2;\n* var mode = 'throw';\n*\n* // From the perspective of a view...\n* var s = ind2sub( shape, strides, 0, order, 0, mode );\n* // returns [ 0, 0 ]\n*\n* s = ind2sub( shape, strides, 0, order, 1, mode );\n* // returns [ 0, 1 ]\n*\n* s = ind2sub( shape, strides, 0, order, 2, mode );\n* // returns [ 1, 0 ]\n*\n* s = ind2sub( shape, strides, 0, order, 3, mode );\n* // returns [ 1, 1 ]\n*\n* // From the perspective of an underlying buffer...\n* s = ind2sub( shape, strides, offset, order, 0, mode );\n* // returns [ 1, 0 ]\n*\n* s = ind2sub( shape, strides, offset, order, 1, mode );\n* // returns [ 1, 1 ]\n*\n* s = ind2sub( shape, strides, offset, order, 2, mode );\n* // returns [ 0, 0 ]\n*\n* s = ind2sub( shape, strides, offset, order, 3, mode );\n* // returns [ 0, 1 ]\n* ```\n*\n* In short, from the perspective of a view, view data is always ordered.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - location of the first indexed value **based** on the stride array\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {integer} idx - linear index\n* @param {string} mode - specifies how to handle a linear index which exceeds array dimensions\n* @throws {RangeError} linear index must not exceed array dimensions\n* @returns {Array} subscripts\n*\n* @example\n* var shape = [ 3, 3, 3 ];\n* var strides = [ 9, 6, 1 ];\n* var offset = 0;\n* var order = 'row-major';\n*\n* var s = ind2sub( shape, strides, offset, order, 17, 'throw' );\n* // returns [ 1, 2, 2 ]\n*/\nfunction ind2sub( shape, strides, offset, order, idx, mode ) {\n\tvar out;\n\tvar i;\n\n\tout = [];\n\tfor ( i = 0; i < shape.length; i++ ) {\n\t\tout.push( 0 );\n\t}\n\treturn getSubscripts( shape, strides, offset, order, idx, mode, out );\n}\n\n\n// EXPORTS //\n\nmodule.exports = ind2sub;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a linear index to an array of subscripts.\n*\n* @module @stdlib/ndarray/base/ind2sub\n*\n* @example\n* var ind2sub = require( '@stdlib/ndarray/base/ind2sub' );\n*\n* var shape = [ 3, 3, 3 ];\n* var strides = [ 9, 6, 1 ];\n* var offset = 0;\n*\n* var s = ind2sub( shape, strides, offset, 'row-major', 17, 'throw' );\n* // returns [ 1, 2, 2 ]\n*\n* @example\n* var ind2sub = require( '@stdlib/ndarray/base/ind2sub' );\n*\n* var shape = [ 3, 3, 3 ];\n* var strides = [ 9, 6, 1 ];\n* var offset = 0;\n*\n* var s = [ 0, 0, 0 ];\n* var out = ind2sub.assign( shape, strides, offset, 'row-major', 17, 'throw', s );\n* // returns [ 1, 2, 2 ]\n*\n* var bool = ( out === s );\n* // returns true\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar assign = require( './assign.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Computes the maximum linear index in an underlying data buffer accessible to an array view.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @returns {NonNegativeInteger} linear index\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ 10, 1 ];\n* var offset = 0;\n*\n* var idx = maxViewBufferIndex( shape, strides, offset );\n* // returns 99\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ -10, -1 ];\n* var offset = 99;\n*\n* var idx = maxViewBufferIndex( shape, strides, offset );\n* // returns 99\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ 1, 10 ];\n* var offset = 0;\n*\n* var idx = maxViewBufferIndex( shape, strides, offset );\n* // returns 99\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ -1, -10 ];\n* var offset = 99;\n*\n* var idx = maxViewBufferIndex( shape, strides, offset );\n* // returns 99\n*/\nfunction maxViewBufferIndex( shape, strides, offset ) {\n\tvar ndims;\n\tvar idx;\n\tvar i;\n\n\tndims = shape.length;\n\tidx = offset;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tif ( shape[ i ] === 0 ) {\n\t\t\treturn offset;\n\t\t}\n\t\tif ( strides[ i ] > 0 ) {\n\t\t\tidx += strides[ i ] * ( shape[ i ] - 1 );\n\t\t}\n\t}\n\treturn idx;\n}\n\n\n// EXPORTS //\n\nmodule.exports = maxViewBufferIndex;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Compute the maximum linear index in an underlying data buffer accessible to an array view.\n*\n* @module @stdlib/ndarray/base/max-view-buffer-index\n*\n* @example\n* var maxViewBufferIndex = require( '@stdlib/ndarray/base/max-view-buffer-index' );\n*\n* var shape = [ 10, 10 ];\n* var strides = [ 10, 1 ];\n* var offset = 0;\n*\n* var idx = maxViewBufferIndex( shape, strides, offset );\n* // returns 99\n*\n* @example\n* var maxViewBufferIndex = require( '@stdlib/ndarray/base/max-view-buffer-index' );\n*\n* var shape = [ 10, 10 ];\n* var strides = [ -10, -1 ];\n* var offset = 99;\n*\n* var idx = maxViewBufferIndex( shape, strides, offset );\n* // returns 99\n*\n* @example\n* var maxViewBufferIndex = require( '@stdlib/ndarray/base/max-view-buffer-index' );\n*\n* var shape = [ 10, 10 ];\n* var strides = [ 1, 10 ];\n* var offset = 0;\n*\n* var idx = maxViewBufferIndex( shape, strides, offset );\n* // returns 99\n*\n* @example\n* var maxViewBufferIndex = require( '@stdlib/ndarray/base/max-view-buffer-index' );\n*\n* var shape = [ 10, 10 ];\n* var strides = [ -1, -10 ];\n* var offset = 99;\n*\n* var idx = maxViewBufferIndex( shape, strides, offset );\n* // returns 99\n*/\n\n// MODULES //\n\nvar maxViewBufferIndex = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = maxViewBufferIndex;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar broadcast = require( './../../../base/broadcast-array' );\nvar getShape = require( './../../../base/shape' );\n\n\n// MAIN //\n\n/**\n* Broadcasts an ndarray to a specified shape if and only if the specified shape differs from the provided ndarray's shape.\n*\n* ## Notes\n*\n* - If a provided ndarray has the same shape as the specified shape, the function returns the provided ndarray.\n* - If a provided ndarray has a different (broadcast compatible) shape than the specified shape, the function returns a new (base) ndarray view of the provided ndarray's data. The view is typically **not** contiguous. As more than one element of a returned view may refer to the same memory location, writing to the view may affect multiple elements. If you need to write to the returned array, copy the array before performing operations which may mutate elements.\n*\n* @param {ndarray} arr - input array\n* @param {NonNegativeIntegerArray} shape - desired shape\n* @throws {Error} input array cannot have more dimensions than the desired shape\n* @throws {Error} input array dimension sizes must be `1` or equal to the corresponding dimension in the provided shape\n* @throws {Error} input array and desired shape must be broadcast compatible\n* @returns {ndarray} broadcasted array\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var shx = x.shape;\n* // returns [ 2, 2 ]\n*\n* var y = maybeBroadcastArray( x, [ 3, 2, 2 ] );\n* // returns \n*\n* var shy = y.shape;\n* // returns [ 3, 2, 2 ]\n*\n* var v = y.get( 0, 0, 0 );\n* // returns 1\n*\n* v = y.get( 0, 0, 1 );\n* // returns 2\n*\n* v = y.get( 1, 0, 0 );\n* // returns 1\n*\n* v = y.get( 1, 1, 0 );\n* // returns 3\n*\n* v = y.get( 2, 0, 0 );\n* // returns 1\n*\n* v = y.get( 2, 1, 1 );\n* // returns 4\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var y = maybeBroadcastArray( x, [ 3, 2 ] );\n* // throws \n*/\nfunction maybeBroadcastArray( arr, shape ) {\n\tvar sh;\n\tvar N;\n\tvar i;\n\n\tN = shape.length;\n\tsh = getShape( arr, false );\n\n\t// Check whether we need to broadcast the input array...\n\tif ( sh.length === N ) {\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t// Check whether dimensions match...\n\t\t\tif ( sh[ i ] !== shape[ i ] ) {\n\t\t\t\t// We found a mismatched dimension; delegate to `broadcast` to ensure that the input array is broadcast compatible with the desired array shape...\n\t\t\t\treturn broadcast( arr, shape );\n\t\t\t}\n\t\t}\n\t\treturn arr;\n\t}\n\t// If we are provided an array having a different rank (i.e., number of dimensions) than the desired shape, assume we need to broadcast, delegating to `broadcast` to ensure that the input array is broadcast compatible with the desired array shape...\n\treturn broadcast( arr, shape );\n}\n\n\n// EXPORTS //\n\nmodule.exports = maybeBroadcastArray;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Broadcast an ndarray to a specified shape if and only if the specified shape differs from the provided ndarray's shape.\n*\n* @module @stdlib/ndarray/base/maybe-broadcast-array\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var maybeBroadcastArray = require( '@stdlib/ndarray/base/maybe-broadcast-array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var shx = x.shape;\n* // returns [ 2, 2 ]\n*\n* var y = maybeBroadcastArray( x, [ 3, 2, 2 ] );\n* // returns \n*\n* var shy = y.shape;\n* // returns [ 3, 2, 2 ]\n*\n* var v = y.get( 0, 0, 0 );\n* // returns 1\n*\n* v = y.get( 0, 0, 1 );\n* // returns 2\n*\n* v = y.get( 1, 0, 0 );\n* // returns 1\n*\n* v = y.get( 1, 1, 0 );\n* // returns 3\n*\n* v = y.get( 2, 0, 0 );\n* // returns 1\n*\n* v = y.get( 2, 1, 1 );\n* // returns 4\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar setReadOnlyAccessor = require( '@stdlib/utils/define-nonenumerable-read-only-accessor' );\nvar dtypes2signatures = require( './../../../base/dtypes2signatures' );\n\n\n// MAIN //\n\n/**\n* Defines non-enumerable read-only properties which expose ndarray function meta data.\n*\n* @param {Object} meta - function meta data\n* @param {NonNegativeInteger} meta.nargs - total number of arguments\n* @param {NonNegativeInteger} meta.nin - total number of input arrays\n* @param {NonNegativeInteger} meta.nout - total number of output arrays\n* @param {ArrayLikeObject} dtypes - list of ndarray data types\n* @param {(Function|Object)} obj - object on which to define properties\n* @returns {(Function|Object)} object on which properties were defined\n*\n* @example\n* // Define ndarray function meta data:\n* var meta = {\n* 'nargs': 2,\n* 'nin': 1,\n* 'nout': 1\n* };\n*\n* // Define the list of ndarray data types:\n* var dtypes = [\n* 'float64', 'float64',\n* 'float32', 'float32',\n* 'generic', 'generic'\n* ];\n*\n* // Define an object on which to set the properties:\n* var obj = {};\n*\n* // Set the properties:\n* setProps( meta, dtypes, obj );\n*\n* @example\n* // Define ndarray function meta data:\n* var meta = {\n* 'nargs': 2,\n* 'nin': 1,\n* 'nout': 1\n* };\n*\n* // Define the list of ndarray data types:\n* var dtypes = [\n* 'float64', 'float64',\n* 'float32', 'float32',\n* 'generic', 'generic'\n* ];\n*\n* // Define a function on which to set the properties:\n* function abs( x, y ) {\n* // Implementation...\n* }\n*\n* // Set the properties:\n* setProps( meta, dtypes, abs );\n*/\nfunction setProps( meta, dtypes, obj ) {\n\t// Define the number of arguments:\n\tsetReadOnly( obj, 'nargs', meta.nargs );\n\n\t// Define the number of input arrays:\n\tsetReadOnly( obj, 'nin', meta.nin );\n\n\t// Define the number of output arrays:\n\tsetReadOnly( obj, 'nout', meta.nout );\n\n\t// Define a read-only accessor for listing a function's supported array data types:\n\tsetReadOnlyAccessor( obj, 'types', types );\n\n\treturn obj;\n\n\t/**\n\t* Returns a list of array type signatures.\n\t*\n\t* @private\n\t* @returns {StringArray} list of signatures\n\t*/\n\tfunction types() {\n\t\treturn dtypes2signatures( dtypes, meta.nin, meta.nout );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = setProps;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Define non-enumerable read-only properties which expose ndarray function meta data.\n*\n* @module @stdlib/ndarray/base/meta-data-props\n*\n* @example\n* var setProps = require( '@stdlib/ndarray/base/meta-data-props' );\n*\n* // Define ndarray function meta data:\n* var meta = {\n* 'nargs': 2,\n* 'nin': 1,\n* 'nout': 1\n* };\n*\n* // Define the list of ndarray data types:\n* var dtypes = [\n* 'float64', 'float64',\n* 'float32', 'float32',\n* 'generic', 'generic'\n* ];\n*\n* // Define an object/function on which to set the properties:\n* var obj = {};\n*\n* // Set the properties:\n* setProps( meta, dtypes, obj );\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Computes the minimum linear index in an underlying data buffer accessible to an array view.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @returns {NonNegativeInteger} linear index\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ 10, 1 ];\n* var offset = 10;\n*\n* var idx = minViewBufferIndex( shape, strides, offset );\n* // returns 10\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ -10, -1 ];\n* var offset = 109;\n*\n* var idx = minViewBufferIndex( shape, strides, offset );\n* // returns 10\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ 1, 10 ];\n* var offset = 10;\n*\n* var idx = minViewBufferIndex( shape, strides, offset );\n* // returns 10\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ -1, -10 ];\n* var offset = 109;\n*\n* var idx = minViewBufferIndex( shape, strides, offset );\n* // returns 10\n*/\nfunction minViewBufferIndex( shape, strides, offset ) {\n\tvar ndims;\n\tvar idx;\n\tvar i;\n\n\tndims = shape.length;\n\tidx = offset;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tif ( shape[ i ] === 0 ) {\n\t\t\treturn offset;\n\t\t}\n\t\tif ( strides[ i ] < 0 ) {\n\t\t\tidx += strides[ i ] * ( shape[ i ] - 1 ); // decrements the index\n\t\t}\n\t}\n\treturn idx;\n}\n\n\n// EXPORTS //\n\nmodule.exports = minViewBufferIndex;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Compute the minimum linear index in an underlying data buffer accessible to an array view.\n*\n* @module @stdlib/ndarray/base/min-view-buffer-index\n*\n* @example\n* var minViewBufferIndex = require( '@stdlib/ndarray/base/min-view-buffer-index' );\n*\n* var shape = [ 10, 10 ];\n* var strides = [ 10, 1 ];\n* var offset = 10;\n*\n* var idx = minViewBufferIndex( shape, strides, offset );\n* // returns 10\n*\n* @example\n* var minViewBufferIndex = require( '@stdlib/ndarray/base/min-view-buffer-index' );\n*\n* var shape = [ 10, 10 ];\n* var strides = [ -10, -1 ];\n* var offset = 109;\n*\n* var idx = minViewBufferIndex( shape, strides, offset );\n* // returns 10\n*\n* @example\n* var minViewBufferIndex = require( '@stdlib/ndarray/base/min-view-buffer-index' );\n*\n* var shape = [ 10, 10 ];\n* var strides = [ 1, 10 ];\n* var offset = 10;\n*\n* var idx = minViewBufferIndex( shape, strides, offset );\n* // returns 10\n*\n* @example\n* var minViewBufferIndex = require( '@stdlib/ndarray/base/min-view-buffer-index' );\n*\n* var shape = [ 10, 10 ];\n* var strides = [ -1, -10 ];\n* var offset = 109;\n*\n* var idx = minViewBufferIndex( shape, strides, offset );\n* // returns 10\n*/\n\n// MODULES //\n\nvar minViewBufferIndex = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = minViewBufferIndex;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isAccessorArray = require( '@stdlib/array/base/assert/is-accessor-array' );\nvar accessorGetter = require( '@stdlib/array/base/accessor-getter' );\nvar accessorSetter = require( '@stdlib/array/base/accessor-setter' );\nvar getter = require( '@stdlib/array/base/getter' );\nvar setter = require( '@stdlib/array/base/setter' );\nvar numel = require( './../../../base/numel' );\nvar getDType = require( './../../../base/dtype' );\nvar getShape = require( './../../../base/shape' );\nvar getStrides = require( './../../../base/strides' );\nvar getOffset = require( './../../../base/offset' );\nvar getOrder = require( './../../../base/order' );\nvar getData = require( './../../../base/data-buffer' );\n\n\n// MAIN //\n\n/**\n* Converts an ndarray-like to an object likely to have the same \"shape\".\n*\n* ## Notes\n*\n* - This function is intended as a potential performance optimization. In V8, for example, even if two objects share common properties, if those properties were added in different orders or if one object has additional properties not shared by the other object, then those objects will have different \"hidden\" classes. If a function is provided many objects having different \"shapes\", some JavaScript VMs (e.g., V8) will consider the function \"megamorphic\" and fail to perform various runtime optimizations. Accordingly, the intent of this function is to standardize the \"shape\" of the object holding ndarray meta data to ensure that internal functions operating on ndarrays are provided consistent argument \"shapes\".\n*\n* - The returned object has the following properties:\n*\n* - **ref**: reference to the original ndarray-like object.\n* - **dtype**: underlying data type.\n* - **data**: data buffer.\n* - **length**: number of elements.\n* - **shape**: array dimensions.\n* - **strides**: array strides.\n* - **offset**: index offset.\n* - **order**: order.\n* - **accessorProtocol**: `boolean` indicating whether the data buffer supports the get/set protocol (i.e., uses accessors for getting and setting elements).\n* - **accessors**: a two-element array whose first element is an accessor for retrieving an ndarray element and whose second element is an accessor for setting an ndarray element.\n*\n* @param {ndarrayLike} x - ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {Object} object containing ndarray meta data\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] );\n*\n* var obj = ndarraylike2object( x );\n* // returns {...}\n*/\nfunction ndarraylike2object( x ) {\n\tvar xbuf;\n\tvar bool;\n\tvar sh;\n\tvar dt;\n\n\txbuf = getData( x );\n\tsh = getShape( x, true );\n\tdt = getDType( x );\n\n\tbool = isAccessorArray( xbuf );\n\n\treturn {\n\t\t'ref': x,\n\t\t'dtype': dt,\n\t\t'data': xbuf,\n\t\t'length': numel( sh ),\n\t\t'shape': sh,\n\t\t'strides': getStrides( x, true ),\n\t\t'offset': getOffset( x ),\n\t\t'order': getOrder( x ),\n\t\t'accessorProtocol': bool,\n\t\t'accessors': ( bool ) ?\n\t\t\t[ accessorGetter( dt ), accessorSetter( dt ) ] :\n\t\t\t[ getter( dt ), setter( dt ) ]\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = ndarraylike2object;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert an ndarray-like object to an object likely to have the same \"shape\".\n*\n* @module @stdlib/ndarray/base/ndarraylike2object\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var ndarraylike2object = require( '@stdlib/ndarray/base/ndarraylike2object' );\n*\n* var x = array( [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] );\n*\n* var obj = ndarraylike2object( x );\n* // returns {...}\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the number of ndarray dimensions.\n*\n* @param {ndarrayLike} x - input ndarray\n* @returns {NonNegativeInteger} number of dimensions\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var n = ndims( zeros( [ 3, 3, 3 ] ) );\n* // returns 3\n*/\nfunction ndims( x ) {\n\tvar n = x.ndims; // Note: intentionally cache in case `ndims` is lazily resolved via accessor\n\tif ( typeof n === 'number' ) {\n\t\treturn n;\n\t}\n\treturn x.shape.length;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ndims;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the number of ndarray dimensions.\n*\n* @module @stdlib/ndarray/base/ndims\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var ndims = require( '@stdlib/ndarray/base/ndims' );\n*\n* var n = ndims( zeros( [ 3, 3, 3 ] ) );\n* // returns 3\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar ROW_MAJOR = 'row-major';\n\n\n// FUNCTIONS //\n\n/**\n* Returns the next Cartesian index (row-major).\n*\n* @private\n* @param {NonNegativeInteger} ndims - number of dimensions\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {NonNegativeIntegerArray} idx - current dimension indices\n* @param {NonNegativeInteger} dim - index of the dimension from which to start incrementing (inclusive)\n* @param {(Array|TypedArray|Object)} out - output array\n* @returns {(Array|TypedArray|Object)} output array\n*/\nfunction rowmajor( ndims, shape, idx, dim, out ) {\n\tvar i;\n\tvar j;\n\n\t// Set dimension indices which are skipped...\n\tfor ( i = ndims-1; i > dim; i-- ) {\n\t\tout[ i ] = idx[ i ];\n\t}\n\t// Search for the first dimension in which we don't have to \"carry the one\"...\n\tfor ( i = dim; i >= 0; i-- ) {\n\t\tj = ( idx[ i ] + 1 ) % shape[ i ];\n\t\tout[ i ] = j;\n\n\t\t// If the current index value is greater than zero, we can continue iterating within the current sub-array...\n\t\tif ( j > 0 ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\t// Set dimension indices which did not get updated...\n\tfor ( i -= 1; i >= 0; i-- ) {\n\t\tout[ i ] = idx[ i ];\n\t}\n\treturn out;\n}\n\n/**\n* Returns the next Cartesian index (column-major).\n*\n* @private\n* @param {NonNegativeInteger} ndims - number of dimensions\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {NonNegativeIntegerArray} idx - current dimension indices\n* @param {NonNegativeInteger} dim - index of the dimension from which to start incrementing (inclusive)\n* @param {(Array|TypedArray|Object)} out - output array\n* @returns {(Array|TypedArray|Object)} output array\n*/\nfunction columnmajor( ndims, shape, idx, dim, out ) {\n\tvar i;\n\tvar j;\n\n\t// Set dimension indices which are skipped...\n\tfor ( i = 0; i < dim; i++ ) {\n\t\tout[ i ] = idx[ i ];\n\t}\n\t// Search for the first dimension in which we don't have to \"carry the one\"...\n\tfor ( i = dim; i < ndims; i++ ) {\n\t\tj = ( idx[ i ] + 1 ) % shape[ i ];\n\t\tout[ i ] = j;\n\n\t\t// If the current index value is greater than zero, we can continue iterating within the current sub-array...\n\t\tif ( j > 0 ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\t// Set dimension indices which did not get updated...\n\tfor ( i += 1; i < ndims; i++ ) {\n\t\tout[ i ] = idx[ i ];\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Returns the next Cartesian index (i.e., set of subscripts/dimension indices) and assigns results to a provided output array.\n*\n* ## Notes\n*\n* - The function does not check whether the current index is the \"last\" index. Instead, if the function is provided dimension indices corresponding to the last element, the function will cycle back to the \"first\" index.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {string} order - index iteration order\n* @param {NonNegativeIntegerArray} idx - current dimension indices\n* @param {integer} dim - index of the dimension from which to start incrementing (inclusive)\n* @param {(Array|TypedArray|Object)} out - output array\n* @returns {(Array|TypedArray|Object|null)} output array (or null)\n*\n* @example\n* var shape = [ 12 ];\n* var idx = nextCartesianIndex( shape, 'row-major', [ 2 ], 0, [ 0 ] );\n* // returns [ 3 ]\n*\n* @example\n* var shape = [ 2, 2, 2 ];\n*\n* var out = [ 0, 0, 0 ];\n* var idx = nextCartesianIndex( shape, 'row-major', [ 0, 0, 1 ], -1, out );\n* // returns [ 0, 1, 0 ]\n*\n* idx = nextCartesianIndex( shape, 'row-major', idx, -1, out );\n* // returns [ 0, 1, 1 ]\n*\n* idx = nextCartesianIndex( shape, 'row-major', idx, -1, out );\n* // returns [ 1, 0, 0 ]\n*\n* idx = nextCartesianIndex( shape, 'row-major', idx, -1, out );\n* // returns [ 1, 0, 1 ]\n*\n* idx = nextCartesianIndex( shape, 'row-major', idx, -1, out );\n* // returns [ 1, 1, 0 ]\n*\n* idx = nextCartesianIndex( shape, 'row-major', idx, -1, out );\n* // returns [ 1, 1, 1 ]\n*\n* @example\n* var shape = [];\n* var idx = nextCartesianIndex( shape, 'row-major', [], 0, [] );\n* // returns null\n*\n* @example\n* var shape = [ 12 ];\n* var idx = nextCartesianIndex( shape, 'row-major', [ 2 ], -10, [ 0 ] );\n* // returns null\n*\n* @example\n* var shape = [ 12 ];\n* var idx = nextCartesianIndex( shape, 'column-major', [ 2 ], 10, [ 0 ] );\n* // returns null\n*/\nfunction nextCartesianIndex( shape, order, idx, dim, out ) {\n\tvar ndims = shape.length;\n\tif ( ndims === 0 ) {\n\t\treturn null;\n\t}\n\tif ( dim < 0 ) {\n\t\tdim += ndims;\n\t\tif ( dim < 0 ) {\n\t\t\t// Out-of-bounds:\n\t\t\treturn null;\n\t\t}\n\t} else if ( dim >= ndims ) {\n\t\t// Out-of-bounds:\n\t\treturn null;\n\t}\n\tif ( order === ROW_MAJOR ) {\n\t\treturn rowmajor( ndims, shape, idx, dim, out );\n\t}\n\t// order === 'column-major'\n\treturn columnmajor( ndims, shape, idx, dim, out );\n}\n\n\n// EXPORTS //\n\nmodule.exports = nextCartesianIndex;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar zeros = require( '@stdlib/array/base/zeros' );\nvar assign = require( './assign.js' );\n\n\n// MAIN //\n\n/**\n* Returns the next Cartesian index (i.e., set of subscripts/dimension indices).\n*\n* ## Notes\n*\n* - The function does not check whether the current index is the \"last\" index. Instead, if the function is provided dimension indices corresponding to the last element, the function will cycle back to the \"first\" index.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {string} order - index iteration order\n* @param {NonNegativeIntegerArray} idx - current dimension indices\n* @param {integer} dim - index of the dimension from which to start incrementing (inclusive)\n* @returns {(NonNegativeIntegerArray|null)} updated dimension indices\n*\n* @example\n* var shape = [ 12 ];\n* var idx = nextCartesianIndex( shape, 'row-major', [ 2 ], 0 );\n* // returns [ 3 ]\n*\n* @example\n* var shape = [ 2, 2, 2 ];\n*\n* var idx = nextCartesianIndex( shape, 'row-major', [ 0, 0, 1 ], -1 );\n* // returns [ 0, 1, 0 ]\n*\n* idx = nextCartesianIndex( shape, 'row-major', idx, -1 );\n* // returns [ 0, 1, 1 ]\n*\n* idx = nextCartesianIndex( shape, 'row-major', idx, -1 );\n* // returns [ 1, 0, 0 ]\n*\n* idx = nextCartesianIndex( shape, 'row-major', idx, -1 );\n* // returns [ 1, 0, 1 ]\n*\n* idx = nextCartesianIndex( shape, 'row-major', idx, -1 );\n* // returns [ 1, 1, 0 ]\n*\n* idx = nextCartesianIndex( shape, 'row-major', idx, -1 );\n* // returns [ 1, 1, 1 ]\n*\n* @example\n* var shape = [];\n* var idx = nextCartesianIndex( shape, 'row-major', [], 0 );\n* // returns null\n*\n* @example\n* var shape = [ 12 ];\n* var idx = nextCartesianIndex( shape, 'row-major', [ 2 ], -10 );\n* // returns null\n*\n* @example\n* var shape = [ 12 ];\n* var idx = nextCartesianIndex( shape, 'column-major', [ 2 ], 10 );\n* // returns null\n*/\nfunction nextCartesianIndex( shape, order, idx, dim ) {\n\treturn assign( shape, order, idx, dim, zeros( shape.length ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = nextCartesianIndex;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the next Cartesian index (i.e., set of subscripts/dimension indices).\n*\n* @module @stdlib/ndarray/base/next-cartesian-index\n*\n* @example\n* var nextCartesianIndex = require( '@stdlib/ndarray/base/next-cartesian-index' );\n*\n* var shape = [ 2, 2, 2 ];\n*\n* var idx = nextCartesianIndex( shape, 'row-major', [ 0, 0, 1 ], -1 );\n* // returns [ 0, 1, 0 ]\n*\n* idx = nextCartesianIndex( shape, 'row-major', idx, -1 );\n* // returns [ 0, 1, 1 ]\n*\n* idx = nextCartesianIndex( shape, 'row-major', idx, -1 );\n* // returns [ 1, 0, 0 ]\n*\n* idx = nextCartesianIndex( shape, 'row-major', idx, -1 );\n* // returns [ 1, 0, 1 ]\n*\n* idx = nextCartesianIndex( shape, 'row-major', idx, -1 );\n* // returns [ 1, 1, 0 ]\n*\n* idx = nextCartesianIndex( shape, 'row-major', idx, -1 );\n* // returns [ 1, 1, 1 ]\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar assign = require( './assign.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the number of non-singleton dimensions.\n*\n* ## Notes\n*\n* - A singleton dimension is a dimension whose size is equal to `1`.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @returns {NonNegativeInteger} number of non-singleton dimensions\n*\n* @example\n* var shape = [ 2, 2, 1 ];\n*\n* var n = nonsingletonDimensions( shape );\n* // returns 2\n*\n* @example\n* var shape = [ 1, 1, 1 ];\n*\n* var n = nonsingletonDimensions( shape );\n* // returns 0\n*/\nfunction nonsingletonDimensions( shape ) {\n\tvar cnt;\n\tvar i;\n\n\tcnt = 0;\n\tfor ( i = 0; i < shape.length; i++ ) {\n\t\tif ( shape[ i ] !== 1 ) {\n\t\t\tcnt += 1;\n\t\t}\n\t}\n\treturn cnt;\n}\n\n\n// EXPORTS //\n\nmodule.exports = nonsingletonDimensions;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the number of non-nonsingleton dimensions.\n*\n* @module @stdlib/ndarray/base/nonsingleton-dimensions\n*\n* @example\n* var nonsingletonDimensions = require( '@stdlib/ndarray/base/nonsingleton-dimensions' );\n*\n* var shape = [ 2, 2, 1 ];\n*\n* var n = nonsingletonDimensions( shape );\n* // returns 2\n*\n* @example\n* var nonsingletonDimensions = require( '@stdlib/ndarray/base/nonsingleton-dimensions' );\n*\n* var shape = [ 1, 1, 1 ];\n*\n* var n = nonsingletonDimensions( shape );\n* // returns 0\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Simultaneously sorts two arrays based on the sort order of the first array using insertion sort.\n*\n* ## Notes\n*\n* - The first array is sorted in increasing order according to absolute value.\n* - The algorithm has space complexity `O(1)` and worst case time complexity `O(N^2)`.\n* - The algorithm is efficient for small arrays (typically `N <= 20``) and is particularly efficient for sorting arrays which are already substantially sorted.\n* - The algorithm is **stable**, meaning that the algorithm does **not** change the order of array elements which are equal or equivalent.\n* - The input arrays are sorted in-place (i.e., the input arrays are mutated).\n*\n* @private\n* @param {Array} x - first array\n* @param {Array} y - second array\n* @returns {void}\n*\n* @example\n* var x = [ -4, -2, 3, 1 ];\n* var y = [ 0, 1, 2, 3 ];\n*\n* sort2ins( x, y );\n*\n* console.log( x );\n* // => [ 1, -2, 3, -4 ]\n*\n* console.log( y );\n* // => [ 3, 1, 2, 0 ]\n*/\nfunction sort2ins( x, y ) {\n\tvar avx;\n\tvar aux;\n\tvar ix;\n\tvar iy;\n\tvar jx;\n\tvar jy;\n\tvar vx;\n\tvar vy;\n\tvar ux;\n\tvar i;\n\n\tix = 1;\n\tiy = 1;\n\n\t// Sort in increasing order...\n\tfor ( i = 1; i < x.length; i++ ) {\n\t\tvx = x[ ix ];\n\t\tavx = ( vx < 0 ) ? -vx : vx;\n\n\t\tvy = y[ iy ];\n\n\t\tjx = ix - 1;\n\t\tjy = iy - 1;\n\n\t\t// Shift all larger values to the left of the current element to the right...\n\t\twhile ( jx >= 0 ) {\n\t\t\tux = x[ jx ];\n\t\t\taux = ( ux < 0 ) ? -ux : ux;\n\t\t\tif ( aux <= avx ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tx[ jx+1 ] = ux;\n\t\t\ty[ jy+1 ] = y[ jy ];\n\t\t\tjx -= 1;\n\t\t\tjy -= 1;\n\t\t}\n\t\tx[ jx+1 ] = vx;\n\t\ty[ jy+1 ] = vy;\n\t\tix += 1;\n\t\tiy += 1;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = sort2ins;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar zeroTo = require( '@stdlib/array/base/zero-to' );\nvar copy = require( '@stdlib/array/base/copy-indexed' );\nvar take = require( '@stdlib/array/base/take' );\nvar sort2ins = require( './sort2ins.js' );\n\n\n// MAIN //\n\n/**\n* Reorders ndarray dimensions and associated strides for loop interchange.\n*\n* ## Notes\n*\n* - The returned object has the following properties:\n*\n* - **sh**: dimensions sorted in loop order.\n* - **sx**: ndarray strides sorted in loop order.\n*\n* @param {NonNegativeIntegerArray} sh - array dimensions\n* @param {IntegerArray} sx - array stride lengths\n* @returns {Object} loop interchange data\n*\n* @example\n* var sh = [ 2, 3, 4 ];\n*\n* var sx = [ 12, 4, 1 ]; // row-major\n*\n* var o = loopOrder( sh, sx );\n* // returns {...}\n*\n* var ssh = o.sh;\n* // returns [ 4, 3, 2 ]\n*\n* var ssx = o.sx;\n* // returns [ 1, 4, 12 ]\n*/\nfunction loopOrder( sh, sx ) {\n\tvar idx;\n\n\t// Initialize a loop interchange index array for generating a loop order permutation:\n\tidx = zeroTo( sh.length );\n\n\t// Sort the array strides in increasing order (of magnitude):\n\tsx = copy( sx );\n\tsort2ins( sx, idx );\n\n\t// Permute the shape based on the sorted array strides:\n\tsh = take( sh, idx );\n\n\treturn {\n\t\t'sh': sh,\n\t\t'sx': sx\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = loopOrder;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Reorder ndarray dimensions and associated strides for loop interchange.\n*\n* @module @stdlib/ndarray/base/nullary-loop-interchange-order\n*\n* @example\n* var nullaryLoopOrder = require( '@stdlib/ndarray/base/nullary-loop-interchange-order' );\n*\n* var sh = [ 2, 3, 4 ];\n*\n* var sx = [ 12, 4, 1 ]; // row-major\n*\n* var o = nullaryLoopOrder( sh, sx );\n* // returns {...}\n*\n* var ssh = o.sh;\n* // returns [ 4, 3, 2 ]\n*\n* var ssx = o.sx;\n* // returns [ 1, 4, 12 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar defaults = {\n\t// Define a default block size (in bytes):\n\t'BLOCK_SIZE_IN_BYTES': 64|0, // 64b is a common cache line size. How applicable the common cache line size is here is debatable, given that, depending on the associated stride(s), the innermost loop may not iterate over adjacent elements. The primary goal is to have a block size in which all data within a block can always fit in (L1) cache, regardless of cache size (i.e., cache-oblivious). For reference, a common L1 cache size is 32kB per core. For best performance, block sizes should be tuned based on system hardware; however, such tuning is not readily available to us here. Without obvious better alternatives, 64b has some theoretical (and practical) underpinning, and it should be good enough for most inputs, especially for ndarrays with near contiguity.\n\n\t// Define a default block size (in elements):\n\t'BLOCK_SIZE_IN_ELEMENTS': 8|0 // 64 bytes / 8 bytes per element (i.e., default element size is same as a double)\n};\n\n\n// EXPORTS //\n\nmodule.exports = defaults;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar bytesPerElement = require( './../../../base/bytes-per-element' );\nvar defaults = require( './defaults.js' );\n\n\n// MAIN //\n\n/**\n* Returns a loop block size for multi-dimensional array tiled loops.\n*\n* @param {string} dtypeX - array data type\n* @returns {integer} block size (in units of elements)\n*\n* @example\n* var bsize = nullaryBlockSize( 'float64' );\n* // returns \n*/\nfunction nullaryBlockSize( dtypeX ) {\n\tvar nbx = bytesPerElement( dtypeX );\n\tif ( nbx === null ) { // e.g., \"generic\" arrays\n\t\treturn defaults.BLOCK_SIZE_IN_ELEMENTS;\n\t}\n\treturn ( defaults.BLOCK_SIZE_IN_BYTES/nbx )|0; // asm type annotation\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullaryBlockSize;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Resolve a loop block size for multi-dimensional array tiled loops.\n*\n* @module @stdlib/ndarray/base/nullary-tiling-block-size\n*\n* @example\n* var nullaryBlockSize = require( '@stdlib/ndarray/base/nullary-tiling-block-size' );\n*\n* var bsize = nullaryBlockSize( 'float64' );\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* blockednullary2d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction blockednullary2d( x, fcn ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar ox1;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar j0;\n\tvar j1;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tset = x.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\tif ( j1 < bsize ) {\n\t\t\ts1 = j1;\n\t\t\tj1 = 0;\n\t\t} else {\n\t\t\ts1 = bsize;\n\t\t\tj1 -= bsize;\n\t\t}\n\t\tox1 = ox + ( j1*sx[1] );\n\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\tif ( j0 < bsize ) {\n\t\t\t\ts0 = j0;\n\t\t\t\tj0 = 0;\n\t\t\t} else {\n\t\t\t\ts0 = bsize;\n\t\t\t\tj0 -= bsize;\n\t\t\t}\n\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t// Compute the loop offset increment:\n\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t// Iterate over the ndarray dimensions...\n\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\tset( xbuf, ix, fcn() );\n\t\t\t\t\tix += dx0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary2d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* blockednullary3d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction blockednullary3d( x, fcn ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar ox1;\n\tvar ox2;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tset = x.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\tif ( j2 < bsize ) {\n\t\t\ts2 = j2;\n\t\t\tj2 = 0;\n\t\t} else {\n\t\t\ts2 = bsize;\n\t\t\tj2 -= bsize;\n\t\t}\n\t\tox2 = ox + ( j2*sx[2] );\n\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\tif ( j1 < bsize ) {\n\t\t\t\ts1 = j1;\n\t\t\t\tj1 = 0;\n\t\t\t} else {\n\t\t\t\ts1 = bsize;\n\t\t\t\tj1 -= bsize;\n\t\t\t}\n\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\ts0 = j0;\n\t\t\t\t\tj0 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts0 = bsize;\n\t\t\t\t\tj0 -= bsize;\n\t\t\t\t}\n\t\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t// Compute the loop offset increment:\n\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\tset( xbuf, ix, fcn() );\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary3d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* blockednullary4d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction blockednullary4d( x, fcn ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tset = x.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\tif ( j3 < bsize ) {\n\t\t\ts3 = j3;\n\t\t\tj3 = 0;\n\t\t} else {\n\t\t\ts3 = bsize;\n\t\t\tj3 -= bsize;\n\t\t}\n\t\tox3 = ox + ( j3*sx[3] );\n\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\tif ( j2 < bsize ) {\n\t\t\t\ts2 = j2;\n\t\t\t\tj2 = 0;\n\t\t\t} else {\n\t\t\t\ts2 = bsize;\n\t\t\t\tj2 -= bsize;\n\t\t\t}\n\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\ts1 = j1;\n\t\t\t\t\tj1 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts1 = bsize;\n\t\t\t\t\tj1 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\tset( xbuf, ix, fcn() );\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary4d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* blockednullary5d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction blockednullary5d( x, fcn ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tset = x.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\tif ( j4 < bsize ) {\n\t\t\ts4 = j4;\n\t\t\tj4 = 0;\n\t\t} else {\n\t\t\ts4 = bsize;\n\t\t\tj4 -= bsize;\n\t\t}\n\t\tox4 = ox + ( j4*sx[4] );\n\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\tif ( j3 < bsize ) {\n\t\t\t\ts3 = j3;\n\t\t\t\tj3 = 0;\n\t\t\t} else {\n\t\t\t\ts3 = bsize;\n\t\t\t\tj3 -= bsize;\n\t\t\t}\n\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\ts2 = j2;\n\t\t\t\t\tj2 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts2 = bsize;\n\t\t\t\t\tj2 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tset( xbuf, ix, fcn() );\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary5d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* blockednullary6d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction blockednullary6d( x, fcn ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tset = x.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\tif ( j5 < bsize ) {\n\t\t\ts5 = j5;\n\t\t\tj5 = 0;\n\t\t} else {\n\t\t\ts5 = bsize;\n\t\t\tj5 -= bsize;\n\t\t}\n\t\tox5 = ox + ( j5*sx[5] );\n\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\tif ( j4 < bsize ) {\n\t\t\t\ts4 = j4;\n\t\t\t\tj4 = 0;\n\t\t\t} else {\n\t\t\t\ts4 = bsize;\n\t\t\t\tj4 -= bsize;\n\t\t\t}\n\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\ts3 = j3;\n\t\t\t\t\tj3 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts3 = bsize;\n\t\t\t\t\tj3 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tset( xbuf, ix, fcn() );\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary6d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var real = require( '@stdlib/complex/real' );\n* var imag = require( '@stdlib/complex/imag' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* blockednullary7d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = real( v );\n* // returns 10.0\n*\n* var im = imag( v );\n* // returns -10.0\n*/\nfunction blockednullary7d( x, fcn ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tset = x.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\tif ( j6 < bsize ) {\n\t\t\ts6 = j6;\n\t\t\tj6 = 0;\n\t\t} else {\n\t\t\ts6 = bsize;\n\t\t\tj6 -= bsize;\n\t\t}\n\t\tox6 = ox + ( j6*sx[6] );\n\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\tif ( j5 < bsize ) {\n\t\t\t\ts5 = j5;\n\t\t\t\tj5 = 0;\n\t\t\t} else {\n\t\t\t\ts5 = bsize;\n\t\t\t\tj5 -= bsize;\n\t\t\t}\n\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\ts4 = j4;\n\t\t\t\t\tj4 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts4 = bsize;\n\t\t\t\t\tj4 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tset( xbuf, ix, fcn() );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary7d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* blockednullary8d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction blockednullary8d( x, fcn ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tset = x.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\tif ( j7 < bsize ) {\n\t\t\ts7 = j7;\n\t\t\tj7 = 0;\n\t\t} else {\n\t\t\ts7 = bsize;\n\t\t\tj7 -= bsize;\n\t\t}\n\t\tox7 = ox + ( j7*sx[7] );\n\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\tif ( j6 < bsize ) {\n\t\t\t\ts6 = j6;\n\t\t\t\tj6 = 0;\n\t\t\t} else {\n\t\t\t\ts6 = bsize;\n\t\t\t\tj6 -= bsize;\n\t\t\t}\n\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\ts5 = j5;\n\t\t\t\t\tj5 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts5 = bsize;\n\t\t\t\t\tj5 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tset( xbuf, ix, fcn() );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary8d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* blockednullary9d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction blockednullary9d( x, fcn ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tset = x.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\tif ( j8 < bsize ) {\n\t\t\ts8 = j8;\n\t\t\tj8 = 0;\n\t\t} else {\n\t\t\ts8 = bsize;\n\t\t\tj8 -= bsize;\n\t\t}\n\t\tox8 = ox + ( j8*sx[8] );\n\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\tif ( j7 < bsize ) {\n\t\t\t\ts7 = j7;\n\t\t\t\tj7 = 0;\n\t\t\t} else {\n\t\t\t\ts7 = bsize;\n\t\t\t\tj7 -= bsize;\n\t\t\t}\n\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\ts6 = j6;\n\t\t\t\t\tj6 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts6 = bsize;\n\t\t\t\t\tj6 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ 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license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* blockednullary10d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction blockednullary10d( x, fcn ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar ox9;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar s9;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar j9;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tset = x.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j9 = sh[9]; j9 > 0; ) {\n\t\tif ( j9 < bsize ) {\n\t\t\ts9 = j9;\n\t\t\tj9 = 0;\n\t\t} else {\n\t\t\ts9 = bsize;\n\t\t\tj9 -= bsize;\n\t\t}\n\t\tox9 = ox + ( j9*sx[9] );\n\t\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\t\tif ( j8 < bsize ) {\n\t\t\t\ts8 = j8;\n\t\t\t\tj8 = 0;\n\t\t\t} else {\n\t\t\t\ts8 = bsize;\n\t\t\t\tj8 -= bsize;\n\t\t\t}\n\t\t\tdx9 = sx[9] - ( s8*sx[8] );\n\t\t\tox8 = ox9 + ( j8*sx[8] );\n\t\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\t\tif ( j7 < bsize ) {\n\t\t\t\t\ts7 = j7;\n\t\t\t\t\tj7 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts7 = bsize;\n\t\t\t\t\tj7 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\t\ts6 = j6;\n\t\t\t\t\t\tj6 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts6 = bsize;\n\t\t\t\t\t\tj6 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\t\tfor ( i9 = 0; i9 < s9; i9++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 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\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx8;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx9;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary10d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* blockednullary2d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction blockednullary2d( x, fcn ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar ox1;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar j0;\n\tvar j1;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Iterate over blocks...\n\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\tif ( j1 < bsize ) {\n\t\t\ts1 = j1;\n\t\t\tj1 = 0;\n\t\t} else {\n\t\t\ts1 = bsize;\n\t\t\tj1 -= bsize;\n\t\t}\n\t\tox1 = ox + ( j1*sx[1] );\n\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\tif ( j0 < bsize ) {\n\t\t\t\ts0 = j0;\n\t\t\t\tj0 = 0;\n\t\t\t} else {\n\t\t\t\ts0 = bsize;\n\t\t\t\tj0 -= bsize;\n\t\t\t}\n\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t// Compute the loop offset increment:\n\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t// Iterate over the ndarray dimensions...\n\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\txbuf[ ix ] = fcn();\n\t\t\t\t\tix += dx0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary2d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* blockednullary3d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction blockednullary3d( x, fcn ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar ox1;\n\tvar ox2;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Iterate over blocks...\n\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\tif ( j2 < bsize ) {\n\t\t\ts2 = j2;\n\t\t\tj2 = 0;\n\t\t} else {\n\t\t\ts2 = bsize;\n\t\t\tj2 -= bsize;\n\t\t}\n\t\tox2 = ox + ( j2*sx[2] );\n\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\tif ( j1 < bsize ) {\n\t\t\t\ts1 = j1;\n\t\t\t\tj1 = 0;\n\t\t\t} else {\n\t\t\t\ts1 = bsize;\n\t\t\t\tj1 -= bsize;\n\t\t\t}\n\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\ts0 = j0;\n\t\t\t\t\tj0 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts0 = bsize;\n\t\t\t\t\tj0 -= bsize;\n\t\t\t\t}\n\t\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t// Compute the loop offset increment:\n\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\txbuf[ ix ] = fcn();\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary3d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* blockednullary4d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction blockednullary4d( x, fcn ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Iterate over blocks...\n\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\tif ( j3 < bsize ) {\n\t\t\ts3 = j3;\n\t\t\tj3 = 0;\n\t\t} else {\n\t\t\ts3 = bsize;\n\t\t\tj3 -= bsize;\n\t\t}\n\t\tox3 = ox + ( j3*sx[3] );\n\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\tif ( j2 < bsize ) {\n\t\t\t\ts2 = j2;\n\t\t\t\tj2 = 0;\n\t\t\t} else {\n\t\t\t\ts2 = bsize;\n\t\t\t\tj2 -= bsize;\n\t\t\t}\n\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\ts1 = j1;\n\t\t\t\t\tj1 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts1 = bsize;\n\t\t\t\t\tj1 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\txbuf[ ix ] = fcn();\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary4d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* blockednullary5d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction blockednullary5d( x, fcn ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Iterate over blocks...\n\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\tif ( j4 < bsize ) {\n\t\t\ts4 = j4;\n\t\t\tj4 = 0;\n\t\t} else {\n\t\t\ts4 = bsize;\n\t\t\tj4 -= bsize;\n\t\t}\n\t\tox4 = ox + ( j4*sx[4] );\n\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\tif ( j3 < bsize ) {\n\t\t\t\ts3 = j3;\n\t\t\t\tj3 = 0;\n\t\t\t} else {\n\t\t\t\ts3 = bsize;\n\t\t\t\tj3 -= bsize;\n\t\t\t}\n\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\ts2 = j2;\n\t\t\t\t\tj2 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts2 = bsize;\n\t\t\t\t\tj2 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\txbuf[ ix ] = fcn();\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary5d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* blockednullary6d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction blockednullary6d( x, fcn ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Iterate over blocks...\n\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\tif ( j5 < bsize ) {\n\t\t\ts5 = j5;\n\t\t\tj5 = 0;\n\t\t} else {\n\t\t\ts5 = bsize;\n\t\t\tj5 -= bsize;\n\t\t}\n\t\tox5 = ox + ( j5*sx[5] );\n\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\tif ( j4 < bsize ) {\n\t\t\t\ts4 = j4;\n\t\t\t\tj4 = 0;\n\t\t\t} else {\n\t\t\t\ts4 = bsize;\n\t\t\t\tj4 -= bsize;\n\t\t\t}\n\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\ts3 = j3;\n\t\t\t\t\tj3 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts3 = bsize;\n\t\t\t\t\tj3 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\txbuf[ ix ] = fcn();\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary6d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* blockednullary7d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction blockednullary7d( x, fcn ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Iterate over blocks...\n\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\tif ( j6 < bsize ) {\n\t\t\ts6 = j6;\n\t\t\tj6 = 0;\n\t\t} else {\n\t\t\ts6 = bsize;\n\t\t\tj6 -= bsize;\n\t\t}\n\t\tox6 = ox + ( j6*sx[6] );\n\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\tif ( j5 < bsize ) {\n\t\t\t\ts5 = j5;\n\t\t\t\tj5 = 0;\n\t\t\t} else {\n\t\t\t\ts5 = bsize;\n\t\t\t\tj5 -= bsize;\n\t\t\t}\n\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\ts4 = j4;\n\t\t\t\t\tj4 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts4 = bsize;\n\t\t\t\t\tj4 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\txbuf[ ix ] = fcn();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary7d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* blockednullary8d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction blockednullary8d( x, fcn ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Iterate over blocks...\n\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\tif ( j7 < bsize ) {\n\t\t\ts7 = j7;\n\t\t\tj7 = 0;\n\t\t} else {\n\t\t\ts7 = bsize;\n\t\t\tj7 -= bsize;\n\t\t}\n\t\tox7 = ox + ( j7*sx[7] );\n\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\tif ( j6 < bsize ) {\n\t\t\t\ts6 = j6;\n\t\t\t\tj6 = 0;\n\t\t\t} else {\n\t\t\t\ts6 = bsize;\n\t\t\t\tj6 -= bsize;\n\t\t\t}\n\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\ts5 = j5;\n\t\t\t\t\tj5 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts5 = bsize;\n\t\t\t\t\tj5 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\txbuf[ ix ] = fcn();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary8d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* blockednullary9d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction blockednullary9d( x, fcn ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Iterate over blocks...\n\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\tif ( j8 < bsize ) {\n\t\t\ts8 = j8;\n\t\t\tj8 = 0;\n\t\t} else {\n\t\t\ts8 = bsize;\n\t\t\tj8 -= bsize;\n\t\t}\n\t\tox8 = ox + ( j8*sx[8] );\n\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\tif ( j7 < bsize ) {\n\t\t\t\ts7 = j7;\n\t\t\t\tj7 = 0;\n\t\t\t} else {\n\t\t\t\ts7 = bsize;\n\t\t\t\tj7 -= bsize;\n\t\t\t}\n\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\ts6 = j6;\n\t\t\t\t\tj6 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts6 = bsize;\n\t\t\t\t\tj6 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i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t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx8;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary9d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* blockednullary10d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction blockednullary10d( x, fcn ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar ox9;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar s9;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar j9;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Iterate over blocks...\n\tfor ( j9 = sh[9]; j9 > 0; ) {\n\t\tif ( j9 < bsize ) {\n\t\t\ts9 = j9;\n\t\t\tj9 = 0;\n\t\t} else {\n\t\t\ts9 = bsize;\n\t\t\tj9 -= bsize;\n\t\t}\n\t\tox9 = ox + ( j9*sx[9] );\n\t\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\t\tif ( j8 < bsize ) {\n\t\t\t\ts8 = j8;\n\t\t\t\tj8 = 0;\n\t\t\t} else {\n\t\t\t\ts8 = bsize;\n\t\t\t\tj8 -= bsize;\n\t\t\t}\n\t\t\tdx9 = sx[9] - ( s8*sx[8] );\n\t\t\tox8 = ox9 + ( j8*sx[8] );\n\t\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\t\tif ( j7 < bsize ) {\n\t\t\t\t\ts7 = j7;\n\t\t\t\t\tj7 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts7 = bsize;\n\t\t\t\t\tj7 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\t\ts6 = j6;\n\t\t\t\t\t\tj6 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts6 = bsize;\n\t\t\t\t\t\tj6 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\t\tfor ( i9 = 0; i9 < s9; i9++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6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t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx8;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx9;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary10d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary function and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 4 );\n*\n* // Define the shape of the output array:\n* var shape = [];\n*\n* // Define the array strides:\n* var sx = [ 0 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* nullary0d( x, fcn );\n*\n* var v = x.data.get( 1 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction nullary0d( x, fcn ) {\n\tx.accessors[ 1 ]( x.data, x.offset, fcn() );\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary0d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 4 ];\n*\n* // Define the array strides:\n* var sx = [ 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* nullary1d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction nullary1d( x, fcn ) {\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar S0;\n\tvar ix;\n\tvar i0;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables: dimensions and loop offset (pointer) increments...\n\tS0 = x.shape[ 0 ];\n\tdx0 = x.strides[ 0 ];\n\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tset = x.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\tset( xbuf, ix, fcn() );\n\t\tix += dx0;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary1d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* nullary2d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction nullary2d( x, fcn ) {\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 1 ];\n\t\tS1 = sh[ 0 ];\n\t\tdx0 = sx[ 1 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 0 ] - ( S0*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tset = x.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\tset( xbuf, ix, fcn() );\n\t\t\tix += dx0;\n\t\t}\n\t\tix += dx1;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary2d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* nullary3d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction nullary3d( x, fcn ) {\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 2 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 0 ];\n\t\tdx0 = sx[ 2 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[2] );\n\t\tdx2 = sx[ 0 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tset = x.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\tset( xbuf, ix, fcn() );\n\t\t\t\tix += dx0;\n\t\t\t}\n\t\t\tix += dx1;\n\t\t}\n\t\tix += dx2;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary3d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* nullary4d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction nullary4d( x, fcn ) {\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 3 ];\n\t\tS1 = sh[ 2 ];\n\t\tS2 = sh[ 1 ];\n\t\tS3 = sh[ 0 ];\n\t\tdx0 = sx[ 3 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 2 ] - ( S0*sx[3] );\n\t\tdx2 = sx[ 1 ] - ( S1*sx[2] );\n\t\tdx3 = sx[ 0 ] - ( S2*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tset = x.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\tset( xbuf, ix, fcn() );\n\t\t\t\t\tix += dx0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t}\n\t\t\tix += dx2;\n\t\t}\n\t\tix += dx3;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary4d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* nullary5d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction nullary5d( x, fcn ) {\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 4 ];\n\t\tS1 = sh[ 3 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 1 ];\n\t\tS4 = sh[ 0 ];\n\t\tdx0 = sx[ 4 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 3 ] - ( S0*sx[4] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[3] );\n\t\tdx3 = sx[ 1 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 0 ] - ( S3*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tset = x.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\tset( xbuf, ix, fcn() );\n\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx1;\n\t\t\t\t}\n\t\t\t\tix += dx2;\n\t\t\t}\n\t\t\tix += dx3;\n\t\t}\n\t\tix += dx4;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary5d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* nullary6d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction nullary6d( x, fcn ) {\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 5 ];\n\t\tS1 = sh[ 4 ];\n\t\tS2 = sh[ 3 ];\n\t\tS3 = sh[ 2 ];\n\t\tS4 = sh[ 1 ];\n\t\tS5 = sh[ 0 ];\n\t\tdx0 = sx[ 5 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 4 ] - ( S0*sx[5] );\n\t\tdx2 = sx[ 3 ] - ( S1*sx[4] );\n\t\tdx3 = sx[ 2 ] - ( S2*sx[3] );\n\t\tdx4 = sx[ 1 ] - ( S3*sx[2] );\n\t\tdx5 = sx[ 0 ] - ( S4*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tset = x.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\tset( xbuf, ix, fcn() );\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t}\n\t\t\t\tix += dx3;\n\t\t\t}\n\t\t\tix += dx4;\n\t\t}\n\t\tix += dx5;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary6d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var real = require( '@stdlib/complex/real' );\n* var imag = require( '@stdlib/complex/imag' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* nullary7d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = real( v );\n* // returns 10.0\n*\n* var im = imag( v );\n* // returns -10.0\n*/\nfunction nullary7d( x, fcn ) {\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 6 ];\n\t\tS1 = sh[ 5 ];\n\t\tS2 = sh[ 4 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 2 ];\n\t\tS5 = sh[ 1 ];\n\t\tS6 = sh[ 0 ];\n\t\tdx0 = sx[ 6 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 5 ] - ( S0*sx[6] );\n\t\tdx2 = sx[ 4 ] - ( S1*sx[5] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[4] );\n\t\tdx4 = sx[ 2 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 1 ] - ( S4*sx[2] );\n\t\tdx6 = sx[ 0 ] - ( S5*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tset = x.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\tset( xbuf, ix, fcn() );\n\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx3;\n\t\t\t\t}\n\t\t\t\tix += dx4;\n\t\t\t}\n\t\t\tix += dx5;\n\t\t}\n\t\tix += dx6;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary7d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* nullary8d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction nullary8d( x, fcn ) {\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 7 ];\n\t\tS1 = sh[ 6 ];\n\t\tS2 = sh[ 5 ];\n\t\tS3 = sh[ 4 ];\n\t\tS4 = sh[ 3 ];\n\t\tS5 = sh[ 2 ];\n\t\tS6 = sh[ 1 ];\n\t\tS7 = sh[ 0 ];\n\t\tdx0 = sx[ 7 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 6 ] - ( S0*sx[7] );\n\t\tdx2 = sx[ 5 ] - ( S1*sx[6] );\n\t\tdx3 = sx[ 4 ] - ( S2*sx[5] );\n\t\tdx4 = sx[ 3 ] - ( S3*sx[4] );\n\t\tdx5 = sx[ 2 ] - ( S4*sx[3] );\n\t\tdx6 = sx[ 1 ] - ( S5*sx[2] );\n\t\tdx7 = sx[ 0 ] - ( S6*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tset = x.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\tset( xbuf, ix, fcn() );\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx4;\n\t\t\t\t}\n\t\t\t\tix += dx5;\n\t\t\t}\n\t\t\tix += dx6;\n\t\t}\n\t\tix += dx7;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary8d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* nullary9d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction nullary9d( x, fcn ) {\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 8 ];\n\t\tS1 = sh[ 7 ];\n\t\tS2 = sh[ 6 ];\n\t\tS3 = sh[ 5 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 3 ];\n\t\tS6 = sh[ 2 ];\n\t\tS7 = sh[ 1 ];\n\t\tS8 = sh[ 0 ];\n\t\tdx0 = sx[ 8 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 7 ] - ( S0*sx[8] );\n\t\tdx2 = sx[ 6 ] - ( S1*sx[7] );\n\t\tdx3 = sx[ 5 ] - ( S2*sx[6] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[5] );\n\t\tdx5 = sx[ 3 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 2 ] - ( S5*sx[3] );\n\t\tdx7 = sx[ 1 ] - ( S6*sx[2] );\n\t\tdx8 = sx[ 0 ] - ( S7*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tset = x.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\tset( xbuf, ix, fcn() );\n\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx5;\n\t\t\t\t}\n\t\t\t\tix += dx6;\n\t\t\t}\n\t\t\tix += dx7;\n\t\t}\n\t\tix += dx8;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary9d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* nullary10d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction nullary10d( x, fcn ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar S9;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 9 ];\n\t\tS1 = sh[ 8 ];\n\t\tS2 = sh[ 7 ];\n\t\tS3 = sh[ 6 ];\n\t\tS4 = sh[ 5 ];\n\t\tS5 = sh[ 4 ];\n\t\tS6 = sh[ 3 ];\n\t\tS7 = sh[ 2 ];\n\t\tS8 = sh[ 1 ];\n\t\tS9 = sh[ 0 ];\n\t\tdx0 = sx[ 9 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 8 ] - ( S0*sx[9] );\n\t\tdx2 = sx[ 7 ] - ( S1*sx[8] );\n\t\tdx3 = sx[ 6 ] - ( S2*sx[7] );\n\t\tdx4 = sx[ 5 ] - ( S3*sx[6] );\n\t\tdx5 = sx[ 4 ] - ( S4*sx[5] );\n\t\tdx6 = sx[ 3 ] - ( S5*sx[4] );\n\t\tdx7 = sx[ 2 ] - ( S6*sx[3] );\n\t\tdx8 = sx[ 1 ] - ( S7*sx[2] );\n\t\tdx9 = sx[ 0 ] - ( S8*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tS9 = sh[ 9 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] );\n\t\tdx9 = sx[ 9 ] - ( S8*sx[8] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tset = x.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i9 = 0; i9 < S9; i9++ ) {\n\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tset( xbuf, ix, fcn() );\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx6;\n\t\t\t\t}\n\t\t\t\tix += dx7;\n\t\t\t}\n\t\t\tix += dx8;\n\t\t}\n\t\tix += dx9;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary10d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Converts a linear index in an array view to a linear index in an underlying data buffer.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - location of the first indexed value **based** on the stride array\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {integer} idx - linear index in an array view\n* @param {string} mode - specifies how to handle a linear index which exceeds array dimensions\n* @throws {RangeError} linear index must not exceed array dimensions\n* @returns {NonNegativeInteger} linear index in an underlying data buffer\n*\n* @example\n* var shape = [ 3, 3 ];\n* var strides = [ -3, 1 ];\n* var offset = 6;\n* var order = 'row-major';\n* var mode = 'throw';\n*\n* var ind = vind2bind( shape, strides, offset, order, 1, mode );\n* // returns 7\n*/\nfunction vind2bind( shape, strides, offset, order, idx, mode ) {\n\tvar ndims;\n\tvar len;\n\tvar ind;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\tlen = 1;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tlen *= shape[ i ];\n\t}\n\tif ( mode === 'clamp' ) {\n\t\tif ( idx < 0 ) {\n\t\t\tidx = 0;\n\t\t} else if ( idx >= len ) {\n\t\t\tidx = len - 1;\n\t\t}\n\t} else if ( mode === 'wrap' ) {\n\t\tif ( idx < 0 ) {\n\t\t\tidx += len; // slight optimization to avoid modulo arithmetic when |idx| <= len\n\t\t\tif ( idx < 0 ) {\n\t\t\t\tidx %= len;\n\t\t\t\tif ( idx !== 0 ) {\n\t\t\t\t\tidx += len;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( idx >= len ) {\n\t\t\tidx -= len; // slight optimization to avoid modulo arithmetic when len < idx <= 2*len\n\t\t\tif ( idx >= len ) {\n\t\t\t\tidx %= len;\n\t\t\t}\n\t\t}\n\t} else if ( idx < 0 || idx >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.', len, idx ) );\n\t}\n\t// The approach which follows is to resolve a view index to its subscripts and then plug the subscripts into the standard formula for computing the linear index in the underlying data buffer...\n\tind = offset;\n\tif ( order === 'column-major' ) {\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\ts = idx % shape[ i ];\n\t\t\tidx -= s;\n\t\t\tidx /= shape[ i ];\n\t\t\tind += s * strides[ i ];\n\t\t}\n\t\treturn ind;\n\t}\n\t// Case: row-major\n\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\ts = idx % shape[ i ];\n\t\tidx -= s;\n\t\tidx /= shape[ i ];\n\t\tind += s * strides[ i ];\n\t}\n\treturn ind;\n}\n\n\n// EXPORTS //\n\nmodule.exports = vind2bind;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a linear index in an array view to a linear index in an underlying data buffer.\n*\n* @module @stdlib/ndarray/base/vind2bind\n*\n* @example\n* var vind2bind = require( '@stdlib/ndarray/base/vind2bind' );\n*\n* var shape = [ 3, 3 ];\n* var strides = [ -3, 1 ];\n* var offset = 6;\n* var order = 'row-major';\n* var mode = 'throw';\n*\n* var ind = vind2bind( shape, strides, offset, order, 1, mode );\n* // returns 7\n*/\n\n// MODULES //\n\nvar vind2bind = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = vind2bind;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar numel = require( './../../../base/numel' );\nvar vind2bind = require( './../../../base/vind2bind' );\n\n\n// VARIABLES //\n\nvar MODE = 'throw';\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* nullarynd( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction nullarynd( x, fcn ) {\n\tvar xbuf;\n\tvar ordx;\n\tvar len;\n\tvar set;\n\tvar sh;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i;\n\n\tsh = x.shape;\n\n\t// Compute the total number of elements over which to iterate:\n\tlen = numel( sh );\n\n\t// Cache a reference to the output ndarray data buffer:\n\txbuf = x.data;\n\n\t// Cache a reference to the stride array:\n\tsx = x.strides;\n\n\t// Cache the index of the first indexed element:\n\tox = x.offset;\n\n\t// Cache the array order:\n\tordx = x.order;\n\n\t// Cache accessor:\n\tset = x.accessors[ 1 ];\n\n\t// Iterate over each element based on the linear **view** index, regardless as to how the data is stored in memory...\n\tfor ( i = 0; i < len; i++ ) {\n\t\tix = vind2bind( sh, sx, ox, ordx, i, MODE );\n\t\tset( xbuf, ix, fcn() );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullarynd;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary function and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 2 );\n*\n* // Define the shape of the output array:\n* var shape = [];\n*\n* // Define the array strides:\n* var sx = [ 0 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* nullary0d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0 ]\n*/\nfunction nullary0d( x, fcn ) {\n\tx.data[ x.offset ] = fcn();\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary0d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary function and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 4 ];\n*\n* // Define the array strides:\n* var sx = [ 2 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* nullary1d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 0.0, 10.0, 0.0, 10.0, 0.0, 10.0 ]\n*/\nfunction nullary1d( x, fcn ) {\n\tvar xbuf;\n\tvar dx0;\n\tvar S0;\n\tvar ix;\n\tvar i0;\n\n\t// Note on variable naming convention: S#, dx#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables: dimensions and loop offset (pointer) increments:\n\tS0 = x.shape[ 0 ];\n\tdx0 = x.strides[ 0 ];\n\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\txbuf[ ix ] = fcn();\n\t\tix += dx0;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary1d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* nullary2d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction nullary2d( x, fcn ) {\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 1 ];\n\t\tS1 = sh[ 0 ];\n\t\tdx0 = sx[ 1 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 0 ] - ( S0*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\txbuf[ ix ] = fcn();\n\t\t\tix += dx0;\n\t\t}\n\t\tix += dx1;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary2d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* nullary3d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction nullary3d( x, fcn ) {\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 2 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 0 ];\n\t\tdx0 = sx[ 2 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[2] );\n\t\tdx2 = sx[ 0 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\txbuf[ ix ] = fcn();\n\t\t\t\tix += dx0;\n\t\t\t}\n\t\t\tix += dx1;\n\t\t}\n\t\tix += dx2;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary3d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* nullary4d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction nullary4d( x, fcn ) {\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 3 ];\n\t\tS1 = sh[ 2 ];\n\t\tS2 = sh[ 1 ];\n\t\tS3 = sh[ 0 ];\n\t\tdx0 = sx[ 3 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 2 ] - ( S0*sx[3] );\n\t\tdx2 = sx[ 1 ] - ( S1*sx[2] );\n\t\tdx3 = sx[ 0 ] - ( S2*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\txbuf[ ix ] = fcn();\n\t\t\t\t\tix += dx0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t}\n\t\t\tix += dx2;\n\t\t}\n\t\tix += dx3;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary4d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* nullary5d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction nullary5d( x, fcn ) {\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 4 ];\n\t\tS1 = sh[ 3 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 1 ];\n\t\tS4 = sh[ 0 ];\n\t\tdx0 = sx[ 4 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 3 ] - ( S0*sx[4] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[3] );\n\t\tdx3 = sx[ 1 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 0 ] - ( S3*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\txbuf[ ix ] = fcn();\n\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx1;\n\t\t\t\t}\n\t\t\t\tix += dx2;\n\t\t\t}\n\t\t\tix += dx3;\n\t\t}\n\t\tix += dx4;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary5d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* nullary6d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction nullary6d( x, fcn ) {\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 5 ];\n\t\tS1 = sh[ 4 ];\n\t\tS2 = sh[ 3 ];\n\t\tS3 = sh[ 2 ];\n\t\tS4 = sh[ 1 ];\n\t\tS5 = sh[ 0 ];\n\t\tdx0 = sx[ 5 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 4 ] - ( S0*sx[5] );\n\t\tdx2 = sx[ 3 ] - ( S1*sx[4] );\n\t\tdx3 = sx[ 2 ] - ( S2*sx[3] );\n\t\tdx4 = sx[ 1 ] - ( S3*sx[2] );\n\t\tdx5 = sx[ 0 ] - ( S4*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\txbuf[ ix ] = fcn();\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t}\n\t\t\t\tix += dx3;\n\t\t\t}\n\t\t\tix += dx4;\n\t\t}\n\t\tix += dx5;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary6d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* nullary7d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction nullary7d( x, fcn ) {\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 6 ];\n\t\tS1 = sh[ 5 ];\n\t\tS2 = sh[ 4 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 2 ];\n\t\tS5 = sh[ 1 ];\n\t\tS6 = sh[ 0 ];\n\t\tdx0 = sx[ 6 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 5 ] - ( S0*sx[6] );\n\t\tdx2 = sx[ 4 ] - ( S1*sx[5] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[4] );\n\t\tdx4 = sx[ 2 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 1 ] - ( S4*sx[2] );\n\t\tdx6 = sx[ 0 ] - ( S5*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\txbuf[ ix ] = fcn();\n\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx3;\n\t\t\t\t}\n\t\t\t\tix += dx4;\n\t\t\t}\n\t\t\tix += dx5;\n\t\t}\n\t\tix += dx6;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary7d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* nullary8d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction nullary8d( x, fcn ) {\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 7 ];\n\t\tS1 = sh[ 6 ];\n\t\tS2 = sh[ 5 ];\n\t\tS3 = sh[ 4 ];\n\t\tS4 = sh[ 3 ];\n\t\tS5 = sh[ 2 ];\n\t\tS6 = sh[ 1 ];\n\t\tS7 = sh[ 0 ];\n\t\tdx0 = sx[ 7 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 6 ] - ( S0*sx[7] );\n\t\tdx2 = sx[ 5 ] - ( S1*sx[6] );\n\t\tdx3 = sx[ 4 ] - ( S2*sx[5] );\n\t\tdx4 = sx[ 3 ] - ( S3*sx[4] );\n\t\tdx5 = sx[ 2 ] - ( S4*sx[3] );\n\t\tdx6 = sx[ 1 ] - ( S5*sx[2] );\n\t\tdx7 = sx[ 0 ] - ( S6*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\txbuf[ ix ] = fcn();\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx4;\n\t\t\t\t}\n\t\t\t\tix += dx5;\n\t\t\t}\n\t\t\tix += dx6;\n\t\t}\n\t\tix += dx7;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary8d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* nullary9d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction nullary9d( x, fcn ) {\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 8 ];\n\t\tS1 = sh[ 7 ];\n\t\tS2 = sh[ 6 ];\n\t\tS3 = sh[ 5 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 3 ];\n\t\tS6 = sh[ 2 ];\n\t\tS7 = sh[ 1 ];\n\t\tS8 = sh[ 0 ];\n\t\tdx0 = sx[ 8 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 7 ] - ( S0*sx[8] );\n\t\tdx2 = sx[ 6 ] - ( S1*sx[7] );\n\t\tdx3 = sx[ 5 ] - ( S2*sx[6] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[5] );\n\t\tdx5 = sx[ 3 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 2 ] - ( S5*sx[3] );\n\t\tdx7 = sx[ 1 ] - ( S6*sx[2] );\n\t\tdx8 = sx[ 0 ] - ( S7*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\txbuf[ ix ] = fcn();\n\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx5;\n\t\t\t\t}\n\t\t\t\tix += dx6;\n\t\t\t}\n\t\t\tix += dx7;\n\t\t}\n\t\tix += dx8;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary9d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* nullary10d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction nullary10d( x, fcn ) {\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar S9;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 9 ];\n\t\tS1 = sh[ 8 ];\n\t\tS2 = sh[ 7 ];\n\t\tS3 = sh[ 6 ];\n\t\tS4 = sh[ 5 ];\n\t\tS5 = sh[ 4 ];\n\t\tS6 = sh[ 3 ];\n\t\tS7 = sh[ 2 ];\n\t\tS8 = sh[ 1 ];\n\t\tS9 = sh[ 0 ];\n\t\tdx0 = sx[ 9 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 8 ] - ( S0*sx[9] );\n\t\tdx2 = sx[ 7 ] - ( S1*sx[8] );\n\t\tdx3 = sx[ 6 ] - ( S2*sx[7] );\n\t\tdx4 = sx[ 5 ] - ( S3*sx[6] );\n\t\tdx5 = sx[ 4 ] - ( S4*sx[5] );\n\t\tdx6 = sx[ 3 ] - ( S5*sx[4] );\n\t\tdx7 = sx[ 2 ] - ( S6*sx[3] );\n\t\tdx8 = sx[ 1 ] - ( S7*sx[2] );\n\t\tdx9 = sx[ 0 ] - ( S8*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tS9 = sh[ 9 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] );\n\t\tdx9 = sx[ 9 ] - ( S8*sx[8] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i9 = 0; i9 < S9; i9++ ) {\n\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\txbuf[ ix ] = fcn();\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx6;\n\t\t\t\t}\n\t\t\t\tix += dx7;\n\t\t\t}\n\t\t\tix += dx8;\n\t\t}\n\t\tix += dx9;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary10d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar numel = require( './../../../base/numel' );\nvar vind2bind = require( './../../../base/vind2bind' );\n\n\n// VARIABLES //\n\nvar MODE = 'throw';\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* nullarynd( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction nullarynd( x, fcn ) {\n\tvar xbuf;\n\tvar ordx;\n\tvar len;\n\tvar sh;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i;\n\n\tsh = x.shape;\n\n\t// Compute the total number of elements over which to iterate:\n\tlen = numel( sh );\n\n\t// Cache a reference to the output ndarray data buffer:\n\txbuf = x.data;\n\n\t// Cache a reference to the stride array:\n\tsx = x.strides;\n\n\t// Cache the index of the first indexed element:\n\tox = x.offset;\n\n\t// Cache the array order:\n\tordx = x.order;\n\n\t// Iterate over each element based on the linear **view** index, regardless as to how the data is stored in memory...\n\tfor ( i = 0; i < len; i++ ) {\n\t\tix = vind2bind( sh, sx, ox, ordx, i, MODE );\n\t\txbuf[ ix ] = fcn();\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullarynd;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar iterationOrder = require( './../../../base/iteration-order' );\nvar minmaxViewBufferIndex = require( './../../../base/minmax-view-buffer-index' );\nvar ndarray2object = require( './../../../base/ndarraylike2object' );\nvar blockedaccessornullary2d = require( './2d_blocked_accessors.js' );\nvar blockedaccessornullary3d = require( './3d_blocked_accessors.js' );\nvar blockedaccessornullary4d = require( './4d_blocked_accessors.js' );\nvar blockedaccessornullary5d = require( './5d_blocked_accessors.js' );\nvar blockedaccessornullary6d = require( './6d_blocked_accessors.js' );\nvar blockedaccessornullary7d = require( './7d_blocked_accessors.js' );\nvar blockedaccessornullary8d = require( './8d_blocked_accessors.js' );\nvar blockedaccessornullary9d = require( './9d_blocked_accessors.js' );\nvar blockedaccessornullary10d = require( './10d_blocked_accessors.js' );\nvar blockednullary2d = require( './2d_blocked.js' );\nvar blockednullary3d = require( './3d_blocked.js' );\nvar blockednullary4d = require( './4d_blocked.js' );\nvar blockednullary5d = require( './5d_blocked.js' );\nvar blockednullary6d = require( './6d_blocked.js' );\nvar blockednullary7d = require( './7d_blocked.js' );\nvar blockednullary8d = require( './8d_blocked.js' );\nvar blockednullary9d = require( './9d_blocked.js' );\nvar blockednullary10d = require( './10d_blocked.js' );\nvar accessornullary0d = require( './0d_accessors.js' );\nvar accessornullary1d = require( './1d_accessors.js' );\nvar accessornullary2d = require( './2d_accessors.js' );\nvar accessornullary3d = require( './3d_accessors.js' );\nvar accessornullary4d = require( './4d_accessors.js' );\nvar accessornullary5d = require( './5d_accessors.js' );\nvar accessornullary6d = require( './6d_accessors.js' );\nvar accessornullary7d = require( './7d_accessors.js' );\nvar accessornullary8d = require( './8d_accessors.js' );\nvar accessornullary9d = require( './9d_accessors.js' );\nvar accessornullary10d = require( './10d_accessors.js' );\nvar accessornullarynd = require( './nd_accessors.js' );\nvar nullary0d = require( './0d.js' );\nvar nullary1d = require( './1d.js' );\nvar nullary2d = require( './2d.js' );\nvar nullary3d = require( './3d.js' );\nvar nullary4d = require( './4d.js' );\nvar nullary5d = require( './5d.js' );\nvar nullary6d = require( './6d.js' );\nvar nullary7d = require( './7d.js' );\nvar nullary8d = require( './8d.js' );\nvar nullary9d = require( './9d.js' );\nvar nullary10d = require( './10d.js' );\nvar nullarynd = require( './nd.js' );\n\n\n// VARIABLES //\n\nvar NULLARY = [\n\tnullary0d,\n\tnullary1d,\n\tnullary2d,\n\tnullary3d,\n\tnullary4d,\n\tnullary5d,\n\tnullary6d,\n\tnullary7d,\n\tnullary8d,\n\tnullary9d,\n\tnullary10d\n];\nvar ACCESSOR_NULLARY = [\n\taccessornullary0d,\n\taccessornullary1d,\n\taccessornullary2d,\n\taccessornullary3d,\n\taccessornullary4d,\n\taccessornullary5d,\n\taccessornullary6d,\n\taccessornullary7d,\n\taccessornullary8d,\n\taccessornullary9d,\n\taccessornullary10d\n];\nvar BLOCKED_NULLARY = [\n\tblockednullary2d, // 0\n\tblockednullary3d,\n\tblockednullary4d,\n\tblockednullary5d,\n\tblockednullary6d,\n\tblockednullary7d,\n\tblockednullary8d,\n\tblockednullary9d,\n\tblockednullary10d // 8\n];\nvar BLOCKED_ACCESSOR_NULLARY = [\n\tblockedaccessornullary2d, // 0\n\tblockedaccessornullary3d,\n\tblockedaccessornullary4d,\n\tblockedaccessornullary5d,\n\tblockedaccessornullary6d,\n\tblockedaccessornullary7d,\n\tblockedaccessornullary8d,\n\tblockedaccessornullary9d,\n\tblockedaccessornullary10d // 8\n];\nvar MAX_DIMS = NULLARY.length - 1;\n\n\n// MAIN //\n\n/**\n* Applies a nullary function and assigns results to elements in an output ndarray.\n*\n* ## Notes\n*\n* - A provided ndarray should be an `object` with the following properties:\n*\n* - **dtype**: data type.\n* - **data**: data buffer.\n* - **shape**: dimensions.\n* - **strides**: stride lengths.\n* - **offset**: index offset.\n* - **order**: specifies whether an ndarray is row-major (C-style) or column major (Fortran-style).\n*\n* @param {ArrayLikeObject} arrays - array-like object containing one output array\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the ioutput ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* nullary( [ x ], fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction nullary( arrays, fcn ) {\n\tvar ndims;\n\tvar xmmv;\n\tvar shx;\n\tvar iox;\n\tvar len;\n\tvar sx;\n\tvar ox;\n\tvar ns;\n\tvar x;\n\tvar d;\n\tvar i;\n\n\t// Unpack the ndarray and standardize ndarray meta data:\n\tx = ndarray2object( arrays[ 0 ] );\n\tshx = x.shape;\n\tndims = shx.length;\n\n\t// Determine whether we can avoid iteration altogether...\n\tif ( ndims === 0 ) {\n\t\tif ( x.accessorProtocol ) {\n\t\t\treturn ACCESSOR_NULLARY[ ndims ]( x, fcn );\n\t\t}\n\t\treturn NULLARY[ ndims ]( x, fcn );\n\t}\n\t// Compute the number of elements and the number of singleton dimensions...\n\tlen = 1; // number of elements\n\tns = 0; // number of singleton dimensions\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\td = shx[ i ];\n\n\t\t// Note that, if one of the dimensions is `0`, the length will be `0`...\n\t\tlen *= d;\n\n\t\t// Check whether the current dimension is a singleton dimension...\n\t\tif ( d === 1 ) {\n\t\t\tns += 1;\n\t\t}\n\t}\n\t// Check whether we were provided an empty ndarray...\n\tif ( len === 0 ) {\n\t\treturn;\n\t}\n\t// Determine whether the ndarray is one-dimensional and thus readily translates to a one-dimensional strided array...\n\tif ( ndims === 1 ) {\n\t\tif ( x.accessorProtocol ) {\n\t\t\treturn ACCESSOR_NULLARY[ ndims ]( x, fcn );\n\t\t}\n\t\treturn NULLARY[ ndims ]( x, fcn );\n\t}\n\tsx = x.strides;\n\n\t// Determine whether the ndarray has only **one** non-singleton dimension (e.g., ndims=4, shape=[10,1,1,1]) so that we can treat an ndarray as being equivalent to a one-dimensional strided array...\n\tif ( ns === ndims-1 ) {\n\t\t// Get the index of the non-singleton dimension...\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\tif ( shx[ i ] !== 1 ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tx.shape = [ shx[i] ];\n\t\tx.strides = [ sx[i] ];\n\t\tif ( x.accessorProtocol ) {\n\t\t\treturn ACCESSOR_NULLARY[ 1 ]( x, fcn );\n\t\t}\n\t\treturn NULLARY[ 1 ]( x, fcn );\n\t}\n\tiox = iterationOrder( sx ); // +/-1\n\n\t// Determine whether we can avoid blocked iteration...\n\tif ( iox !== 0 ) {\n\t\t// Determine the minimum and maximum linear indices which are accessible by the array view:\n\t\txmmv = minmaxViewBufferIndex( shx, sx, x.offset );\n\n\t\t// Determine whether we can ignore shape (and strides) and treat the ndarray as a linear one-dimensional strided array...\n\t\tif ( len === ( xmmv[1]-xmmv[0]+1 ) ) {\n\t\t\t// Note: the above is equivalent to @stdlib/ndarray/base/assert/is-contiguous, but in-lined so we can retain computed values...\n\t\t\tif ( iox === 1 ) {\n\t\t\t\tox = xmmv[ 0 ];\n\t\t\t} else {\n\t\t\t\tox = xmmv[ 1 ];\n\t\t\t}\n\t\t\tx.shape = [ len ];\n\t\t\tx.strides = [ iox ];\n\t\t\tx.offset = ox;\n\t\t\tif ( x.accessorProtocol ) {\n\t\t\t\treturn ACCESSOR_NULLARY[ 1 ]( x, fcn );\n\t\t\t}\n\t\t\treturn NULLARY[ 1 ]( x, fcn );\n\t\t}\n\t\t// The ndarray is non-contiguous, so we cannot directly use one-dimensional array functionality...\n\n\t\t// Determine whether we can use simple nested loops...\n\t\tif ( ndims <= MAX_DIMS ) {\n\t\t\t// So long as iteration always moves in the same direction (i.e., no mixed sign strides), we can leverage cache-optimal (i.e., normal) nested loops without resorting to blocked iteration...\n\t\t\tif ( x.accessorProtocol ) {\n\t\t\t\treturn ACCESSOR_NULLARY[ ndims ]( x, fcn );\n\t\t\t}\n\t\t\treturn NULLARY[ ndims ]( x, fcn );\n\t\t}\n\t\t// Fall-through to blocked iteration...\n\t}\n\t// At this point, we're either dealing with a non-contiguous n-dimensional array or a high dimensional n-dimensional array, so our only hope is that we can still perform blocked iteration...\n\n\t// Determine whether we can perform blocked iteration...\n\tif ( ndims <= MAX_DIMS ) {\n\t\tif ( x.accessorProtocol ) {\n\t\t\treturn BLOCKED_ACCESSOR_NULLARY[ ndims-2 ]( x, fcn );\n\t\t}\n\t\treturn BLOCKED_NULLARY[ ndims-2 ]( x, fcn );\n\t}\n\t// Fall-through to linear view iteration without regard for how data is stored in memory (i.e., take the slow path)...\n\tif ( x.accessorProtocol ) {\n\t\treturn accessornullarynd( x, fcn );\n\t}\n\tnullarynd( x, fcn );\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Apply a nullary function and assign results to elements in an output ndarray.\n*\n* @module @stdlib/ndarray/base/nullary\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var nullary = require( '@stdlib/ndarray/base/nullary' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the ioutput ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* nullary( [ x ], fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "[\n \"same\",\n \"promoted\",\n \"bool\",\n\t\"signed_integer\",\n \"unsigned_integer\",\n \"integer\",\n \"floating_point\",\n \"real_floating_point\",\n \"complex_floating_point\",\n \"real\",\n \"numeric\",\n \"default\"\n]\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar POLICIES = require( './policies.json' );\n\n\n// MAIN //\n\n/**\n* Returns a list of output ndarray data type policies.\n*\n* @returns {StringArray} list of ndarray data type policies\n*\n* @example\n* var list = policies();\n* // returns [...]\n*/\nfunction policies() {\n\treturn POLICIES.slice();\n}\n\n\n// EXPORTS //\n\nmodule.exports = policies;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an object mapping supported data type policy strings to enumeration constants.\n*\n* ## Notes\n*\n* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `SAME == 0`). Instead, the object should be used in an opaque manner.\n* - The main purpose of this function is JavaScript and C inter-operation of ndarray objects.\n*\n* @private\n* @returns {Object} object mapping supported dtype policies to enumeration constants\n*\n* @example\n* var table = enumeration();\n* // returns \n*/\nfunction enumeration() {\n\t// NOTE: the following should match the C `output_dtype_policies.h` enumeration!!!!\n\treturn {\n\t\t'same': 0,\n\t\t'promoted': 1,\n\t\t'bool': 2,\n\t\t'signed_integer': 3,\n\t\t'unsigned_integer': 4,\n\t\t'integer': 5,\n\t\t'floating_point': 6,\n\t\t'real_floating_point': 7,\n\t\t'complex_floating_point': 8,\n\t\t'real': 9,\n\t\t'numeric': 10,\n\t\t'default': 11\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = enumeration;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-read-only-property' );\nvar objectKeys = require( '@stdlib/utils/keys' );\n\n\n// MAIN //\n\n/**\n* Copies all enumerable own properties from a source object to a target object as enumerable read-only properties.\n*\n* @private\n* @param {Object} target - target object\n* @param {Object} source - source object\n* @returns {Object} modified target object\n*\n* @example\n* var source = {\n* 'beep': 'boop'\n* };\n* var target = {};\n*\n* var out = assign( target, source );\n* // returns \n*\n* var bool = ( out === target );\n* // returns true\n*\n* var v = target.beep;\n* // returns 'boop'\n*/\nfunction assign( target, source ) {\n\tvar keys;\n\tvar k;\n\tvar i;\n\n\tkeys = objectKeys( source );\n\tfor ( i = 0; i < keys.length; i++ ) {\n\t\tk = keys[ i ];\n\t\tsetReadOnly( target, k, source[ k ] );\n\t}\n\treturn target;\n}\n\n\n// EXPORTS //\n\nmodule.exports = assign;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a list of output ndarray data type policies.\n*\n* @module @stdlib/ndarray/output-dtype-policies\n*\n* @example\n* var policies = require( '@stdlib/ndarray/output-dtype-policies' );\n*\n* var list = policies();\n* // returns [...]\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar enumeration = require( './enum.js' );\nvar assign = require( './assign.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'enum', enumeration );\nassign( main, enumeration() );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar objectInverse = require( '@stdlib/utils/object-inverse' );\nvar enumeration = require( './../../../output-dtype-policies' ).enum;\n\n\n// VARIABLES //\n\nvar hash = objectInverse( enumeration(), {\n\t'duplicates': false\n});\n\n\n// MAIN //\n\n/**\n* Returns the policy string associated with an output ndarray data type policy enumeration constant.\n*\n* @param {integer} policy - policy enumeration constant\n* @returns {(string|null)} policy string or null\n*\n* @example\n* var str2enum = require( '@stdlib/ndarray/base/output-policy-str2enum' );\n*\n* var v = str2enum( 'same' );\n* // returns \n*\n* var policy = enum2str( v );\n* // returns 'same'\n*/\nfunction enum2str( policy ) {\n\tvar v = hash[ policy ];\n\treturn ( typeof v === 'string' ) ? v : null; // note: we include this guard to prevent walking the prototype chain\n}\n\n\n// EXPORTS //\n\nmodule.exports = enum2str;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the policy string associated with an output ndarray data type policy enumeration constant.\n*\n* @module @stdlib/ndarray/base/output-policy-enum2str\n*\n* @example\n* var str2enum = require( '@stdlib/ndarray/base/output-policy-str2enum' );\n* var enum2str = require( '@stdlib/ndarray/base/output-policy-enum2str' );\n*\n* var v = str2enum( 'same' );\n* // returns \n*\n* var policy = enum2str( v );\n* // returns 'same'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar enumeration = require( './../../../output-dtype-policies' ).enum;\n\n\n// VARIABLES //\n\nvar ENUM = enumeration();\n\n\n// MAIN //\n\n/**\n* Returns the enumeration constant associated with an output ndarray data type policy string.\n*\n* ## Notes\n*\n* - Downstream consumers of this function should **not** rely on specific integer values (e.g., `SAME == 0`). Instead, the function should be used in an opaque manner.\n*\n* @param {string} policy - policy string\n* @returns {(integer|null)} integer value or null\n*\n* @example\n* var v = str2enum( 'same' );\n* // returns \n*/\nfunction str2enum( policy ) {\n\tvar v = ENUM[ policy ];\n\treturn ( typeof v === 'number' ) ? v : null; // note: we include this guard to prevent walking the prototype chain\n}\n\n\n// EXPORTS //\n\nmodule.exports = str2enum;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the enumeration constant associated with an output ndarray data type policy string.\n*\n* @module @stdlib/ndarray/base/output-policy-str2enum\n*\n* @example\n* var str2enum = require( '@stdlib/ndarray/base/output-policy-str2enum' );\n*\n* var v = str2enum( 'same' );\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar enum2str = require( './../../../base/output-policy-enum2str' );\nvar str2enum = require( './../../../base/output-policy-str2enum' );\n\n\n// MAIN //\n\n/**\n* Returns the enumeration constant associated with a supported ndarray data type policy value.\n*\n* ## Notes\n*\n* - Downstream consumers of this function should **not** rely on specific integer values (e.g., `SAME == 0`). Instead, the function should be used in an opaque manner.\n*\n* @param {*} policy - policy value\n* @returns {(integer|null)} enumeration constant or null\n*\n* @example\n* var v = resolve( 'same' );\n* // returns \n*/\nfunction resolve( policy ) {\n\tvar t = ( typeof policy );\n\tif ( t === 'number' ) {\n\t\treturn ( enum2str( policy ) ) ? policy : null;\n\t}\n\tif ( t === 'string' ) {\n\t\treturn str2enum( policy );\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = resolve;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the enumeration constant associated with a supported ndarray data type policy value.\n*\n* @module @stdlib/ndarray/base/output-policy-resolve-enum\n*\n* @example\n* var resolve = require( '@stdlib/ndarray/base/output-policy-resolve-enum' );\n*\n* var v = resolve( 'same' );\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar enum2str = require( './../../../base/output-policy-enum2str' );\nvar str2enum = require( './../../../base/output-policy-str2enum' );\n\n\n// MAIN //\n\n/**\n* Returns the policy string associated with a supported ndarray data type policy value.\n*\n* @param {*} policy - policy value\n* @returns {(string|null)} policy string or null\n*\n* @example\n* var str2enum = require( '@stdlib/ndarray/base/output-policy-str2enum' );\n*\n* var v = resolve( str2enum( 'same' ) );\n* // returns 'same'\n*/\nfunction resolve( policy ) {\n\tvar t = ( typeof policy );\n\tif ( t === 'string' ) {\n\t\treturn ( str2enum( policy ) === null ) ? null : policy;\n\t}\n\tif ( t === 'number' ) {\n\t\treturn enum2str( policy );\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = resolve;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the policy string associated with a supported ndarray data type policy value.\n*\n* @module @stdlib/ndarray/base/output-policy-resolve-str\n*\n* @example\n* var str2enum = require( '@stdlib/ndarray/base/output-policy-str2enum' );\n* var resolve = require( '@stdlib/ndarray/base/output-policy-resolve-str' );\n*\n* var v = resolve( str2enum( 'same' ) );\n* // returns 'same'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isReadOnly = require( './../../../base/assert/is-read-only' );\nvar getDType = require( './../../../base/dtype' );\nvar getShape = require( './../../../base/shape' );\nvar getStrides = require( './../../../base/strides' );\nvar getOffset = require( './../../../base/offset' );\nvar getOrder = require( './../../../base/order' );\nvar getData = require( './../../../base/data-buffer' );\n\n\n// MAIN //\n\n/**\n* Returns an array with a specified number of prepended singleton dimensions.\n*\n* @param {ndarray} x - input array\n* @param {NonNegativeInteger} n - number of singleton dimensions to prepend\n* @returns {ndarray} output array\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var shx = x.shape;\n* // returns [ 2, 2 ]\n*\n* var y = prependSingletonDimensions( x, 3 );\n* // returns \n*\n* var shy = y.shape;\n* // returns [ 1, 1, 1, 2, 2 ]\n*\n* var v = y.get( 0, 0, 0, 0, 0 );\n* // returns 1\n*\n* v = y.get( 0, 0, 0, 0, 1 );\n* // returns 2\n*\n* v = y.get( 0, 0, 0, 1, 0 );\n* // returns 3\n*\n* v = y.get( 0, 0, 0, 1, 1 );\n* // returns 4\n*/\nfunction prependSingletonDimensions( x, n ) { // eslint-disable-line id-length\n\tvar strides;\n\tvar shape;\n\tvar sh;\n\tvar st;\n\tvar N;\n\tvar i;\n\n\tsh = getShape( x, false );\n\tst = getStrides( x, false );\n\tN = sh.length;\n\n\tstrides = [];\n\tshape = [];\n\n\t// Prepend singleton dimensions...\n\tfor ( i = 0; i < n; i++ ) {\n\t\tshape.push( 1 );\n\t\tstrides.push( st[ 0 ] );\n\t}\n\t// Copy remaining dimensions...\n\tfor ( i = 0; i < N; i++ ) {\n\t\tshape.push( sh[ i ] );\n\t\tstrides.push( st[ i ] );\n\t}\n\tif ( isReadOnly( x ) ) {\n\t\t// If provided a read-only view, the returned array should also be read-only...\n\t\treturn new x.constructor( getDType( x ), getData( x ), shape, strides, getOffset( x ), getOrder( x ), { // eslint-disable-line max-len\n\t\t\t'readonly': true\n\t\t});\n\t}\n\treturn new x.constructor( getDType( x ), getData( x ), shape, strides, getOffset( x ), getOrder( x ) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = prependSingletonDimensions;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Prepend singleton dimensions.\n*\n* @module @stdlib/ndarray/base/prepend-singleton-dimensions\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var prependSingletonDimensions = require( '@stdlib/ndarray/base/prepend-singleton-dimensions' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var shx = x.shape;\n* // returns [ 2, 2 ]\n*\n* var y = prependSingletonDimensions( x, 3 );\n* // returns \n*\n* var shy = y.shape;\n* // returns [ 1, 1, 1, 2, 2 ]\n*\n* var v = y.get( 0, 0, 0, 0, 0 );\n* // returns 1\n*\n* v = y.get( 0, 0, 0, 0, 1 );\n* // returns 2\n*\n* v = y.get( 0, 0, 0, 1, 0 );\n* // returns 3\n*\n* v = y.get( 0, 0, 0, 1, 1 );\n* // returns 4\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isReadOnly = require( './../../../base/assert/is-read-only' );\nvar getDType = require( './../../../base/dtype' );\nvar getShape = require( './../../../base/shape' );\nvar getStrides = require( './../../../base/strides' );\nvar getOffset = require( './../../../base/offset' );\nvar getOrder = require( './../../../base/order' );\nvar getData = require( './../../../base/data-buffer' );\n\n\n// MAIN //\n\n/**\n* Returns an array without singleton dimensions.\n*\n* ## Notes\n*\n* - If a provided ndarray does not have any singleton dimensions, the function returns the provided ndarray unchanged.\n* - If a provided ndarray does have singleton dimensions, the function returns a new ndarray view.\n*\n* @param {ndarray} x - input array\n* @returns {ndarray} squeezed array\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ], {\n* 'ndmin': 5\n* });\n* // returns \n*\n* var shx = x.shape;\n* // returns [ 1, 1, 1, 2, 2 ]\n*\n* var y = removeSingletonDimensions( x );\n* // returns \n*\n* var shy = y.shape;\n* // returns [ 2, 2 ]\n*\n* var v = y.get( 0, 0 );\n* // returns 1\n*\n* v = y.get( 0, 1 );\n* // returns 2\n*\n* v = y.get( 1, 0 );\n* // returns 3\n*\n* v = y.get( 1, 1 );\n* // returns 4\n*/\nfunction removeSingletonDimensions( x ) {\n\tvar strides;\n\tvar shape;\n\tvar sh;\n\tvar st;\n\tvar N;\n\tvar i;\n\n\tsh = getShape( x, false );\n\tst = getStrides( x, false );\n\tN = sh.length;\n\n\tstrides = [];\n\tshape = [];\n\n\t// Check for singleton dimensions...\n\tfor ( i = 0; i < N; i++ ) {\n\t\tif ( sh[ i ] !== 1 ) {\n\t\t\tshape.push( sh[ i ] );\n\t\t\tstrides.push( st[ i ] );\n\t\t}\n\t}\n\tif ( shape.length === N ) {\n\t\t// We did not find any singleton dimensions...\n\t\treturn x;\n\t}\n\tif ( isReadOnly( x ) ) {\n\t\t// If provided a read-only view, the returned array should also be read-only...\n\t\treturn new x.constructor( getDType( x ), getData( x ), shape, strides, getOffset( x ), getOrder( x ), { // eslint-disable-line max-len\n\t\t\t'readonly': true\n\t\t});\n\t}\n\treturn new x.constructor( getDType( x ), getData( x ), shape, strides, getOffset( x ), getOrder( x ) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = removeSingletonDimensions;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Remove singleton dimensions.\n*\n* @module @stdlib/ndarray/base/remove-singleton-dimensions\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var removeSingletonDimensions = require( '@stdlib/ndarray/base/remove-singleton-dimensions' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ], {\n* 'ndmin': 5\n* });\n* // returns \n*\n* var shx = x.shape;\n* // returns [ 1, 1, 1, 2, 2 ]\n*\n* var y = removeSingletonDimensions( x );\n* // returns \n*\n* var shy = y.shape;\n* // returns [ 2, 2 ]\n*\n* var v = y.get( 0, 0 );\n* // returns 1\n*\n* v = y.get( 0, 1 );\n* // returns 2\n*\n* v = y.get( 1, 0 );\n* // returns 3\n*\n* v = y.get( 1, 1 );\n* // returns 4\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar IS_LITTLE_ENDIAN = require( '@stdlib/assert/is-little-endian' );\nvar ArrayBuffer = require( '@stdlib/array/buffer' );\nvar DataView = require( '@stdlib/array/dataview' );\nvar BigInt = require( '@stdlib/bigint/ctor' );\nvar bytesPerElement = require( './../../../base/bytes-per-element' );\nvar dtypes = require( './../../../dtypes' ).enum;\nvar orders = require( './../../../orders' ).enum;\nvar modes = require( './../../../index-modes' ).enum;\nvar getDType = require( './../../../base/dtype' );\nvar getShape = require( './../../../base/shape' );\nvar getStrides = require( './../../../base/strides' );\nvar getOffset = require( './../../../base/offset' );\nvar getOrder = require( './../../../base/order' );\n\n\n// VARIABLES //\n\nvar DTYPES = dtypes();\nvar ORDERS = orders();\nvar MODES = modes();\n\n\n// MAIN //\n\n/**\n* Serializes ndarray meta data.\n*\n* ## Notes\n*\n* - This function takes into account ndarray-like objects which may support index modes.\n*\n* - Serialization is performed according to host byte order (endianness).\n*\n* - Meta data format:\n*\n* ```text\n* | endianness (1 byte) | (2 bytes) | (8 bytes) | (ndims*8 bytes) | (ndims*8 bytes) | (8 bytes) | (1 byte) | (1 byte) | (8 bytes) | (nsubmodes*1 bytes) | (4 bytes) |\n* ```\n*\n* which translates to the following `ArrayBuffer` layout:\n*\n* ```text\n* ArrayBuffer[\n* [int8],\n* [int16],\n* [int64],\n* [ndims*int64],\n* [ndims*int64],\n* [int64],\n* [int8],\n* [int8],\n* [int64],\n* [nsubmodes*int8],\n* [int32]\n* ]\n* ```\n*\n* where `strides` and `offset` are in units of bytes.\n*\n* - If the endianness is `1`, the byte order is little endian. If the endianness is `0`, the byte order is big endian.\n*\n* - Buffer length:\n*\n* ```text\n* 1 + 2 + 8 + (ndims*8) + (ndims*8) + 8 + 1 + 1 + 8 + (nsubmodes*1) + 4 = 33 + (ndims*16) + nsubmodes\n* ```\n*\n* For example, consider a three-dimensional ndarray with one subscript index mode (submode):\n*\n* ```text\n* 33 + (3*16) + 1 = 82 bytes\n* ```\n*\n* - Views:\n*\n* - endianness: `Int8Array( buf, 0, 1 )`\n* - dtype: `Int16Array( buf, 1, 1 )`\n* - ndims: `Int64Array( buf, 3, 1 )`\n* - shape: `Int64Array( buf, 11, ndims )`\n* - strides: `Int64Array( buf, 11+(ndims*8), ndims )`\n* - offset: `Int64Array( buf, 11+(ndims*16), 1 )`\n* - order: `Int8Array( buf, 19+(ndims*16), 1 )`\n* - mode: `Int8Array( buf, 20+(ndims*16), 1 )`\n* - nsubmodes: `Int64Array( buf, 21+(ndims*16), 1 )`\n* - submodes: `Int8Array( buf, 29+(ndims*16), nsubmodes )`\n* - flags: `Int32Array( buf, 29+(ndims*16)+nsubmodes, 1 )`\n*\n* @param {ndarrayLike} x - input array\n* @param {string} x.dtype - array data type\n* @param {NonNegativeIntegerArray} x.shape - array shape\n* @param {IntegerArray} x.strides - array strides\n* @param {NonNegativeInteger} x.offset - array index offset\n* @param {string} x.order - array order\n* @param {string} [x.mode='throw'] - array index mode\n* @param {StringArray} [x.submode=[x.mode]] - array subscript index modes\n* @param {Object} [x.flags={}] - array flags\n* @returns {DataView} serialized meta data\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n*\n* var dv = serialize( x );\n* // returns \n*/\nfunction serialize( x ) {\n\tvar nbytes;\n\tvar flgs;\n\tvar len;\n\tvar dt;\n\tvar sh;\n\tvar st;\n\tvar sm;\n\tvar v;\n\tvar m;\n\tvar o;\n\tvar s;\n\tvar N;\n\tvar M;\n\tvar i;\n\n\t// Check for interface which does the work of serializing to a DataView for us...\n\tif ( x.__array_meta_dataview__ ) { // eslint-disable-line no-underscore-dangle\n\t\treturn x.__array_meta_dataview__(); // eslint-disable-line no-underscore-dangle\n\t}\n\t// Extract meta data known to be attached to ndarray-like objects:\n\tdt = getDType( x );\n\tsh = getShape( x, false );\n\tst = getStrides( x, false );\n\tN = sh.length; // ndims\n\n\t// Extract meta data which may be available on ndarray-like objects (e.g., stdlib ndarray instances):\n\tm = x.mode || 'throw';\n\tsm = x.submode || [ m ];\n\tM = sm.length;\n\n\t// Determine number of bytes per element according to the ndarray dtype:\n\tnbytes = bytesPerElement( dt );\n\n\t// Compute the amount of memory we need to allocate for storing meta data:\n\tlen = 33 + (N*16) + M;\n\n\t// Allocate raw memory and create a view for interfacing with the allocated memory:\n\tv = new DataView( new ArrayBuffer( len ) );\n\n\t// Endianness: (byteoffset: 0; bytelength: 1)\n\to = 0;\n\tv.setInt8( o, ( IS_LITTLE_ENDIAN ) ? 1 : 0 );\n\n\t// Data type: (byteoffset: 1; bytelength: 2)\n\to += 1;\n\tv.setInt16( o, DTYPES[ dt ], IS_LITTLE_ENDIAN );\n\n\t// Number of dimensions: (byteoffset: 3; bytelength: 8)\n\to += 2;\n\tv.setBigInt64( o, BigInt( N ), IS_LITTLE_ENDIAN );\n\n\t// Shape and strides: (byteoffset: 11 and 11+(ndims*8), respectively; bytelength: ndims*8 for both shape and strides, and, thus, ndims*16 total)\n\ts = N * 8; // stride length between a dimension (shape[i]) and its associated stride\n\to += 8;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv.setBigInt64( o, BigInt( sh[i] ), IS_LITTLE_ENDIAN );\n\t\tv.setBigInt64( o+s, BigInt( st[i]*nbytes ), IS_LITTLE_ENDIAN );\n\t\to += 8;\n\t}\n\t// Offset: (byteoffset: 11+(ndims*16); bytelength: 8)\n\to += s;\n\tv.setBigInt64( o, BigInt( getOffset( x )*nbytes ), IS_LITTLE_ENDIAN );\n\n\t// Order: (byteoffset: 19+(ndims*16); bytelength: 1)\n\to += 8;\n\tv.setInt8( o, ORDERS[ getOrder( x ) ] );\n\n\t// Index mode: (byteoffset: 20+(ndims*16); bytelength: 1)\n\to += 1;\n\tv.setInt8( o, MODES[ m ] );\n\n\t// Number of index submodes: (byteoffset: 21+(ndims*16); bytelength: 8)\n\to += 1;\n\tv.setBigInt64( o, BigInt( M ), IS_LITTLE_ENDIAN );\n\n\t// Submodes: (byteoffset: 29+(ndims*16); bytelength: nsubmodes*1)\n\to += 8;\n\tfor ( i = 0; i < M; i++ ) {\n\t\tv.setInt8( o, MODES[ sm[i] ] );\n\t\to += 1;\n\t}\n\t// Flags: (byteoffset: 29+(ndims*16)+nsubmodes; bytelength: 4)\n\tflgs = 0|0;\n\tif ( x.flags ) {\n\t\tflgs |= ( x.flags.READONLY ) ? 4 : 0; // 00000000 00000000 00000000 00000100\n\t}\n\tv.setInt32( o, flgs, IS_LITTLE_ENDIAN );\n\n\treturn v;\n}\n\n\n// EXPORTS //\n\nmodule.exports = serialize;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar IS_LITTLE_ENDIAN = require( '@stdlib/assert/is-little-endian' );\nvar float64ToInt64Bytes = require( '@stdlib/number/float64/base/to-int64-bytes' ).assign;\nvar ArrayBuffer = require( '@stdlib/array/buffer' );\nvar Uint8Array = require( '@stdlib/array/uint8' );\nvar DataView = require( '@stdlib/array/dataview' );\nvar bytesPerElement = require( './../../../base/bytes-per-element' );\nvar dtypes = require( './../../../dtypes' ).enum;\nvar orders = require( './../../../orders' ).enum;\nvar modes = require( './../../../index-modes' ).enum;\nvar getDType = require( './../../../base/dtype' );\nvar getShape = require( './../../../base/shape' );\nvar getStrides = require( './../../../base/strides' );\nvar getOffset = require( './../../../base/offset' );\nvar getOrder = require( './../../../base/order' );\n\n\n// VARIABLES //\n\nvar DTYPES = dtypes();\nvar ORDERS = orders();\nvar MODES = modes();\n\n\n// MAIN //\n\n/**\n* Serializes ndarray meta data.\n*\n* ## Notes\n*\n* - This function takes into account ndarray-like objects which may support index modes.\n*\n* - Serialization is performed according to host byte order (endianness).\n*\n* - Meta data format:\n*\n* ```text\n* | endianness (1 byte) | (2 bytes) | (8 bytes) | (ndims*8 bytes) | (ndims*8 bytes) | (8 bytes) | (1 byte) | (1 byte) | (8 bytes) | (nsubmodes*1 bytes) | (4 bytes) |\n* ```\n*\n* which translates to the following `ArrayBuffer` layout:\n*\n* ```text\n* ArrayBuffer[\n* [int8],\n* [int16],\n* [int64],\n* [ndims*int64],\n* [ndims*int64],\n* [int64],\n* [int8],\n* [int8],\n* [int64],\n* [nsubmodes*int8],\n* [int32]\n* ]\n* ```\n*\n* where `strides` and `offset` are in units of bytes.\n*\n* - If the endianness is `1`, the byte order is little endian. If the endianness is `0`, the byte order is big endian.\n*\n* - Buffer length:\n*\n* ```text\n* 1 + 2 + 8 + (ndims*8) + (ndims*8) + 8 + 1 + 1 + 8 + (nsubmodes*1) = 33 + (ndims*16) + nsubmodes\n* ```\n*\n* For example, consider a three-dimensional ndarray with one subscript index mode (submode):\n*\n* ```text\n* 33 + (3*16) + 1 = 82 bytes\n* ```\n*\n* - Views:\n*\n* - endianness: `Int8Array( buf, 0, 1 )`\n* - dtype: `Int16Array( buf, 1, 1 )`\n* - ndims: `Int64Array( buf, 3, 1 )`\n* - shape: `Int64Array( buf, 11, ndims )`\n* - strides: `Int64Array( buf, 11+(ndims*8), ndims )`\n* - offset: `Int64Array( buf, 11+(ndims*16), 1 )`\n* - order: `Int8Array( buf, 19+(ndims*16), 1 )`\n* - mode: `Int8Array( buf, 20+(ndims*16), 1 )`\n* - nsubmodes: `Int64Array( buf, 21+(ndims*16), 1 )`\n* - submodes: `Int8Array( buf, 29+(ndims*16), nsubmodes )`\n* - flags: `Int32Array( buf, 29+(ndims*16)+nsubmodes, 1 )`\n*\n* @private\n* @param {ndarrayLike} x - input array\n* @param {string} x.dtype - array data type\n* @param {NonNegativeIntegerArray} x.shape - array shape\n* @param {IntegerArray} x.strides - array strides\n* @param {NonNegativeInteger} x.offset - array index offset\n* @param {string} x.order - array order\n* @param {string} [x.mode='throw'] - array index mode\n* @param {StringArray} [x.submode=[x.mode]] - array subscript index modes\n* @param {Object} [x.flags={}] - array flags\n* @returns {DataView} serialized meta data\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n*\n* var dv = serialize( x );\n* // returns \n*/\nfunction serialize( x ) {\n\tvar nbytes;\n\tvar bytes;\n\tvar flgs;\n\tvar len;\n\tvar dt;\n\tvar sh;\n\tvar st;\n\tvar sm;\n\tvar v;\n\tvar m;\n\tvar o;\n\tvar s;\n\tvar N;\n\tvar M;\n\tvar i;\n\n\t// Check for interface which does the work of serializing to a DataView for us...\n\tif ( x.__array_meta_dataview__ ) { // eslint-disable-line no-underscore-dangle\n\t\treturn x.__array_meta_dataview__(); // eslint-disable-line no-underscore-dangle\n\t}\n\t// Extract meta data known to be attached to ndarray-like objects:\n\tdt = getDType( x);\n\tsh = getShape( x, false );\n\tst = getStrides( x, false );\n\tN = sh.length; // ndims\n\n\t// Extract meta data which may be available on ndarray-like objects (e.g., stdlib ndarray instances):\n\tm = x.mode || 'throw';\n\tsm = x.submode || [ m ];\n\tM = sm.length;\n\n\t// Determine number of bytes per element according to the ndarray dtype:\n\tnbytes = bytesPerElement( dt );\n\n\t// Compute the amount of memory we need to allocate for storing meta data:\n\tlen = 33 + (N*16) + M;\n\n\t// Allocate raw memory and create a view for interfacing with the allocated memory:\n\tv = new DataView( new ArrayBuffer( len ) );\n\tbytes = new Uint8Array( v.buffer );\n\n\t// Endianness: (byteoffset: 0; bytelength: 1)\n\to = 0;\n\tv.setInt8( o, ( IS_LITTLE_ENDIAN ) ? 1 : 0 );\n\n\t// Data type: (byteoffset: 1; bytelength: 2)\n\to += 1;\n\tv.setInt16( o, DTYPES[ dt ], IS_LITTLE_ENDIAN );\n\n\t// Number of dimensions: (byteoffset: 3; bytelength: 8)\n\to += 2;\n\tfloat64ToInt64Bytes( N, bytes, 1, o );\n\n\t// Shape and strides: (byteoffset: 11 and 11+(ndims*8), respectively; bytelength: ndims*8 for both shape and strides, and, thus, ndims*16 total)\n\ts = N * 8; // stride length between a dimension (shape[i]) and its associated stride\n\to += 8;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tfloat64ToInt64Bytes( sh[i], bytes, 1, o );\n\t\tfloat64ToInt64Bytes( st[i]*nbytes, bytes, 1, o+s );\n\t\to += 8;\n\t}\n\t// Offset: (byteoffset: 11+(ndims*16); bytelength: 8)\n\to += s;\n\tfloat64ToInt64Bytes( getOffset( x )*nbytes, bytes, 1, o );\n\n\t// Order: (byteoffset: 19+(ndims*16); bytelength: 1)\n\to += 8;\n\tv.setInt8( o, ORDERS[ getOrder( x ) ] );\n\n\t// Index mode: (byteoffset: 20+(ndims*16); bytelength: 1)\n\to += 1;\n\tv.setInt8( o, MODES[ m ] );\n\n\t// Number of index submodes: (byteoffset: 21+(ndims*16); bytelength: 8)\n\to += 1;\n\tfloat64ToInt64Bytes( M, bytes, 1, o );\n\n\t// Submodes: (byteoffset: 29+(ndims*16); bytelength: nsubmodes*1)\n\to += 8;\n\tfor ( i = 0; i < M; i++ ) {\n\t\tv.setInt8( o, MODES[ sm[i] ] );\n\t\to += 1;\n\t}\n\t// Flags: (byteoffset: 29+(ndims*16)+nsubmodes; bytelength: 4)\n\tflgs = 0|0;\n\tif ( x.flags ) {\n\t\tflgs |= ( x.flags.READONLY ) ? 4 : 0; // 00000000 00000000 00000000 00000100\n\t}\n\tv.setInt32( o, flgs, IS_LITTLE_ENDIAN );\n\n\treturn v;\n}\n\n\n// EXPORTS //\n\nmodule.exports = serialize;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serialize ndarray meta data.\n*\n* @module @stdlib/ndarray/base/serialize-meta-data\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var serialize = require( '@stdlib/ndarray/base/serialize-meta-data' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n*\n* var dv = serialize( x );\n* // returns \n*/\n\n// MODULES //\n\nvar hasBigIntSupport = require( '@stdlib/assert/has-bigint-support' );\nvar builtin = require( './main.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar main;\nif ( hasBigIntSupport() ) {\n\tmain = builtin;\n} else {\n\tmain = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the number of singleton dimensions.\n*\n* ## Notes\n*\n* - A singleton dimension is a dimension whose size is equal to `1`.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @returns {NonNegativeInteger} number of singleton dimensions\n*\n* @example\n* var shape = [ 2, 1, 1 ];\n*\n* var n = singletonDimensions( shape );\n* // returns 2\n*\n* @example\n* var shape = [ 2, 2, 2 ];\n*\n* var n = singletonDimensions( shape );\n* // returns 0\n*/\nfunction singletonDimensions( shape ) {\n\tvar cnt;\n\tvar i;\n\n\tcnt = 0;\n\tfor ( i = 0; i < shape.length; i++ ) {\n\t\tif ( shape[ i ] === 1 ) {\n\t\t\tcnt += 1;\n\t\t}\n\t}\n\treturn cnt;\n}\n\n\n// EXPORTS //\n\nmodule.exports = singletonDimensions;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the number of singleton dimensions.\n*\n* @module @stdlib/ndarray/base/singleton-dimensions\n*\n* @example\n* var singletonDimensions = require( '@stdlib/ndarray/base/singleton-dimensions' );\n*\n* var shape = [ 2, 1, 1 ];\n*\n* var n = singletonDimensions( shape );\n* // returns 2\n*\n* @example\n* var singletonDimensions = require( '@stdlib/ndarray/base/singleton-dimensions' );\n*\n* var shape = [ 2, 2, 2 ];\n*\n* var n = singletonDimensions( shape );\n* // returns 0\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Resolves the index offset of the first element indexed by a normalized multi-slice.\n*\n* @private\n* @param {MultiSlice} slice - normalized multi-slice object\n* @param {IntegerArray} strides - array strides\n* @param {NonNegativeInteger} offset - array index offset\n* @returns {NonNegativeInteger} index offset of the first element indexed by a normalized multi-slice object\n*/\nfunction sliceStart( slice, strides, offset ) {\n\tvar data;\n\tvar idx;\n\tvar i;\n\n\tdata = slice.data;\n\tidx = offset;\n\tfor ( i = 0; i < data.length; i++ ) {\n\t\tidx += strides[ i ] * data[ i ].start;\n\t}\n\treturn idx;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sliceStart;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Resolves slice strides for a provided normalized multi-slice object.\n*\n* @private\n* @param {MultiSlice} slice - normalized multi-slice object\n* @param {IntegerArray} strides - array strides\n* @param {NonNegativeIntegerArray} rdims - indices of non-reduced dimensions\n* @returns {IntegerArray} slice strides\n*\n* @example\n* var Slice = require( '@stdlib/slice/ctor' );\n* var MultiSlice = require( '@stdlib/slice/multi' );\n*\n* var s = new MultiSlice( new Slice( 2, 3, 1 ), new Slice( 10, null, -2 ) );\n* // returns \n*\n* var strides = slice2strides( s, [ 8, 2 ], [ 1 ] );\n* // returns [ -4 ]\n*/\nfunction slice2strides( slice, strides, rdims ) {\n\tvar data;\n\tvar out;\n\tvar i;\n\tvar j;\n\n\tdata = slice.data;\n\tout = [];\n\tfor ( i = 0; i < rdims.length; i++ ) {\n\t\tj = rdims[ i ];\n\t\tout.push( strides[j] * data[j].step );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = slice2strides;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar buffer = require( './../../../base/buffer' );\nvar zeros = require( '@stdlib/array/base/zeros' );\n\n\n// MAIN //\n\n/**\n* Returns an empty n-dimensional ndarray.\n*\n* @private\n* @param {Function} ctor - ndarray constructor\n* @param {string} dtype - array data type\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {string} order - layout order\n* @param {boolean} readonly - boolean indicating whether a returned array should be read-only\n* @returns {ndarray} empty ndarray\n*/\nfunction empty( ctor, dtype, shape, order, readonly ) {\n\tvar strides;\n\tvar ndims;\n\n\tndims = shape.length;\n\tif ( ndims === 0 ) {\n\t\tstrides = [ 0 ];\n\t} else {\n\t\tstrides = zeros( ndims );\n\t}\n\treturn new ctor( dtype, buffer( dtype, 0 ), shape, strides, 0, order, {\n\t\t'readonly': readonly\n\t});\n}\n\n\n// EXPORTS //\n\nmodule.exports = empty;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar normalizeMultiSlice = require( '@stdlib/slice/base/normalize-multi-slice' );\nvar nonreducedDimensions = require( '@stdlib/slice/base/nonreduced-dimensions' );\nvar sliceShape = require( '@stdlib/slice/base/shape' );\nvar take = require( '@stdlib/array/base/take' );\nvar zeros = require( '@stdlib/array/base/zeros' );\nvar numel = require( './../../../base/numel' );\nvar getDType = require( './../../../base/dtype' );\nvar getShape = require( './../../../base/shape' );\nvar getStrides = require( './../../../base/strides' );\nvar getOffset = require( './../../../base/offset' );\nvar getOrder = require( './../../../base/order' );\nvar getData = require( './../../../base/data-buffer' );\nvar format = require( '@stdlib/string/format' );\nvar sliceStart = require( './slice_start.js' );\nvar slice2strides = require( './slice_strides.js' );\nvar empty = require( './empty.js' );\n\n\n// MAIN //\n\n/**\n* Returns a view of an input ndarray.\n*\n* @param {ndarray} x - input array\n* @param {MultiSlice} s - multi-slice object\n* @param {boolean} strict - boolean indicating whether to enforce strict bounds checking\n* @param {boolean} writable - boolean indicating whether a returned array should be writable\n* @throws {RangeError} number of slice dimensions must match the number of array dimensions\n* @throws {RangeError} slice exceeds array bounds\n* @returns {ndarray} ndarray view\n*\n* @example\n* var Slice = require( '@stdlib/slice/ctor' );\n* var MultiSlice = require( '@stdlib/slice/multi' );\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n*\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n* // returns \n*\n* var sh = x.shape;\n* // returns [ 3, 2 ]\n*\n* var arr = ndarray2array( x );\n* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]\n*\n* var s = new MultiSlice( new Slice( null, null, -2 ), new Slice( null, null, -1 ) );\n* // returns \n*\n* var y = slice( x, s, false, false );\n* // returns \n*\n* sh = y.shape;\n* // returns [ 2, 2 ]\n*\n* arr = ndarray2array( y );\n* // returns [ [ 6.0, 5.0 ], [ 2.0, 1.0 ] ]\n*/\nfunction slice( x, s, strict, writable ) {\n\tvar strides;\n\tvar offset;\n\tvar dtype;\n\tvar shape;\n\tvar order;\n\tvar sdims;\n\tvar ndims;\n\tvar ctor;\n\tvar sh;\n\tvar ns;\n\n\t// Retrieve array meta data:\n\tdtype = getDType( x );\n\tshape = getShape( x, true );\n\tstrides = getStrides( x, true );\n\toffset = getOffset( x );\n\torder = getOrder( x );\n\tndims = shape.length;\n\n\t// Ensure that the number of array dimensions matches the number of slices:\n\tif ( s.ndims !== ndims ) {\n\t\tthrow new RangeError( format( 'invalid argument. Number of slice dimensions does not match the number of array dimensions. Array shape: (%s). Slice dimensions: %u.', shape.join( ',' ), s.ndims ) );\n\t}\n\t// Resolve the output array constructor:\n\tctor = x.constructor;\n\n\t// If provided a zero-dimensional input array, return a zero-dimensional array view...\n\tif ( ndims === 0 ) {\n\t\treturn new ctor( dtype, getData( x ), shape, strides, offset, order, {\n\t\t\t'readonly': !writable\n\t\t});\n\t}\n\t// Resolve the indices of the non-reduced dimensions:\n\tsdims = nonreducedDimensions( s );\n\n\t// Normalize the slice object based on the array shape:\n\tns = normalizeMultiSlice( s, shape, true );\n\n\t// Check whether the slice exceeds array bounds...\n\tif ( ns.code ) {\n\t\tif ( strict ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Slice exceeds array bounds. Array shape: (%s).', shape.join( ',' ) ) );\n\t\t}\n\t\t// Normalize again, this time allowing for out-of-bounds indices:\n\t\tns = normalizeMultiSlice( s, shape, false );\n\n\t\t// Compute the slice shape:\n\t\tsh = sliceShape( ns );\n\n\t\t// If the non-reduced dimensions contain elements, this means that at least one reduced dimension exceeded array bounds; in which case, we generate a shape containing zeros:\n\t\tif ( numel( take( sh, sdims ) ) > 0 ) {\n\t\t\tsh = zeros( sh.length );\n\t\t}\n\t} else {\n\t\t// Compute the slice shape:\n\t\tsh = sliceShape( ns );\n\t}\n\t// If the slice does not contain any elements, return an empty array...\n\tif ( numel( sh ) === 0 ) {\n\t\treturn empty( ctor, dtype, take( sh, sdims ), order, !writable );\n\t}\n\t// Resolve the index offset of the first element indexed by the slice:\n\toffset = sliceStart( ns, strides, offset ); // TODO: @stdlib/ndarray/base/sind2bind\n\n\t// Remove reduced dimensions from the slice shape:\n\tsh = take( sh, sdims );\n\n\t// If all dimensions were reduced, return a zero-dimensional array...\n\tif ( sh.length === 0 ) {\n\t\treturn new ctor( dtype, getData( x ), [], [ 0 ], offset, order, {\n\t\t\t'readonly': !writable\n\t\t});\n\t}\n\t// Update strides according to slice steps:\n\tstrides = slice2strides( ns, strides, sdims ); // TODO: @stdlib/ndarray/base/slice2strides???\n\n\t// Return a slice view:\n\treturn new ctor( dtype, getData( x ), sh, strides, offset, order, {\n\t\t'readonly': !writable\n\t});\n}\n\n\n// EXPORTS //\n\nmodule.exports = slice;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a view of an input ndarray.\n*\n* @module @stdlib/ndarray/base/slice\n*\n* @example\n* var Slice = require( '@stdlib/slice/ctor' );\n* var MultiSlice = require( '@stdlib/slice/multi' );\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n* var slice = require( '@stdlib/ndarray/base/slice' );\n*\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n* // returns \n*\n* var sh = x.shape;\n* // returns [ 3, 2 ]\n*\n* var arr = ndarray2array( x );\n* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]\n*\n* var s = new MultiSlice( new Slice( null, null, -2 ), new Slice( null, null, -1 ) );\n* // returns \n*\n* var y = slice( x, s, false, false );\n* // returns \n*\n* sh = y.shape;\n* // returns [ 2, 2 ]\n*\n* arr = ndarray2array( y );\n* // returns [ [ 6.0, 5.0 ], [ 2.0, 1.0 ] ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Simultaneously sorts two arrays based on the sort order of the first array using insertion sort.\n*\n* ## Notes\n*\n* - The first array is sorted in increasing order according to absolute value.\n* - The algorithm has space complexity `O(1)` and worst case time complexity `O(N^2)`.\n* - The algorithm is efficient for small arrays (typically `N <= 20``) and is particularly efficient for sorting arrays which are already substantially sorted.\n* - The algorithm is **stable**, meaning that the algorithm does **not** change the order of array elements which are equal or equivalent.\n* - The input arrays are sorted in-place (i.e., the input arrays are mutated).\n*\n* @private\n* @param {Array} x - first array\n* @param {Array} y - second array\n* @returns {void}\n*\n* @example\n* var x = [ -4, -2, 3, 1 ];\n* var y = [ 0, 1, 2, 3 ];\n*\n* sort2ins( x, y );\n*\n* console.log( x );\n* // => [ 1, -2, 3, -4 ]\n*\n* console.log( y );\n* // => [ 3, 1, 2, 0 ]\n*/\nfunction sort2ins( x, y ) {\n\tvar avx;\n\tvar aux;\n\tvar ix;\n\tvar iy;\n\tvar jx;\n\tvar jy;\n\tvar vx;\n\tvar vy;\n\tvar ux;\n\tvar i;\n\n\tix = 1;\n\tiy = 1;\n\n\t// Sort in increasing order...\n\tfor ( i = 1; i < x.length; i++ ) {\n\t\tvx = x[ ix ];\n\t\tavx = ( vx < 0 ) ? -vx : vx;\n\n\t\tvy = y[ iy ];\n\n\t\tjx = ix - 1;\n\t\tjy = iy - 1;\n\n\t\t// Shift all larger values to the left of the current element to the right...\n\t\twhile ( jx >= 0 ) {\n\t\t\tux = x[ jx ];\n\t\t\taux = ( ux < 0 ) ? -ux : ux;\n\t\t\tif ( aux <= avx ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tx[ jx+1 ] = ux;\n\t\t\ty[ jy+1 ] = y[ jy ];\n\t\t\tjx -= 1;\n\t\t\tjy -= 1;\n\t\t}\n\t\tx[ jx+1 ] = vx;\n\t\ty[ jy+1 ] = vy;\n\t\tix += 1;\n\t\tiy += 1;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = sort2ins;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar zeroTo = require( '@stdlib/array/base/zero-to' );\nvar copy = require( '@stdlib/array/base/copy-indexed' );\nvar take = require( '@stdlib/array/base/take' );\nvar sort2ins = require( './sort2ins.js' );\n\n\n// MAIN //\n\n/**\n* Reorders ndarray dimensions and associated strides for loop interchange.\n*\n* ## Notes\n*\n* - The returned object has the following properties:\n*\n* - **sh**: dimensions sorted in loop order.\n* - **sx**: input ndarray strides sorted in loop order.\n* - **sy**: output ndarray strides sorted in loop order.\n*\n* @param {NonNegativeIntegerArray} sh - array dimensions\n* @param {IntegerArray} sx - input array stride lengths\n* @param {IntegerArray} sy - output array stride lengths\n* @returns {Object} loop interchange data\n*\n* @example\n* var sh = [ 2, 3, 4 ];\n*\n* var sx = [ 12, 4, 1 ]; // row-major\n* var sy = [ 1, -2, 6 ]; // column-major\n*\n* var o = loopOrder( sh, sx, sy );\n* // returns {...}\n*\n* var ssh = o.sh;\n* // returns [ 4, 3, 2 ]\n*\n* var ssx = o.sx;\n* // returns [ 1, 4, 12 ]\n*\n* var ssy = o.sy;\n* // returns [ 6, -2, 1 ]\n*/\nfunction loopOrder( sh, sx, sy ) {\n\tvar idx;\n\n\t// Initialize a loop interchange index array for generating a loop order permutation:\n\tidx = zeroTo( sh.length );\n\n\t// Sort the input array strides in increasing order (of magnitude):\n\tsx = copy( sx );\n\tsort2ins( sx, idx );\n\n\t// Permute the shape and output array strides based on the sorted input array strides:\n\tsh = take( sh, idx );\n\tsy = take( sy, idx );\n\n\treturn {\n\t\t'sh': sh,\n\t\t'sx': sx,\n\t\t'sy': sy\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = loopOrder;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Reorder ndarray dimensions and associated strides for loop interchange.\n*\n* @module @stdlib/ndarray/base/unary-loop-interchange-order\n*\n* @example\n* var unaryLoopOrder = require( '@stdlib/ndarray/base/unary-loop-interchange-order' );\n*\n* var sh = [ 2, 3, 4 ];\n*\n* var sx = [ 12, 4, 1 ]; // row-major\n* var sy = [ 1, -2, 6 ]; // column-major\n*\n* var o = unaryLoopOrder( sh, sx, sy );\n* // returns {...}\n*\n* var ssh = o.sh;\n* // returns [ 4, 3, 2 ]\n*\n* var ssx = o.sx;\n* // returns [ 1, 4, 12 ]\n*\n* var ssy = o.sy;\n* // returns [ 6, -2, 1 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar defaults = {\n\t// Define a default block size (in bytes):\n\t'BLOCK_SIZE_IN_BYTES': 64|0, // 64b is a common cache line size. How applicable the common cache line size is here is debatable, given that, depending on the associated stride(s), the innermost loop may not iterate over adjacent elements. The primary goal is to have a block size in which all data within a block can always fit in (L1) cache, regardless of cache size (i.e., cache-oblivious). For reference, a common L1 cache size is 32kB per core. For best performance, block sizes should be tuned based on system hardware; however, such tuning is not readily available to us here. Without obvious better alternatives, 64b has some theoretical (and practical) underpinning, and it should be good enough for most inputs, especially for ndarrays with near contiguity.\n\n\t// Define a default block size (in elements):\n\t'BLOCK_SIZE_IN_ELEMENTS': 8|0 // 64 bytes / 8 bytes per element (i.e., default element size is same as a double)\n};\n\n\n// EXPORTS //\n\nmodule.exports = defaults;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar bytesPerElement = require( './../../../base/bytes-per-element' );\nvar defaults = require( './defaults.js' );\n\n\n// MAIN //\n\n/**\n* Returns a loop block size for multi-dimensional array tiled loops.\n*\n* @param {string} dtypeX - input array data type\n* @param {string} dtypeY - output array data type\n* @returns {integer} block size (in units of elements)\n*\n* @example\n* var bsize = unaryBlockSize( 'float64', 'float64' );\n* // returns \n*/\nfunction unaryBlockSize( dtypeX, dtypeY ) {\n\tvar nbx;\n\tvar nby;\n\n\tnbx = bytesPerElement( dtypeX );\n\tnby = bytesPerElement( dtypeY );\n\tif ( nbx === null || nby === null ) { // e.g., \"generic\" arrays\n\t\treturn defaults.BLOCK_SIZE_IN_ELEMENTS;\n\t}\n\tif ( nbx > nby ) {\n\t\treturn ( defaults.BLOCK_SIZE_IN_BYTES/nbx )|0; // asm type annotation\n\t}\n\treturn ( defaults.BLOCK_SIZE_IN_BYTES/nby )|0; // asm type annotation\n}\n\n\n// EXPORTS //\n\nmodule.exports = unaryBlockSize;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Resolve a loop block size for multi-dimensional array tiled loops.\n*\n* @module @stdlib/ndarray/base/unary-tiling-block-size\n*\n* @example\n* var unaryBlockSize = require( '@stdlib/ndarray/base/unary-tiling-block-size' );\n*\n* var bsize = unaryBlockSize( 'float64', 'float64' );\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a two-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary2d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary2d( x, y, fcn ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dy0;\n\tvar dy1;\n\tvar ox1;\n\tvar oy1;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar j0;\n\tvar j1;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\tif ( j1 < bsize ) {\n\t\t\ts1 = j1;\n\t\t\tj1 = 0;\n\t\t} else {\n\t\t\ts1 = bsize;\n\t\t\tj1 -= bsize;\n\t\t}\n\t\tox1 = ox + ( j1*sx[1] );\n\t\toy1 = oy + ( j1*sy[1] );\n\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\tif ( j0 < bsize ) {\n\t\t\t\ts0 = j0;\n\t\t\t\tj0 = 0;\n\t\t\t} else {\n\t\t\t\ts0 = bsize;\n\t\t\t\tj0 -= bsize;\n\t\t\t}\n\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t// Compute loop offset increments...\n\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t// Iterate over the ndarray dimensions...\n\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) );\n\t\t\t\t\tix += dx0;\n\t\t\t\t\tiy += dy0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t\tiy += dy1;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary2d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a three-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 1 ];\n* var sy = [ 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary3d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary3d( x, y, fcn ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar ox1;\n\tvar ox2;\n\tvar oy1;\n\tvar oy2;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\tif ( j2 < bsize ) {\n\t\t\ts2 = j2;\n\t\t\tj2 = 0;\n\t\t} else {\n\t\t\ts2 = bsize;\n\t\t\tj2 -= bsize;\n\t\t}\n\t\tox2 = ox + ( j2*sx[2] );\n\t\toy2 = oy + ( j2*sy[2] );\n\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\tif ( j1 < bsize ) {\n\t\t\t\ts1 = j1;\n\t\t\t\tj1 = 0;\n\t\t\t} else {\n\t\t\t\ts1 = bsize;\n\t\t\t\tj1 -= bsize;\n\t\t\t}\n\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\ts0 = j0;\n\t\t\t\t\tj0 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts0 = bsize;\n\t\t\t\t\tj0 -= bsize;\n\t\t\t\t}\n\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t// Compute loop offset increments...\n\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) );\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t\tiy += dy2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary3d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a four-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary4d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary4d( x, y, fcn ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\tif ( j3 < bsize ) {\n\t\t\ts3 = j3;\n\t\t\tj3 = 0;\n\t\t} else {\n\t\t\ts3 = bsize;\n\t\t\tj3 -= bsize;\n\t\t}\n\t\tox3 = ox + ( j3*sx[3] );\n\t\toy3 = oy + ( j3*sy[3] );\n\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\tif ( j2 < bsize ) {\n\t\t\t\ts2 = j2;\n\t\t\t\tj2 = 0;\n\t\t\t} else {\n\t\t\t\ts2 = bsize;\n\t\t\t\tj2 -= bsize;\n\t\t\t}\n\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\ts1 = j1;\n\t\t\t\t\tj1 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts1 = bsize;\n\t\t\t\t\tj1 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) );\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary4d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a five-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary5d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary5d( x, y, fcn ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\tif ( j4 < bsize ) {\n\t\t\ts4 = j4;\n\t\t\tj4 = 0;\n\t\t} else {\n\t\t\ts4 = bsize;\n\t\t\tj4 -= bsize;\n\t\t}\n\t\tox4 = ox + ( j4*sx[4] );\n\t\toy4 = oy + ( j4*sy[4] );\n\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\tif ( j3 < bsize ) {\n\t\t\t\ts3 = j3;\n\t\t\t\tj3 = 0;\n\t\t\t} else {\n\t\t\t\ts3 = bsize;\n\t\t\t\tj3 -= bsize;\n\t\t\t}\n\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\ts2 = j2;\n\t\t\t\t\tj2 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts2 = bsize;\n\t\t\t\t\tj2 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) ); // eslint-disable-line max-len\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary5d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a six-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary6d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary6d( x, y, fcn ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\tif ( j5 < bsize ) {\n\t\t\ts5 = j5;\n\t\t\tj5 = 0;\n\t\t} else {\n\t\t\ts5 = bsize;\n\t\t\tj5 -= bsize;\n\t\t}\n\t\tox5 = ox + ( j5*sx[5] );\n\t\toy5 = oy + ( j5*sy[5] );\n\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\tif ( j4 < bsize ) {\n\t\t\t\ts4 = j4;\n\t\t\t\tj4 = 0;\n\t\t\t} else {\n\t\t\t\ts4 = bsize;\n\t\t\t\tj4 -= bsize;\n\t\t\t}\n\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\ts3 = j3;\n\t\t\t\t\tj3 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts3 = bsize;\n\t\t\t\t\tj3 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary6d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a seven-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary7d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary7d( x, y, fcn ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\tif ( j6 < bsize ) {\n\t\t\ts6 = j6;\n\t\t\tj6 = 0;\n\t\t} else {\n\t\t\ts6 = bsize;\n\t\t\tj6 -= bsize;\n\t\t}\n\t\tox6 = ox + ( j6*sx[6] );\n\t\toy6 = oy + ( j6*sy[6] );\n\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\tif ( j5 < bsize ) {\n\t\t\t\ts5 = j5;\n\t\t\t\tj5 = 0;\n\t\t\t} else {\n\t\t\t\ts5 = bsize;\n\t\t\t\tj5 -= bsize;\n\t\t\t}\n\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\tdy6 = sy[6] - ( s5*sy[5] );\n\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\ts4 = j4;\n\t\t\t\t\tj4 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts4 = bsize;\n\t\t\t\t\tj4 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary7d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in an eight-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary8d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary8d( x, y, fcn ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\tif ( j7 < bsize ) {\n\t\t\ts7 = j7;\n\t\t\tj7 = 0;\n\t\t} else {\n\t\t\ts7 = bsize;\n\t\t\tj7 -= bsize;\n\t\t}\n\t\tox7 = ox + ( j7*sx[7] );\n\t\toy7 = oy + ( j7*sy[7] );\n\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\tif ( j6 < bsize ) {\n\t\t\t\ts6 = j6;\n\t\t\t\tj6 = 0;\n\t\t\t} else {\n\t\t\t\ts6 = bsize;\n\t\t\t\tj6 -= bsize;\n\t\t\t}\n\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\tdy7 = sy[7] - ( s6*sy[6] );\n\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\ts5 = j5;\n\t\t\t\t\tj5 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts5 = bsize;\n\t\t\t\t\tj5 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\tdy6 = sy[6] - ( s5*sy[5] );\n\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\tiy += dy7;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary8d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a nine-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary9d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary9d( x, y, fcn ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar oy8;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\tif ( j8 < bsize ) {\n\t\t\ts8 = j8;\n\t\t\tj8 = 0;\n\t\t} else {\n\t\t\ts8 = bsize;\n\t\t\tj8 -= bsize;\n\t\t}\n\t\tox8 = ox + ( j8*sx[8] );\n\t\toy8 = oy + ( j8*sy[8] );\n\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\tif ( j7 < bsize ) {\n\t\t\t\ts7 = j7;\n\t\t\t\tj7 = 0;\n\t\t\t} else {\n\t\t\t\ts7 = bsize;\n\t\t\t\tj7 -= bsize;\n\t\t\t}\n\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\tdy8 = sy[8] - ( s7*sy[7] );\n\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\toy7 = oy8 + ( j7*sy[7] );\n\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\ts6 = j6;\n\t\t\t\t\tj6 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts6 = bsize;\n\t\t\t\t\tj6 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\tdy7 = sy[7] - ( s6*sy[6] );\n\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\tdy6 = sy[6] - ( s5*sy[5] );\n\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\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t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy7;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx8;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy8;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary9d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a ten-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary10d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary10d( x, y, fcn ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar dy9;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar ox9;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar oy8;\n\tvar oy9;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar s9;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar j9;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j9 = sh[9]; j9 > 0; ) {\n\t\tif ( j9 < bsize ) {\n\t\t\ts9 = j9;\n\t\t\tj9 = 0;\n\t\t} else {\n\t\t\ts9 = bsize;\n\t\t\tj9 -= bsize;\n\t\t}\n\t\tox9 = ox + ( j9*sx[9] );\n\t\toy9 = oy + ( j9*sy[9] );\n\t\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\t\tif ( j8 < bsize ) {\n\t\t\t\ts8 = j8;\n\t\t\t\tj8 = 0;\n\t\t\t} else {\n\t\t\t\ts8 = bsize;\n\t\t\t\tj8 -= bsize;\n\t\t\t}\n\t\t\tdx9 = sx[9] - ( s8*sx[8] );\n\t\t\tdy9 = sy[9] - ( s8*sy[8] );\n\t\t\tox8 = ox9 + ( j8*sx[8] );\n\t\t\toy8 = oy9 + ( j8*sy[8] );\n\t\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\t\tif ( j7 < bsize ) {\n\t\t\t\t\ts7 = j7;\n\t\t\t\t\tj7 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts7 = bsize;\n\t\t\t\t\tj7 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\t\tdy8 = sy[8] - ( s7*sy[7] );\n\t\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\t\toy7 = oy8 + ( j7*sy[7] );\n\t\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\t\ts6 = j6;\n\t\t\t\t\t\tj6 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts6 = bsize;\n\t\t\t\t\t\tj6 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\t\tdy7 = sy[7] - ( s6*sy[6] );\n\t\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\t\tdy6 = sy[6] - ( s5*sy[5] );\n\t\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\t\tfor ( i9 = 0; i9 < s9; i9++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 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x6;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy7;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx8;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy8;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx9;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy9;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary10d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a two-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Float64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary2d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0 ]\n*/\nfunction blockedunary2d( x, y, fcn ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dy0;\n\tvar dy1;\n\tvar ox1;\n\tvar oy1;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar j0;\n\tvar j1;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\tif ( j1 < bsize ) {\n\t\t\ts1 = j1;\n\t\t\tj1 = 0;\n\t\t} else {\n\t\t\ts1 = bsize;\n\t\t\tj1 -= bsize;\n\t\t}\n\t\tox1 = ox + ( j1*sx[1] );\n\t\toy1 = oy + ( j1*sy[1] );\n\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\tif ( j0 < bsize ) {\n\t\t\t\ts0 = j0;\n\t\t\t\tj0 = 0;\n\t\t\t} else {\n\t\t\t\ts0 = bsize;\n\t\t\t\tj0 -= bsize;\n\t\t\t}\n\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t// Compute loop offset increments...\n\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t// Iterate over the ndarray dimensions...\n\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\t\t\tix += dx0;\n\t\t\t\t\tiy += dy0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t\tiy += dy1;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary2d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a three-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n* var sy = [ 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary3d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction blockedunary3d( x, y, fcn ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar ox1;\n\tvar ox2;\n\tvar oy1;\n\tvar oy2;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\tif ( j2 < bsize ) {\n\t\t\ts2 = j2;\n\t\t\tj2 = 0;\n\t\t} else {\n\t\t\ts2 = bsize;\n\t\t\tj2 -= bsize;\n\t\t}\n\t\tox2 = ox + ( j2*sx[2] );\n\t\toy2 = oy + ( j2*sy[2] );\n\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\tif ( j1 < bsize ) {\n\t\t\t\ts1 = j1;\n\t\t\t\tj1 = 0;\n\t\t\t} else {\n\t\t\t\ts1 = bsize;\n\t\t\t\tj1 -= bsize;\n\t\t\t}\n\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\ts0 = j0;\n\t\t\t\t\tj0 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts0 = bsize;\n\t\t\t\t\tj0 -= bsize;\n\t\t\t\t}\n\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t// Compute loop offset increments...\n\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t\tiy += dy2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary3d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a four-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 4, 1 ];\n* var sy = [ 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary4d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction blockedunary4d( x, y, fcn ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\tif ( j3 < bsize ) {\n\t\t\ts3 = j3;\n\t\t\tj3 = 0;\n\t\t} else {\n\t\t\ts3 = bsize;\n\t\t\tj3 -= bsize;\n\t\t}\n\t\tox3 = ox + ( j3*sx[3] );\n\t\toy3 = oy + ( j3*sy[3] );\n\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\tif ( j2 < bsize ) {\n\t\t\t\ts2 = j2;\n\t\t\t\tj2 = 0;\n\t\t\t} else {\n\t\t\t\ts2 = bsize;\n\t\t\t\tj2 -= bsize;\n\t\t\t}\n\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\ts1 = j1;\n\t\t\t\t\tj1 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts1 = bsize;\n\t\t\t\t\tj1 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary4d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a five-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary5d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction blockedunary5d( x, y, fcn ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\tif ( j4 < bsize ) {\n\t\t\ts4 = j4;\n\t\t\tj4 = 0;\n\t\t} else {\n\t\t\ts4 = bsize;\n\t\t\tj4 -= bsize;\n\t\t}\n\t\tox4 = ox + ( j4*sx[4] );\n\t\toy4 = oy + ( j4*sy[4] );\n\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\tif ( j3 < bsize ) {\n\t\t\t\ts3 = j3;\n\t\t\t\tj3 = 0;\n\t\t\t} else {\n\t\t\t\ts3 = bsize;\n\t\t\t\tj3 -= bsize;\n\t\t\t}\n\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\ts2 = j2;\n\t\t\t\t\tj2 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts2 = bsize;\n\t\t\t\t\tj2 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary5d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a six-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary6d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction blockedunary6d( x, y, fcn ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\tif ( j5 < bsize ) {\n\t\t\ts5 = j5;\n\t\t\tj5 = 0;\n\t\t} else {\n\t\t\ts5 = bsize;\n\t\t\tj5 -= bsize;\n\t\t}\n\t\tox5 = ox + ( j5*sx[5] );\n\t\toy5 = oy + ( j5*sy[5] );\n\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\tif ( j4 < bsize ) {\n\t\t\t\ts4 = j4;\n\t\t\t\tj4 = 0;\n\t\t\t} else {\n\t\t\t\ts4 = bsize;\n\t\t\t\tj4 -= bsize;\n\t\t\t}\n\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\ts3 = j3;\n\t\t\t\t\tj3 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts3 = bsize;\n\t\t\t\t\tj3 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary6d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a seven-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary7d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction blockedunary7d( x, y, fcn ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\tif ( j6 < bsize ) {\n\t\t\ts6 = j6;\n\t\t\tj6 = 0;\n\t\t} else {\n\t\t\ts6 = bsize;\n\t\t\tj6 -= bsize;\n\t\t}\n\t\tox6 = ox + ( j6*sx[6] );\n\t\toy6 = oy + ( j6*sy[6] );\n\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\tif ( j5 < bsize ) {\n\t\t\t\ts5 = j5;\n\t\t\t\tj5 = 0;\n\t\t\t} else {\n\t\t\t\ts5 = bsize;\n\t\t\t\tj5 -= bsize;\n\t\t\t}\n\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\tdy6 = sy[6] - ( s5*sy[5] );\n\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\ts4 = j4;\n\t\t\t\t\tj4 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts4 = bsize;\n\t\t\t\t\tj4 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary7d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in an eight-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary8d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction blockedunary8d( x, y, fcn ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\tif ( j7 < bsize ) {\n\t\t\ts7 = j7;\n\t\t\tj7 = 0;\n\t\t} else {\n\t\t\ts7 = bsize;\n\t\t\tj7 -= bsize;\n\t\t}\n\t\tox7 = ox + ( j7*sx[7] );\n\t\toy7 = oy + ( j7*sy[7] );\n\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\tif ( j6 < bsize ) {\n\t\t\t\ts6 = j6;\n\t\t\t\tj6 = 0;\n\t\t\t} else {\n\t\t\t\ts6 = bsize;\n\t\t\t\tj6 -= bsize;\n\t\t\t}\n\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\tdy7 = sy[7] - ( s6*sy[6] );\n\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\ts5 = j5;\n\t\t\t\t\tj5 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts5 = bsize;\n\t\t\t\t\tj5 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\tdy6 = sy[6] - ( s5*sy[5] );\n\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\tiy += dy7;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary8d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a nine-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary9d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction blockedunary9d( x, y, fcn ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar oy8;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\tif ( j8 < bsize ) {\n\t\t\ts8 = j8;\n\t\t\tj8 = 0;\n\t\t} else {\n\t\t\ts8 = bsize;\n\t\t\tj8 -= bsize;\n\t\t}\n\t\tox8 = ox + ( j8*sx[8] );\n\t\toy8 = oy + ( j8*sy[8] );\n\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\tif ( j7 < bsize ) {\n\t\t\t\ts7 = j7;\n\t\t\t\tj7 = 0;\n\t\t\t} else {\n\t\t\t\ts7 = bsize;\n\t\t\t\tj7 -= bsize;\n\t\t\t}\n\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\tdy8 = sy[8] - ( s7*sy[7] );\n\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\toy7 = oy8 + ( j7*sy[7] );\n\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\ts6 = j6;\n\t\t\t\t\tj6 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts6 = bsize;\n\t\t\t\t\tj6 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\tdy7 = sy[7] - ( s6*sy[6] );\n\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\tdy6 = sy[6] - ( s5*sy[5] );\n\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t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Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a ten-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary10d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction blockedunary10d( x, y, fcn ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar dy9;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar ox9;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar oy8;\n\tvar oy9;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar s9;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar j9;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j9 = sh[9]; j9 > 0; ) {\n\t\tif ( j9 < bsize ) {\n\t\t\ts9 = j9;\n\t\t\tj9 = 0;\n\t\t} else {\n\t\t\ts9 = bsize;\n\t\t\tj9 -= bsize;\n\t\t}\n\t\tox9 = ox + ( j9*sx[9] );\n\t\toy9 = oy + ( j9*sy[9] );\n\t\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\t\tif ( j8 < bsize ) {\n\t\t\t\ts8 = j8;\n\t\t\t\tj8 = 0;\n\t\t\t} else {\n\t\t\t\ts8 = bsize;\n\t\t\t\tj8 -= bsize;\n\t\t\t}\n\t\t\tdx9 = sx[9] - ( s8*sx[8] );\n\t\t\tdy9 = sy[9] - ( s8*sy[8] );\n\t\t\tox8 = ox9 + ( j8*sx[8] );\n\t\t\toy8 = oy9 + ( j8*sy[8] );\n\t\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\t\tif ( j7 < bsize ) {\n\t\t\t\t\ts7 = j7;\n\t\t\t\t\tj7 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts7 = bsize;\n\t\t\t\t\tj7 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\t\tdy8 = sy[8] - ( s7*sy[7] );\n\t\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\t\toy7 = oy8 + ( j7*sy[7] );\n\t\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\t\ts6 = j6;\n\t\t\t\t\t\tj6 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts6 = bsize;\n\t\t\t\t\t\tj6 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\t\tdy7 = sy[7] - ( s6*sy[6] );\n\t\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\t\tdy6 = sy[6] - ( s5*sy[5] );\n\t\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\t\tfor ( i9 = 0; i9 < s9; i9++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0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\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy7;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx8;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy8;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx9;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy9;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary10d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a zero-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0 ] );\n* var ybuf = new Complex64Array( 2 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [];\n*\n* // Define the array strides:\n* var sx = [ 0 ];\n* var sy = [ 0 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary0d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 30.0\n*\n* var im = imagf( v );\n* // returns 40.0\n*/\nfunction unary0d( x, y, fcn ) {\n\ty.accessors[ 1 ]( y.data, y.offset, fcn( x.accessors[ 0 ]( x.data, x.offset ) ) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary0d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a one-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 4 ];\n*\n* // Define the array strides:\n* var sx = [ 1 ];\n* var sy = [ 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary1d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary1d( x, y, fcn ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dy0;\n\tvar S0;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables: dimensions and loop offset (pointer) increments...\n\tS0 = x.shape[ 0 ];\n\tdx0 = x.strides[ 0 ];\n\tdy0 = y.strides[ 0 ];\n\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) );\n\t\tix += dx0;\n\t\tiy += dy0;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary1d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a two-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary2d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary2d( x, y, fcn ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dy0;\n\tvar dy1;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 1 ];\n\t\tS1 = sh[ 0 ];\n\t\tdx0 = sx[ 1 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 0 ] - ( S0*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 1 ];\n\t\tdy1 = sy[ 0 ] - ( S0*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) );\n\t\t\tix += dx0;\n\t\t\tiy += dy0;\n\t\t}\n\t\tix += dx1;\n\t\tiy += dy1;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary2d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a three-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 1 ];\n* var sy = [ 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary3d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary3d( x, y, fcn ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 2 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 0 ];\n\t\tdx0 = sx[ 2 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[2] );\n\t\tdx2 = sx[ 0 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 2 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[2] );\n\t\tdy2 = sy[ 0 ] - ( S1*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) );\n\t\t\t\tix += dx0;\n\t\t\t\tiy += dy0;\n\t\t\t}\n\t\t\tix += dx1;\n\t\t\tiy += dy1;\n\t\t}\n\t\tix += dx2;\n\t\tiy += dy2;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary3d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a four-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary4d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary4d( x, y, fcn ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 3 ];\n\t\tS1 = sh[ 2 ];\n\t\tS2 = sh[ 1 ];\n\t\tS3 = sh[ 0 ];\n\t\tdx0 = sx[ 3 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 2 ] - ( S0*sx[3] );\n\t\tdx2 = sx[ 1 ] - ( S1*sx[2] );\n\t\tdx3 = sx[ 0 ] - ( S2*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 3 ];\n\t\tdy1 = sy[ 2 ] - ( S0*sy[3] );\n\t\tdy2 = sy[ 1 ] - ( S1*sy[2] );\n\t\tdy3 = sy[ 0 ] - ( S2*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) );\n\t\t\t\t\tix += dx0;\n\t\t\t\t\tiy += dy0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t\tiy += dy1;\n\t\t\t}\n\t\t\tix += dx2;\n\t\t\tiy += dy2;\n\t\t}\n\t\tix += dx3;\n\t\tiy += dy3;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary4d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a five-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary5d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary5d( x, y, fcn ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 4 ];\n\t\tS1 = sh[ 3 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 1 ];\n\t\tS4 = sh[ 0 ];\n\t\tdx0 = sx[ 4 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 3 ] - ( S0*sx[4] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[3] );\n\t\tdx3 = sx[ 1 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 0 ] - ( S3*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 4 ];\n\t\tdy1 = sy[ 3 ] - ( S0*sy[4] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[3] );\n\t\tdy3 = sy[ 1 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 0 ] - ( S3*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) );\n\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx1;\n\t\t\t\t\tiy += dy1;\n\t\t\t\t}\n\t\t\t\tix += dx2;\n\t\t\t\tiy += dy2;\n\t\t\t}\n\t\t\tix += dx3;\n\t\t\tiy += dy3;\n\t\t}\n\t\tix += dx4;\n\t\tiy += dy4;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary5d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a six-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary6d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary6d( x, y, fcn ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 5 ];\n\t\tS1 = sh[ 4 ];\n\t\tS2 = sh[ 3 ];\n\t\tS3 = sh[ 2 ];\n\t\tS4 = sh[ 1 ];\n\t\tS5 = sh[ 0 ];\n\t\tdx0 = sx[ 5 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 4 ] - ( S0*sx[5] );\n\t\tdx2 = sx[ 3 ] - ( S1*sx[4] );\n\t\tdx3 = sx[ 2 ] - ( S2*sx[3] );\n\t\tdx4 = sx[ 1 ] - ( S3*sx[2] );\n\t\tdx5 = sx[ 0 ] - ( S4*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 5 ];\n\t\tdy1 = sy[ 4 ] - ( S0*sy[5] );\n\t\tdy2 = sy[ 3 ] - ( S1*sy[4] );\n\t\tdy3 = sy[ 2 ] - ( S2*sy[3] );\n\t\tdy4 = sy[ 1 ] - ( S3*sy[2] );\n\t\tdy5 = sy[ 0 ] - ( S4*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) );\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t\tiy += dy2;\n\t\t\t\t}\n\t\t\t\tix += dx3;\n\t\t\t\tiy += dy3;\n\t\t\t}\n\t\t\tix += dx4;\n\t\t\tiy += dy4;\n\t\t}\n\t\tix += dx5;\n\t\tiy += dy5;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary6d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a seven-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary7d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary7d( x, y, fcn ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 6 ];\n\t\tS1 = sh[ 5 ];\n\t\tS2 = sh[ 4 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 2 ];\n\t\tS5 = sh[ 1 ];\n\t\tS6 = sh[ 0 ];\n\t\tdx0 = sx[ 6 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 5 ] - ( S0*sx[6] );\n\t\tdx2 = sx[ 4 ] - ( S1*sx[5] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[4] );\n\t\tdx4 = sx[ 2 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 1 ] - ( S4*sx[2] );\n\t\tdx6 = sx[ 0 ] - ( S5*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 6 ];\n\t\tdy1 = sy[ 5 ] - ( S0*sy[6] );\n\t\tdy2 = sy[ 4 ] - ( S1*sy[5] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[4] );\n\t\tdy4 = sy[ 2 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 1 ] - ( S4*sy[2] );\n\t\tdy6 = sy[ 0 ] - ( S5*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) );\n\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx3;\n\t\t\t\t\tiy += dy3;\n\t\t\t\t}\n\t\t\t\tix += dx4;\n\t\t\t\tiy += dy4;\n\t\t\t}\n\t\t\tix += dx5;\n\t\t\tiy += dy5;\n\t\t}\n\t\tix += dx6;\n\t\tiy += dy6;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary7d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in an eight-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary8d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary8d( x, y, fcn ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 7 ];\n\t\tS1 = sh[ 6 ];\n\t\tS2 = sh[ 5 ];\n\t\tS3 = sh[ 4 ];\n\t\tS4 = sh[ 3 ];\n\t\tS5 = sh[ 2 ];\n\t\tS6 = sh[ 1 ];\n\t\tS7 = sh[ 0 ];\n\t\tdx0 = sx[ 7 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 6 ] - ( S0*sx[7] );\n\t\tdx2 = sx[ 5 ] - ( S1*sx[6] );\n\t\tdx3 = sx[ 4 ] - ( S2*sx[5] );\n\t\tdx4 = sx[ 3 ] - ( S3*sx[4] );\n\t\tdx5 = sx[ 2 ] - ( S4*sx[3] );\n\t\tdx6 = sx[ 1 ] - ( S5*sx[2] );\n\t\tdx7 = sx[ 0 ] - ( S6*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 7 ];\n\t\tdy1 = sy[ 6 ] - ( S0*sy[7] );\n\t\tdy2 = sy[ 5 ] - ( S1*sy[6] );\n\t\tdy3 = sy[ 4 ] - ( S2*sy[5] );\n\t\tdy4 = sy[ 3 ] - ( S3*sy[4] );\n\t\tdy5 = sy[ 2 ] - ( S4*sy[3] );\n\t\tdy6 = sy[ 1 ] - ( S5*sy[2] );\n\t\tdy7 = sy[ 0 ] - ( S6*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) );\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx4;\n\t\t\t\t\tiy += dy4;\n\t\t\t\t}\n\t\t\t\tix += dx5;\n\t\t\t\tiy += dy5;\n\t\t\t}\n\t\t\tix += dx6;\n\t\t\tiy += dy6;\n\t\t}\n\t\tix += dx7;\n\t\tiy += dy7;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary8d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a nine-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary9d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary9d( x, y, fcn ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 8 ];\n\t\tS1 = sh[ 7 ];\n\t\tS2 = sh[ 6 ];\n\t\tS3 = sh[ 5 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 3 ];\n\t\tS6 = sh[ 2 ];\n\t\tS7 = sh[ 1 ];\n\t\tS8 = sh[ 0 ];\n\t\tdx0 = sx[ 8 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 7 ] - ( S0*sx[8] );\n\t\tdx2 = sx[ 6 ] - ( S1*sx[7] );\n\t\tdx3 = sx[ 5 ] - ( S2*sx[6] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[5] );\n\t\tdx5 = sx[ 3 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 2 ] - ( S5*sx[3] );\n\t\tdx7 = sx[ 1 ] - ( S6*sx[2] );\n\t\tdx8 = sx[ 0 ] - ( S7*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 8 ];\n\t\tdy1 = sy[ 7 ] - ( S0*sy[8] );\n\t\tdy2 = sy[ 6 ] - ( S1*sy[7] );\n\t\tdy3 = sy[ 5 ] - ( S2*sy[6] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[5] );\n\t\tdy5 = sy[ 3 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 2 ] - ( S5*sy[3] );\n\t\tdy7 = sy[ 1 ] - ( S6*sy[2] );\n\t\tdy8 = sy[ 0 ] - ( S7*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t\tdy8 = sy[ 8 ] - ( S7*sy[7] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) );\n\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx5;\n\t\t\t\t\tiy += dy5;\n\t\t\t\t}\n\t\t\t\tix += dx6;\n\t\t\t\tiy += dy6;\n\t\t\t}\n\t\t\tix += dx7;\n\t\t\tiy += dy7;\n\t\t}\n\t\tix += dx8;\n\t\tiy += dy8;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary9d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a ten-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary10d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary10d( x, y, fcn ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar dy9;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar S9;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 9 ];\n\t\tS1 = sh[ 8 ];\n\t\tS2 = sh[ 7 ];\n\t\tS3 = sh[ 6 ];\n\t\tS4 = sh[ 5 ];\n\t\tS5 = sh[ 4 ];\n\t\tS6 = sh[ 3 ];\n\t\tS7 = sh[ 2 ];\n\t\tS8 = sh[ 1 ];\n\t\tS9 = sh[ 0 ];\n\t\tdx0 = sx[ 9 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 8 ] - ( S0*sx[9] );\n\t\tdx2 = sx[ 7 ] - ( S1*sx[8] );\n\t\tdx3 = sx[ 6 ] - ( S2*sx[7] );\n\t\tdx4 = sx[ 5 ] - ( S3*sx[6] );\n\t\tdx5 = sx[ 4 ] - ( S4*sx[5] );\n\t\tdx6 = sx[ 3 ] - ( S5*sx[4] );\n\t\tdx7 = sx[ 2 ] - ( S6*sx[3] );\n\t\tdx8 = sx[ 1 ] - ( S7*sx[2] );\n\t\tdx9 = sx[ 0 ] - ( S8*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 9 ];\n\t\tdy1 = sy[ 8 ] - ( S0*sy[9] );\n\t\tdy2 = sy[ 7 ] - ( S1*sy[8] );\n\t\tdy3 = sy[ 6 ] - ( S2*sy[7] );\n\t\tdy4 = sy[ 5 ] - ( S3*sy[6] );\n\t\tdy5 = sy[ 4 ] - ( S4*sy[5] );\n\t\tdy6 = sy[ 3 ] - ( S5*sy[4] );\n\t\tdy7 = sy[ 2 ] - ( S6*sy[3] );\n\t\tdy8 = sy[ 1 ] - ( S7*sy[2] );\n\t\tdy9 = sy[ 0 ] - ( S8*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tS9 = sh[ 9 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] );\n\t\tdx9 = sx[ 9 ] - ( S8*sx[8] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t\tdy8 = sy[ 8 ] - ( S7*sy[7] );\n\t\tdy9 = sy[ 9 ] - ( S8*sy[8] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i9 = 0; i9 < S9; i9++ ) {\n\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) ); // eslint-disable-line max-len\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx6;\n\t\t\t\t\tiy += dy6;\n\t\t\t\t}\n\t\t\t\tix += dx7;\n\t\t\t\tiy += dy7;\n\t\t\t}\n\t\t\tix += dx8;\n\t\t\tiy += dy8;\n\t\t}\n\t\tix += dx9;\n\t\tiy += dy9;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary10d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar numel = require( './../../../base/numel' );\nvar vind2bind = require( './../../../base/vind2bind' );\n\n\n// VARIABLES //\n\nvar MODE = 'throw';\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in an n-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unarynd( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unarynd( x, y, fcn ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar ordx;\n\tvar ordy;\n\tvar len;\n\tvar get;\n\tvar set;\n\tvar sh;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i;\n\n\tsh = x.shape;\n\n\t// Compute the total number of elements over which to iterate:\n\tlen = numel( sh );\n\n\t// Cache references to the input and output ndarray data buffers:\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache references to the respective stride arrays:\n\tsx = x.strides;\n\tsy = y.strides;\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays:\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache the respective array orders:\n\tordx = x.order;\n\tordy = y.order;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over each element based on the linear **view** index, regardless as to how the data is stored in memory...\n\tfor ( i = 0; i < len; i++ ) {\n\t\tix = vind2bind( sh, sx, ox, ordx, i, MODE );\n\t\tiy = vind2bind( sh, sy, oy, ordy, i, MODE );\n\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unarynd;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a zero-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0 ] );\n* var ybuf = new Float64Array( 1 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [];\n*\n* // Define the array strides:\n* var sx = [ 0 ];\n* var sy = [ 0 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary0d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0 ]\n*/\nfunction unary0d( x, y, fcn ) {\n\ty.data[ y.offset ] = fcn( x.data[ x.offset ] );\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary0d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a one-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Float64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 4 ];\n*\n* // Define the array strides:\n* var sx = [ 2 ];\n* var sy = [ 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary1d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 40.0, 60.0, 80.0 ]\n*/\nfunction unary1d( x, y, fcn ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dy0;\n\tvar S0;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables: dimensions and loop offset (pointer) increments...\n\tS0 = x.shape[ 0 ];\n\tdx0 = x.strides[ 0 ];\n\tdy0 = y.strides[ 0 ];\n\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\tix += dx0;\n\t\tiy += dy0;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary1d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a two-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Float64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary2d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0 ]\n*/\nfunction unary2d( x, y, fcn ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dy0;\n\tvar dy1;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 1 ];\n\t\tS1 = sh[ 0 ];\n\t\tdx0 = sx[ 1 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 0 ] - ( S0*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 1 ];\n\t\tdy1 = sy[ 0 ] - ( S0*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\tix += dx0;\n\t\t\tiy += dy0;\n\t\t}\n\t\tix += dx1;\n\t\tiy += dy1;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary2d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a three-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n* var sy = [ 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary3d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction unary3d( x, y, fcn ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 2 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 0 ];\n\t\tdx0 = sx[ 2 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[2] );\n\t\tdx2 = sx[ 0 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 2 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[2] );\n\t\tdy2 = sy[ 0 ] - ( S1*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\t\tix += dx0;\n\t\t\t\tiy += dy0;\n\t\t\t}\n\t\t\tix += dx1;\n\t\t\tiy += dy1;\n\t\t}\n\t\tix += dx2;\n\t\tiy += dy2;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary3d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a four-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 4, 1 ];\n* var sy = [ 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary4d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction unary4d( x, y, fcn ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 3 ];\n\t\tS1 = sh[ 2 ];\n\t\tS2 = sh[ 1 ];\n\t\tS3 = sh[ 0 ];\n\t\tdx0 = sx[ 3 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 2 ] - ( S0*sx[3] );\n\t\tdx2 = sx[ 1 ] - ( S1*sx[2] );\n\t\tdx3 = sx[ 0 ] - ( S2*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 3 ];\n\t\tdy1 = sy[ 2 ] - ( S0*sy[3] );\n\t\tdy2 = sy[ 1 ] - ( S1*sy[2] );\n\t\tdy3 = sy[ 0 ] - ( S2*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\t\t\tix += dx0;\n\t\t\t\t\tiy += dy0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t\tiy += dy1;\n\t\t\t}\n\t\t\tix += dx2;\n\t\t\tiy += dy2;\n\t\t}\n\t\tix += dx3;\n\t\tiy += dy3;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary4d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a five-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary5d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction unary5d( x, y, fcn ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 4 ];\n\t\tS1 = sh[ 3 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 1 ];\n\t\tS4 = sh[ 0 ];\n\t\tdx0 = sx[ 4 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 3 ] - ( S0*sx[4] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[3] );\n\t\tdx3 = sx[ 1 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 0 ] - ( S3*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 4 ];\n\t\tdy1 = sy[ 3 ] - ( S0*sy[4] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[3] );\n\t\tdy3 = sy[ 1 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 0 ] - ( S3*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx1;\n\t\t\t\t\tiy += dy1;\n\t\t\t\t}\n\t\t\t\tix += dx2;\n\t\t\t\tiy += dy2;\n\t\t\t}\n\t\t\tix += dx3;\n\t\t\tiy += dy3;\n\t\t}\n\t\tix += dx4;\n\t\tiy += dy4;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary5d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a six-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary6d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction unary6d( x, y, fcn ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 5 ];\n\t\tS1 = sh[ 4 ];\n\t\tS2 = sh[ 3 ];\n\t\tS3 = sh[ 2 ];\n\t\tS4 = sh[ 1 ];\n\t\tS5 = sh[ 0 ];\n\t\tdx0 = sx[ 5 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 4 ] - ( S0*sx[5] );\n\t\tdx2 = sx[ 3 ] - ( S1*sx[4] );\n\t\tdx3 = sx[ 2 ] - ( S2*sx[3] );\n\t\tdx4 = sx[ 1 ] - ( S3*sx[2] );\n\t\tdx5 = sx[ 0 ] - ( S4*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 5 ];\n\t\tdy1 = sy[ 4 ] - ( S0*sy[5] );\n\t\tdy2 = sy[ 3 ] - ( S1*sy[4] );\n\t\tdy3 = sy[ 2 ] - ( S2*sy[3] );\n\t\tdy4 = sy[ 1 ] - ( S3*sy[2] );\n\t\tdy5 = sy[ 0 ] - ( S4*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t\tiy += dy2;\n\t\t\t\t}\n\t\t\t\tix += dx3;\n\t\t\t\tiy += dy3;\n\t\t\t}\n\t\t\tix += dx4;\n\t\t\tiy += dy4;\n\t\t}\n\t\tix += dx5;\n\t\tiy += dy5;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary6d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a seven-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary7d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction unary7d( x, y, fcn ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 6 ];\n\t\tS1 = sh[ 5 ];\n\t\tS2 = sh[ 4 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 2 ];\n\t\tS5 = sh[ 1 ];\n\t\tS6 = sh[ 0 ];\n\t\tdx0 = sx[ 6 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 5 ] - ( S0*sx[6] );\n\t\tdx2 = sx[ 4 ] - ( S1*sx[5] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[4] );\n\t\tdx4 = sx[ 2 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 1 ] - ( S4*sx[2] );\n\t\tdx6 = sx[ 0 ] - ( S5*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 6 ];\n\t\tdy1 = sy[ 5 ] - ( S0*sy[6] );\n\t\tdy2 = sy[ 4 ] - ( S1*sy[5] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[4] );\n\t\tdy4 = sy[ 2 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 1 ] - ( S4*sy[2] );\n\t\tdy6 = sy[ 0 ] - ( S5*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx3;\n\t\t\t\t\tiy += dy3;\n\t\t\t\t}\n\t\t\t\tix += dx4;\n\t\t\t\tiy += dy4;\n\t\t\t}\n\t\t\tix += dx5;\n\t\t\tiy += dy5;\n\t\t}\n\t\tix += dx6;\n\t\tiy += dy6;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary7d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in an eight-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary8d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction unary8d( x, y, fcn ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 7 ];\n\t\tS1 = sh[ 6 ];\n\t\tS2 = sh[ 5 ];\n\t\tS3 = sh[ 4 ];\n\t\tS4 = sh[ 3 ];\n\t\tS5 = sh[ 2 ];\n\t\tS6 = sh[ 1 ];\n\t\tS7 = sh[ 0 ];\n\t\tdx0 = sx[ 7 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 6 ] - ( S0*sx[7] );\n\t\tdx2 = sx[ 5 ] - ( S1*sx[6] );\n\t\tdx3 = sx[ 4 ] - ( S2*sx[5] );\n\t\tdx4 = sx[ 3 ] - ( S3*sx[4] );\n\t\tdx5 = sx[ 2 ] - ( S4*sx[3] );\n\t\tdx6 = sx[ 1 ] - ( S5*sx[2] );\n\t\tdx7 = sx[ 0 ] - ( S6*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 7 ];\n\t\tdy1 = sy[ 6 ] - ( S0*sy[7] );\n\t\tdy2 = sy[ 5 ] - ( S1*sy[6] );\n\t\tdy3 = sy[ 4 ] - ( S2*sy[5] );\n\t\tdy4 = sy[ 3 ] - ( S3*sy[4] );\n\t\tdy5 = sy[ 2 ] - ( S4*sy[3] );\n\t\tdy6 = sy[ 1 ] - ( S5*sy[2] );\n\t\tdy7 = sy[ 0 ] - ( S6*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx4;\n\t\t\t\t\tiy += dy4;\n\t\t\t\t}\n\t\t\t\tix += dx5;\n\t\t\t\tiy += dy5;\n\t\t\t}\n\t\t\tix += dx6;\n\t\t\tiy += dy6;\n\t\t}\n\t\tix += dx7;\n\t\tiy += dy7;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary8d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a nine-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary9d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction unary9d( x, y, fcn ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 8 ];\n\t\tS1 = sh[ 7 ];\n\t\tS2 = sh[ 6 ];\n\t\tS3 = sh[ 5 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 3 ];\n\t\tS6 = sh[ 2 ];\n\t\tS7 = sh[ 1 ];\n\t\tS8 = sh[ 0 ];\n\t\tdx0 = sx[ 8 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 7 ] - ( S0*sx[8] );\n\t\tdx2 = sx[ 6 ] - ( S1*sx[7] );\n\t\tdx3 = sx[ 5 ] - ( S2*sx[6] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[5] );\n\t\tdx5 = sx[ 3 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 2 ] - ( S5*sx[3] );\n\t\tdx7 = sx[ 1 ] - ( S6*sx[2] );\n\t\tdx8 = sx[ 0 ] - ( S7*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 8 ];\n\t\tdy1 = sy[ 7 ] - ( S0*sy[8] );\n\t\tdy2 = sy[ 6 ] - ( S1*sy[7] );\n\t\tdy3 = sy[ 5 ] - ( S2*sy[6] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[5] );\n\t\tdy5 = sy[ 3 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 2 ] - ( S5*sy[3] );\n\t\tdy7 = sy[ 1 ] - ( S6*sy[2] );\n\t\tdy8 = sy[ 0 ] - ( S7*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t\tdy8 = sy[ 8 ] - ( S7*sy[7] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx5;\n\t\t\t\t\tiy += dy5;\n\t\t\t\t}\n\t\t\t\tix += dx6;\n\t\t\t\tiy += dy6;\n\t\t\t}\n\t\t\tix += dx7;\n\t\t\tiy += dy7;\n\t\t}\n\t\tix += dx8;\n\t\tiy += dy8;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary9d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a ten-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary10d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction unary10d( x, y, fcn ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar dy9;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar S9;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 9 ];\n\t\tS1 = sh[ 8 ];\n\t\tS2 = sh[ 7 ];\n\t\tS3 = sh[ 6 ];\n\t\tS4 = sh[ 5 ];\n\t\tS5 = sh[ 4 ];\n\t\tS6 = sh[ 3 ];\n\t\tS7 = sh[ 2 ];\n\t\tS8 = sh[ 1 ];\n\t\tS9 = sh[ 0 ];\n\t\tdx0 = sx[ 9 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 8 ] - ( S0*sx[9] );\n\t\tdx2 = sx[ 7 ] - ( S1*sx[8] );\n\t\tdx3 = sx[ 6 ] - ( S2*sx[7] );\n\t\tdx4 = sx[ 5 ] - ( S3*sx[6] );\n\t\tdx5 = sx[ 4 ] - ( S4*sx[5] );\n\t\tdx6 = sx[ 3 ] - ( S5*sx[4] );\n\t\tdx7 = sx[ 2 ] - ( S6*sx[3] );\n\t\tdx8 = sx[ 1 ] - ( S7*sx[2] );\n\t\tdx9 = sx[ 0 ] - ( S8*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 9 ];\n\t\tdy1 = sy[ 8 ] - ( S0*sy[9] );\n\t\tdy2 = sy[ 7 ] - ( S1*sy[8] );\n\t\tdy3 = sy[ 6 ] - ( S2*sy[7] );\n\t\tdy4 = sy[ 5 ] - ( S3*sy[6] );\n\t\tdy5 = sy[ 4 ] - ( S4*sy[5] );\n\t\tdy6 = sy[ 3 ] - ( S5*sy[4] );\n\t\tdy7 = sy[ 2 ] - ( S6*sy[3] );\n\t\tdy8 = sy[ 1 ] - ( S7*sy[2] );\n\t\tdy9 = sy[ 0 ] - ( S8*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tS9 = sh[ 9 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] );\n\t\tdx9 = sx[ 9 ] - ( S8*sx[8] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t\tdy8 = sy[ 8 ] - ( S7*sy[7] );\n\t\tdy9 = sy[ 9 ] - ( S8*sy[8] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i9 = 0; i9 < S9; i9++ ) {\n\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx6;\n\t\t\t\t\tiy += dy6;\n\t\t\t\t}\n\t\t\t\tix += dx7;\n\t\t\t\tiy += dy7;\n\t\t\t}\n\t\t\tix += dx8;\n\t\t\tiy += dy8;\n\t\t}\n\t\tix += dx9;\n\t\tiy += dy9;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary10d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar numel = require( './../../../base/numel' );\nvar vind2bind = require( './../../../base/vind2bind' );\n\n\n// VARIABLES //\n\nvar MODE = 'throw';\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in an n-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Float64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unarynd( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0 ]\n*/\nfunction unarynd( x, y, fcn ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar ordx;\n\tvar ordy;\n\tvar len;\n\tvar sh;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i;\n\n\tsh = x.shape;\n\n\t// Compute the total number of elements over which to iterate:\n\tlen = numel( sh );\n\n\t// Cache references to the input and output ndarray data buffers:\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache references to the respective stride arrays:\n\tsx = x.strides;\n\tsy = y.strides;\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays:\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache the respective array orders:\n\tordx = x.order;\n\tordy = y.order;\n\n\t// Iterate over each element based on the linear **view** index, regardless as to how the data is stored in memory...\n\tfor ( i = 0; i < len; i++ ) {\n\t\tix = vind2bind( sh, sx, ox, ordx, i, MODE );\n\t\tiy = vind2bind( sh, sy, oy, ordy, i, MODE );\n\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unarynd;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar iterationOrder = require( './../../../base/iteration-order' );\nvar minmaxViewBufferIndex = require( './../../../base/minmax-view-buffer-index' );\nvar ndarray2object = require( './../../../base/ndarraylike2object' );\nvar blockedaccessorunary2d = require( './2d_blocked_accessors.js' );\nvar blockedaccessorunary3d = require( './3d_blocked_accessors.js' );\nvar blockedaccessorunary4d = require( './4d_blocked_accessors.js' );\nvar blockedaccessorunary5d = require( './5d_blocked_accessors.js' );\nvar blockedaccessorunary6d = require( './6d_blocked_accessors.js' );\nvar blockedaccessorunary7d = require( './7d_blocked_accessors.js' );\nvar blockedaccessorunary8d = require( './8d_blocked_accessors.js' );\nvar blockedaccessorunary9d = require( './9d_blocked_accessors.js' );\nvar blockedaccessorunary10d = require( './10d_blocked_accessors.js' );\nvar blockedunary2d = require( './2d_blocked.js' );\nvar blockedunary3d = require( './3d_blocked.js' );\nvar blockedunary4d = require( './4d_blocked.js' );\nvar blockedunary5d = require( './5d_blocked.js' );\nvar blockedunary6d = require( './6d_blocked.js' );\nvar blockedunary7d = require( './7d_blocked.js' );\nvar blockedunary8d = require( './8d_blocked.js' );\nvar blockedunary9d = require( './9d_blocked.js' );\nvar blockedunary10d = require( './10d_blocked.js' );\nvar accessorunary0d = require( './0d_accessors.js' );\nvar accessorunary1d = require( './1d_accessors.js' );\nvar accessorunary2d = require( './2d_accessors.js' );\nvar accessorunary3d = require( './3d_accessors.js' );\nvar accessorunary4d = require( './4d_accessors.js' );\nvar accessorunary5d = require( './5d_accessors.js' );\nvar accessorunary6d = require( './6d_accessors.js' );\nvar accessorunary7d = require( './7d_accessors.js' );\nvar accessorunary8d = require( './8d_accessors.js' );\nvar accessorunary9d = require( './9d_accessors.js' );\nvar accessorunary10d = require( './10d_accessors.js' );\nvar accessorunarynd = require( './nd_accessors.js' );\nvar unary0d = require( './0d.js' );\nvar unary1d = require( './1d.js' );\nvar unary2d = require( './2d.js' );\nvar unary3d = require( './3d.js' );\nvar unary4d = require( './4d.js' );\nvar unary5d = require( './5d.js' );\nvar unary6d = require( './6d.js' );\nvar unary7d = require( './7d.js' );\nvar unary8d = require( './8d.js' );\nvar unary9d = require( './9d.js' );\nvar unary10d = require( './10d.js' );\nvar unarynd = require( './nd.js' );\n\n\n// VARIABLES //\n\nvar UNARY = [\n\tunary0d,\n\tunary1d,\n\tunary2d,\n\tunary3d,\n\tunary4d,\n\tunary5d,\n\tunary6d,\n\tunary7d,\n\tunary8d,\n\tunary9d,\n\tunary10d\n];\nvar ACCESSOR_UNARY = [\n\taccessorunary0d,\n\taccessorunary1d,\n\taccessorunary2d,\n\taccessorunary3d,\n\taccessorunary4d,\n\taccessorunary5d,\n\taccessorunary6d,\n\taccessorunary7d,\n\taccessorunary8d,\n\taccessorunary9d,\n\taccessorunary10d\n];\nvar BLOCKED_UNARY = [\n\tblockedunary2d, // 0\n\tblockedunary3d,\n\tblockedunary4d,\n\tblockedunary5d,\n\tblockedunary6d,\n\tblockedunary7d,\n\tblockedunary8d,\n\tblockedunary9d,\n\tblockedunary10d // 8\n];\nvar BLOCKED_ACCESSOR_UNARY = [\n\tblockedaccessorunary2d, // 0\n\tblockedaccessorunary3d,\n\tblockedaccessorunary4d,\n\tblockedaccessorunary5d,\n\tblockedaccessorunary6d,\n\tblockedaccessorunary7d,\n\tblockedaccessorunary8d,\n\tblockedaccessorunary9d,\n\tblockedaccessorunary10d // 8\n];\nvar MAX_DIMS = UNARY.length - 1;\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in an input ndarray and assigns results to elements in an output ndarray.\n*\n* ## Notes\n*\n* - Each provided ndarray should be an `object` with the following properties:\n*\n* - **dtype**: data type.\n* - **data**: data buffer.\n* - **shape**: dimensions.\n* - **strides**: stride lengths.\n* - **offset**: index offset.\n* - **order**: specifies whether an ndarray is row-major (C-style) or column major (Fortran-style).\n*\n* @param {ArrayLikeObject} arrays - array-like object containing one input array and one output array\n* @param {Callback} fcn - unary callback\n* @throws {Error} arrays must have the same number of dimensions\n* @throws {Error} arrays must have the same shape\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n* var sy = [ 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary( [ x, y ], scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction unary( arrays, fcn ) {\n\tvar ndims;\n\tvar xmmv;\n\tvar ymmv;\n\tvar shx;\n\tvar shy;\n\tvar iox;\n\tvar ioy;\n\tvar len;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ns;\n\tvar x;\n\tvar y;\n\tvar d;\n\tvar i;\n\n\t// Unpack the ndarrays and standardize ndarray meta data:\n\tx = ndarray2object( arrays[ 0 ] );\n\ty = ndarray2object( arrays[ 1 ] );\n\n\t// Verify that the input and output arrays have the same number of dimensions...\n\tshx = x.shape;\n\tshy = y.shape;\n\tndims = shx.length;\n\tif ( ndims !== shy.length ) {\n\t\tthrow new Error( 'invalid arguments. Arrays must have the same number of dimensions (i.e., same rank). ndims(x) == '+ndims+'. ndims(y) == '+shy.length+'.' );\n\t}\n\t// Determine whether we can avoid iteration altogether...\n\tif ( ndims === 0 ) {\n\t\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\t\treturn ACCESSOR_UNARY[ ndims ]( x, y, fcn );\n\t\t}\n\t\treturn UNARY[ ndims ]( x, y, fcn );\n\t}\n\t// Verify that the input and output arrays have the same dimensions...\n\tlen = 1; // number of elements\n\tns = 0; // number of singleton dimensions\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\td = shx[ i ];\n\t\tif ( d !== shy[ i ] ) {\n\t\t\tthrow new Error( 'invalid arguments. Arrays must have the same shape.' );\n\t\t}\n\t\t// Note that, if one of the dimensions is `0`, the length will be `0`...\n\t\tlen *= d;\n\n\t\t// Check whether the current dimension is a singleton dimension...\n\t\tif ( d === 1 ) {\n\t\t\tns += 1;\n\t\t}\n\t}\n\t// Check whether we were provided empty ndarrays...\n\tif ( len === 0 ) {\n\t\treturn;\n\t}\n\t// Determine whether the ndarrays are one-dimensional and thus readily translate to one-dimensional strided arrays...\n\tif ( ndims === 1 ) {\n\t\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\t\treturn ACCESSOR_UNARY[ ndims ]( x, y, fcn );\n\t\t}\n\t\treturn UNARY[ ndims ]( x, y, fcn );\n\t}\n\tsx = x.strides;\n\tsy = y.strides;\n\n\t// Determine whether the ndarray has only **one** non-singleton dimension (e.g., ndims=4, shape=[10,1,1,1]) so that we can treat the ndarrays as being equivalent to one-dimensional strided arrays...\n\tif ( ns === ndims-1 ) {\n\t\t// Get the index of the non-singleton dimension...\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\tif ( shx[ i ] !== 1 ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tx.shape = [ shx[i] ];\n\t\ty.shape = x.shape;\n\t\tx.strides = [ sx[i] ];\n\t\ty.strides = [ sy[i] ];\n\t\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\t\treturn ACCESSOR_UNARY[ 1 ]( x, y, fcn );\n\t\t}\n\t\treturn UNARY[ 1 ]( x, y, fcn );\n\t}\n\tiox = iterationOrder( sx ); // +/-1\n\tioy = iterationOrder( sy ); // +/-1\n\n\t// Determine whether we can avoid blocked iteration...\n\tif ( iox !== 0 && ioy !== 0 && x.order === y.order ) {\n\t\t// Determine the minimum and maximum linear indices which are accessible by the array views:\n\t\txmmv = minmaxViewBufferIndex( shx, sx, x.offset );\n\t\tymmv = minmaxViewBufferIndex( shy, sy, y.offset );\n\n\t\t// Determine whether we can ignore shape (and strides) and treat the ndarrays as linear one-dimensional strided arrays...\n\t\tif ( len === ( xmmv[1]-xmmv[0]+1 ) && len === ( ymmv[1]-ymmv[0]+1 ) ) {\n\t\t\t// Note: the above is equivalent to @stdlib/ndarray/base/assert/is-contiguous, but in-lined so we can retain computed values...\n\t\t\tif ( iox === 1 ) {\n\t\t\t\tox = xmmv[ 0 ];\n\t\t\t} else {\n\t\t\t\tox = xmmv[ 1 ];\n\t\t\t}\n\t\t\tif ( ioy === 1 ) {\n\t\t\t\toy = ymmv[ 0 ];\n\t\t\t} else {\n\t\t\t\toy = ymmv[ 1 ];\n\t\t\t}\n\t\t\tx.shape = [ len ];\n\t\t\ty.shape = x.shape;\n\t\t\tx.strides = [ iox ];\n\t\t\ty.strides = [ ioy ];\n\t\t\tx.offset = ox;\n\t\t\ty.offset = oy;\n\t\t\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\t\t\treturn ACCESSOR_UNARY[ 1 ]( x, y, fcn );\n\t\t\t}\n\t\t\treturn UNARY[ 1 ]( x, y, fcn );\n\t\t}\n\t\t// At least one ndarray is non-contiguous, so we cannot directly use one-dimensional array functionality...\n\n\t\t// Determine whether we can use simple nested loops...\n\t\tif ( ndims <= MAX_DIMS ) {\n\t\t\t// So long as iteration for each respective array always moves in the same direction (i.e., no mixed sign strides), we can leverage cache-optimal (i.e., normal) nested loops without resorting to blocked iteration...\n\t\t\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\t\t\treturn ACCESSOR_UNARY[ ndims ]( x, y, fcn );\n\t\t\t}\n\t\t\treturn UNARY[ ndims ]( x, y, fcn );\n\t\t}\n\t\t// Fall-through to blocked iteration...\n\t}\n\t// At this point, we're either dealing with non-contiguous n-dimensional arrays, high dimensional n-dimensional arrays, and/or arrays having differing memory layouts, so our only hope is that we can still perform blocked iteration...\n\n\t// Determine whether we can perform blocked iteration...\n\tif ( ndims <= MAX_DIMS ) {\n\t\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\t\treturn BLOCKED_ACCESSOR_UNARY[ ndims-2 ]( x, y, fcn );\n\t\t}\n\t\treturn BLOCKED_UNARY[ ndims-2 ]( x, y, fcn );\n\t}\n\t// Fall-through to linear view iteration without regard for how data is stored in memory (i.e., take the slow path)...\n\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\treturn accessorunarynd( x, y, fcn );\n\t}\n\tunarynd( x, y, fcn );\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Apply a unary callback to elements in an input ndarray and assign results to elements in an output ndarray.\n*\n* @module @stdlib/ndarray/base/unary\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var unary = require( '@stdlib/ndarray/base/unary' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n* var sy = [ 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary( [ x, y ], scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isSafeCast = require( './../../../base/assert/is-safe-data-type-cast' );\nvar isSameKindCast = require( './../../../base/assert/is-same-kind-data-type-cast' );\nvar isFloatingPointDataType = require( './../../../base/assert/is-floating-point-data-type' );\nvar isComplexDataType = require( './../../../base/assert/is-complex-floating-point-data-type' );\nvar isRealDataType = require( './../../../base/assert/is-real-data-type' );\nvar broadcast = require( './../../../base/broadcast-array' );\nvar unary = require( './../../../base/unary' ); // TODO: replace with `@stdlib/ndarray/base/assign` and add native add-on support\nvar identity = require( '@stdlib/utils/identity-function' ); // TODO: remove once use `@stdlib/ndarray/base/assign`\nvar castReturn = require( '@stdlib/complex/base/cast-return' );\nvar complexCtors = require( '@stdlib/complex/ctors' );\nvar slice = require( './../../../base/slice' );\nvar getDType = require( './../../../base/dtype' );\nvar getShape = require( './../../../base/shape' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Assigns element values from a broadcasted input ndarray to corresponding elements in an output ndarray view.\n*\n* @param {ndarray} x - input array\n* @param {ndarray} y - output array\n* @param {MultiSlice} s - multi-slice object for the output array\n* @param {boolean} strict - boolean indicating whether to enforce strict bounds checking\n* @throws {RangeError} number of slice dimensions must match the number of array dimensions\n* @throws {RangeError} slice exceeds array bounds\n* @throws {Error} input array must be broadcast compatible with an output array view\n* @throws {TypeError} input array cannot be safely cast to the output array data type\n* @returns {ndarray} output array\n*\n* @example\n* var Slice = require( '@stdlib/slice/ctor' );\n* var MultiSlice = require( '@stdlib/slice/multi' );\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n* var ndzeros = require( '@stdlib/ndarray/zeros' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n*\n* // Define an input array:\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n* // returns \n*\n* var sh = x.shape;\n* // returns [ 3, 2 ]\n*\n* var arr = ndarray2array( x );\n* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]\n*\n* // Define an output array:\n* var y = ndzeros( [ 2, 3, 2 ], {\n* 'dtype': x.dtype\n* });\n*\n* // Create a slice:\n* var s0 = null;\n* var s1 = new Slice( null, null, -1 );\n* var s2 = new Slice( null, null, -1 );\n* var s = new MultiSlice( s0, s1, s2 );\n* // returns \n*\n* // Perform assignment:\n* var out = sliceAssign( x, y, s, false );\n* // returns \n*\n* var bool = ( out === y );\n* // returns true\n*\n* arr = ndarray2array( y );\n* // returns [ [ [ 6.0, 5.0 ], [ 4.0, 3.0 ], [ 2.0, 1.0 ] ], [ [ 6.0, 5.0 ], [ 4.0, 3.0 ], [ 2.0, 1.0 ] ] ]\n*/\nfunction sliceAssign( x, y, s, strict ) {\n\tvar view;\n\tvar fcn;\n\tvar xdt;\n\tvar ydt;\n\n\txdt = getDType( x );\n\tydt = getDType( y );\n\n\t// Safe casts are always allowed...\n\tif ( isSafeCast( xdt, ydt ) ) {\n\t\t// Check for real-to-complex conversion...\n\t\tif ( isRealDataType( xdt ) && isComplexDataType( ydt ) ) {\n\t\t\t// Need to cast a real number to a complex number:\n\t\t\tfcn = castReturn( identity, 1, complexCtors( ydt ) );\n\t\t} else {\n\t\t\t// Should only be real->real and complex->complex:\n\t\t\tfcn = identity;\n\t\t}\n\t}\n\t// Allow same kind casts (i.e., downcasts) only when the output data type is floating-point...\n\telse if ( isFloatingPointDataType( ydt ) && isSameKindCast( xdt, ydt ) ) {\n\t\t// At this point, we know that the input data type and output data type are of the same \"kind\" (e.g., real->real and complex->complex), and, thus, we don't need to perform any special conversions:\n\t\tfcn = identity;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. Input array values cannot be safely cast to the output array data type. Data types: [%s, %s].', xdt, ydt ) );\n\t}\n\t// Resolve a writable output array view:\n\tview = slice( y, s, strict, true );\n\n\t// Broadcast the input array:\n\tx = broadcast( x, getShape( view, true ) );\n\n\t// Set elements from `x` in `y`:\n\tunary( [ x, view ], fcn );\n\n\t// Return the original output array:\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sliceAssign;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Assign element values from a broadcasted input ndarray to corresponding elements in an output ndarray view.\n*\n* @module @stdlib/ndarray/base/slice-assign\n*\n* @example\n* var Slice = require( '@stdlib/slice/ctor' );\n* var MultiSlice = require( '@stdlib/slice/multi' );\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n* var ndzeros = require( '@stdlib/ndarray/zeros' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n* var sliceAssign = require( '@stdlib/ndarray/base/slice-assign' );\n*\n* // Define an input array:\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n* // returns \n*\n* var sh = x.shape;\n* // returns [ 3, 2 ]\n*\n* var arr = ndarray2array( x );\n* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]\n*\n* // Define an output array:\n* var y = ndzeros( [ 2, 3, 2 ], {\n* 'dtype': x.dtype\n* });\n*\n* // Create a slice:\n* var s0 = null;\n* var s1 = new Slice( null, null, -1 );\n* var s2 = new Slice( null, null, -1 );\n* var s = new MultiSlice( s0, s1, s2 );\n* // returns \n*\n* // Perform assignment:\n* var out = sliceAssign( x, y, s, false );\n* // returns \n*\n* var bool = ( out === y );\n* // returns true\n*\n* arr = ndarray2array( y );\n* // returns [ [ [ 6.0, 5.0 ], [ 4.0, 3.0 ], [ 2.0, 1.0 ] ], [ [ 6.0, 5.0 ], [ 4.0, 3.0 ], [ 2.0, 1.0 ] ] ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar MultiSlice = require( '@stdlib/slice/multi' );\nvar ndims = require( './../../../base/ndims' );\nvar slice = require( './../../../base/slice' );\nvar filled = require( '@stdlib/array/base/filled' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns a view of an input ndarray when sliced along a specified dimension.\n*\n* @param {ndarray} x - input array\n* @param {integer} dim - index of dimension to slice\n* @param {(Slice|integer)} s - slice object or an integer\n* @param {boolean} strict - boolean indicating whether to enforce strict bounds checking\n* @param {boolean} writable - boolean indicating whether a returned array should be writable\n* @throws {TypeError} first argument must be an ndarray having one or more dimensions\n* @throws {RangeError} dimension index exceeds the number of dimensions\n* @throws {RangeError} slice exceeds array bounds\n* @returns {ndarray} ndarray view\n*\n* @example\n* var Slice = require( '@stdlib/slice/ctor' );\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n*\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n* // returns \n*\n* var sh = x.shape;\n* // returns [ 3, 2 ]\n*\n* var arr = ndarray2array( x );\n* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]\n*\n* var s = new Slice( null, null, -1 );\n* // returns \n*\n* var y = sliceDimension( x, 0, s, false, false );\n* // returns \n*\n* sh = y.shape;\n* // returns [ 3, 2 ]\n*\n* arr = ndarray2array( y );\n* // returns [ [ 5.0, 6.0 ], [ 3.0, 4.0 ], [ 1.0, 2.0 ] ]\n*/\nfunction sliceDimension( x, dim, s, strict, writable ) {\n\tvar args;\n\tvar N;\n\tvar d;\n\n\t// Retrieve array meta data:\n\tN = ndims( x );\n\n\t// Check whether we were provided a zero-dimensional array...\n\tif ( N === 0 ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ndarray having one or more dimensions. Number of dimensions: %d.', N ) );\n\t}\n\t// Normalize the dimension index...\n\td = dim;\n\tif ( d < 0 ) {\n\t\td += N;\n\t\tif ( d < 0 ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Dimension index exceeds the number of dimensions. Number of dimensions: %d. Value: `%d`.', N, dim ) );\n\t\t}\n\t} else if ( d >= N ) {\n\t\tthrow new RangeError( format( 'invalid argument. Dimension index exceeds the number of dimensions. Number of dimensions: %d. Value: `%d`.', N, dim ) );\n\t}\n\t// Create a multi-slice object...\n\targs = filled( null, N );\n\targs[ d ] = s;\n\ts = MultiSlice.apply( null, args );\n\n\t// Return a new array view:\n\treturn slice( x, s, strict, writable );\n}\n\n\n// EXPORTS //\n\nmodule.exports = sliceDimension;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a view of an input ndarray when sliced along a specified dimension.\n*\n* @module @stdlib/ndarray/base/slice-dimension\n*\n* @example\n* var Slice = require( '@stdlib/slice/ctor' );\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n* var sliceDimension = require( '@stdlib/ndarray/base/slice-dimension' );\n*\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n* // returns \n*\n* var sh = x.shape;\n* // returns [ 3, 2 ]\n*\n* var arr = ndarray2array( x );\n* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]\n*\n* var s = new Slice( null, null, -1 );\n* // returns \n*\n* var y = sliceDimension( x, 0, s, false, false );\n* // returns \n*\n* sh = y.shape;\n* // returns [ 3, 2 ]\n*\n* arr = ndarray2array( y );\n* // returns [ [ 5.0, 6.0 ], [ 3.0, 4.0 ], [ 1.0, 2.0 ] ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Converts subscripts to a linear index.\n*\n* ## Notes\n*\n* - The function accepts the following \"modes\":\n*\n* - `throw`: throws an error when a subscript exceeds array dimensions.\n* - `wrap`: wrap around subscripts exceeding array dimensions using modulo arithmetic.\n* - `clamp`: set subscripts exceeding array dimensions to either `0` (minimum index) or the maximum index along a particular dimension.\n*\n* - When provided fewer modes than dimensions, the function recycles modes using modulo arithmetic.\n*\n* - When provided a stride array containing negative strides, if an `offset` is greater than `0`, the function treats subscripts as mapping to a linear index in an underlying data buffer for the array, thus returning a linear index from the perspective of that buffer. If an `offset` is equal to `0`, the function treats subscripts as mapping to a linear index in an array view, thus returning a linear index from the perspective of that view.\n*\n* ```text\n* Dims: 2x2\n* Buffer: [ 1, 2, 3, 4 ]\n*\n* View = [ a00, a01,\n* a10, a11 ]\n*\n* Strides: 2,1\n* Offset: 0\n*\n* View = [ 1, 2,\n* 3, 4 ]\n*\n* Strides: 2,-1\n* Offset: 1\n*\n* View = [ 2, 1,\n* 4, 3 ]\n*\n* Strides: -2,1\n* Offset: 2\n*\n* View = [ 3, 4,\n* 1, 2 ]\n*\n* Strides: -2,-1\n* Offset: 3\n*\n* View = [ 4, 3,\n* 2, 1 ]\n* ```\n*\n* ```javascript\n* var shape = [ 2, 2 ];\n* var strides = [ -2, 1 ];\n* var offset = 2;\n* var mode = [ 'throw' ];\n*\n* // From the perspective of a view...\n* var idx = sub2ind( shape, strides, 0, 0, 0, mode );\n* // returns 0\n*\n* idx = sub2ind( shape, strides, 0, 0, 1, mode );\n* // returns 1\n*\n* idx = sub2ind( shape, strides, 0, 1, 0, mode );\n* // returns 2\n*\n* idx = sub2ind( shape, strides, 0, 1, 1, mode );\n* // returns 3\n*\n* // From the perspective of an underlying buffer...\n* idx = sub2ind( shape, strides, offset, 0, 0, mode );\n* // returns 2\n*\n* idx = sub2ind( shape, strides, offset, 0, 1, mode );\n* // returns 3\n*\n* idx = sub2ind( shape, strides, offset, 1, 0, mode );\n* // returns 0\n*\n* idx = sub2ind( shape, strides, offset, 1, 1, mode );\n* // returns 1\n* ```\n*\n* In short, from the perspective of a view, view data is always ordered.\n*\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - location of the first indexed value **based** on the stride array\n* @param {...integer} i - subscripts\n* @param {StringArray} mode - specifies how to handle subscripts which exceed array dimensions\n* @throws {RangeError} must provide subscripts which do not exceed array dimensions\n* @returns {NonNegativeInteger} linear index\n*\n* @example\n* var shape = [ 3, 3, 3 ];\n* var strides = [ 9, 3, 1 ];\n* var offset = 0;\n* var mode = [ 'throw' ]\n*\n* var idx = sub2ind( shape, strides, offset, 1, 2, 2, mode );\n* // returns 17\n*/\nfunction sub2ind() {\n\tvar strides;\n\tvar offset;\n\tvar nmodes;\n\tvar shape;\n\tvar ndims;\n\tvar modes;\n\tvar mode;\n\tvar idx;\n\tvar m;\n\tvar s;\n\tvar j;\n\tvar i;\n\n\tshape = arguments[ 0 ];\n\tstrides = arguments[ 1 ];\n\toffset = arguments[ 2 ];\n\tndims = shape.length;\n\tmodes = arguments[ 3+ndims ]; // last argument\n\tnmodes = modes.length;\n\tidx = offset;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tm = shape[ i ];\n\t\tj = arguments[ i+3 ];\n\t\tmode = modes[ i%nmodes ];\n\t\tif ( mode === 'clamp' ) {\n\t\t\tif ( j < 0 ) {\n\t\t\t\tj = 0;\n\t\t\t} else if ( j >= m ) {\n\t\t\t\tj = m - 1;\n\t\t\t}\n\t\t} else if ( mode === 'wrap' ) {\n\t\t\tif ( j < 0 ) {\n\t\t\t\tj += m; // slight optimization to avoid modulo arithmetic when |j| <= m\n\t\t\t\tif ( j < 0 ) {\n\t\t\t\t\tj %= m;\n\t\t\t\t\tif ( j !== 0 ) {\n\t\t\t\t\t\tj += m;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if ( j >= m ) {\n\t\t\t\tj -= m; // slight optimization to avoid modulo arithmetic when m < j <= 2m\n\t\t\t\tif ( j >= m ) {\n\t\t\t\t\tj %= m;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( j < 0 || j >= m ) { // mode === 'throw'\n\t\t\tthrow new RangeError( format( 'invalid argument. Subscripts must not exceed array dimensions. Subscript: `%u`. Value: `%d`.', i, j ) );\n\t\t}\n\t\ts = strides[ i ];\n\n\t\t// Check if array view...\n\t\tif ( s < 0 && offset === 0 ) {\n\t\t\tidx -= j * s; // increments idx\n\t\t} else {\n\t\t\tidx += j * s; // may increment or decrement idx\n\t\t}\n\t}\n\treturn idx;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sub2ind;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert subscripts to a linear index.\n*\n* @module @stdlib/ndarray/base/sub2ind\n*\n* @example\n* var sub2ind = require( '@stdlib/ndarray/base/sub2ind' );\n*\n* var shape = [ 3, 3, 3 ];\n* var strides = [ 9, 3, 1 ];\n* var offset = 0;\n* var mode = [ 'throw' ];\n*\n* var idx = sub2ind( shape, strides, offset, 1, 2, 2, mode );\n* // returns 17\n*/\n\n// MODULES //\n\nvar sub2ind = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = sub2ind;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Recursively converts an ndarray to a generic array.\n*\n* @private\n* @param {Object} obj - array object\n* @param {(ArrayLikeObject|TypedArray|Buffer)} obj.data - data buffer\n* @param {Array} obj.accessors - element accessors\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - array strides\n* @param {NonNegativeInteger} offset - index offset\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {NonNegativeInteger} dim - dimension\n* @returns {(Array|Array)} output array\n*/\nfunction recurse( obj, shape, strides, offset, order, dim ) {\n\tvar stride;\n\tvar item;\n\tvar out;\n\tvar n;\n\tvar i;\n\n\tif ( dim >= shape.length ) {\n\t\treturn obj.accessors[ 0 ]( obj.data, offset );\n\t}\n\tout = [];\n\n\tn = shape[ dim ];\n\tstride = strides[ dim ];\n\n\tfor ( i = 0; i < n; i++ ) {\n\t\titem = recurse( obj, shape, strides, offset, order, dim+1 );\n\t\tout.push( item );\n\t\toffset += stride;\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = recurse;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar arraylike2object = require( '@stdlib/array/base/arraylike2object' );\nvar recurse = require( './recurse.js' );\n\n\n// MAIN //\n\n/**\n* Converts an ndarray buffer to a generic array (which may include nested arrays).\n*\n* @param {(ArrayLikeObject|TypedArray|Buffer)} buffer - data buffer\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - array strides\n* @param {NonNegativeInteger} offset - index offset\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @returns {(EmptyArray|Array|Array)} array (which may include nested arrays)\n*\n* @example\n* var buffer = [ 1, 2, 3, 4 ];\n* var shape = [ 2, 2 ];\n* var order = 'row-major';\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var out = ndarray2array( buffer, shape, strides, offset, order );\n* // returns [ [ 1, 2 ], [ 3, 4 ] ]\n*/\nfunction ndarray2array( buffer, shape, strides, offset, order ) {\n\tvar i;\n\tif ( shape.length === 0 ) {\n\t\treturn [];\n\t}\n\tfor ( i = 0; i < shape.length; i++ ) {\n\t\tif ( shape[ i ] === 0 ) {\n\t\t\treturn [];\n\t\t}\n\t}\n\treturn recurse( arraylike2object( buffer ), shape, strides, offset, order, 0 ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = ndarray2array;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert an ndarray buffer to a generic array (which may include nested arrays).\n*\n* @module @stdlib/ndarray/base/to-array\n*\n* @example\n* var ndarray2array = require( '@stdlib/ndarray/base/to-array' );\n*\n* var buffer = [ 1, 2, 3, 4 ];\n* var shape = [ 2, 2 ];\n* var order = 'row-major';\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var out = ndarray2array( buffer, shape, strides, offset, order );\n* // returns [ [ 1, 2 ], [ 3, 4 ] ]\n*/\n\n// MODULES //\n\nvar ndarray2array = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = ndarray2array;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar strides2offset = require( './../../../base/strides2offset' );\nvar getDType = require( './../../../base/dtype' );\nvar getShape = require( './../../../base/shape' );\nvar getStrides = require( './../../../base/strides' );\nvar getOrder = require( './../../../base/order' );\nvar getData = require( './../../../base/data-buffer' );\n\n\n// MAIN //\n\n/**\n* Transpose a matrix (or a stack of matrices).\n*\n* @param {ndarray} x - input array\n* @throws {Error} must provide an array with two or more dimensions\n* @returns {ndarray} ndarray\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] );\n* // returns \n*\n* var sh = x.shape;\n* // returns [ 2, 3 ]\n*\n* var y = transpose( x );\n* // returns \n*\n* sh = y.shape;\n* // returns [ 3, 2 ]\n*\n* var bool = ( x.data === y.data );\n* // returns true\n*\n* bool = ( x.get( 0, 1 ) === y.get( 1, 0 ) );\n* // returns true\n*/\nfunction transpose( x ) {\n\tvar tmp;\n\tvar sh;\n\tvar st;\n\tvar N;\n\n\tsh = getShape( x, true );\n\tN = sh.length;\n\tif ( N < 2 ) {\n\t\tthrow new Error( 'invalid argument. Must provide an ndarray having two or more dimensions.' );\n\t}\n\tst = getStrides( x, true );\n\n\ttmp = sh[ N-2 ];\n\tsh[ N-2 ] = sh[ N-1 ];\n\tsh[ N-1 ] = tmp;\n\n\ttmp = st[ N-2 ];\n\tst[ N-2 ] = st[ N-1 ];\n\tst[ N-1 ] = tmp;\n\n\t// FIXME: handling of offset seems incorrect. Should also handle READ-ONLY arrays.\n\treturn new x.constructor( getDType( x ), getData( x ), sh, st, strides2offset( sh, st ), getOrder( x ) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = transpose;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Transpose a matrix (or a stack of matrices).\n*\n* @module @stdlib/ndarray/base/transpose\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var transpose = require( '@stdlib/ndarray/base/transpose' );\n*\n* var x = array( [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] );\n* // returns \n*\n* var sh = x.shape;\n* // returns [ 2, 3 ]\n*\n* var y = transpose( x );\n* // returns \n*\n* sh = y.shape;\n* // returns [ 3, 2 ]\n*\n* var bool = ( x.data === y.data );\n* // returns true\n*\n* bool = ( x.get( 0, 1 ) === y.get( 1, 0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a two-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary2d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary2d( x, y, fcn, clbk, thisArg ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dy0;\n\tvar dy1;\n\tvar ox1;\n\tvar oy1;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar j0;\n\tvar j1;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\tif ( j1 < bsize ) {\n\t\t\ts1 = j1;\n\t\t\tj1 = 0;\n\t\t} else {\n\t\t\ts1 = bsize;\n\t\t\tj1 -= bsize;\n\t\t}\n\t\tox1 = ox + ( j1*sx[1] );\n\t\toy1 = oy + ( j1*sy[1] );\n\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\tif ( j0 < bsize ) {\n\t\t\t\ts0 = j0;\n\t\t\t\tj0 = 0;\n\t\t\t} else {\n\t\t\t\ts0 = bsize;\n\t\t\t\tj0 -= bsize;\n\t\t\t}\n\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t// Compute loop offset increments...\n\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t// Iterate over the ndarray dimensions...\n\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t\t\t}\n\t\t\t\t\tix += dx0;\n\t\t\t\t\tiy += dy0;\n\t\t\t\t\ti += 1;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t\tiy += dy1;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary2d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a three-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 1 ];\n* var sy = [ 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary3d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary3d( x, y, fcn, clbk, thisArg ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar ox1;\n\tvar ox2;\n\tvar oy1;\n\tvar oy2;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\tif ( j2 < bsize ) {\n\t\t\ts2 = j2;\n\t\t\tj2 = 0;\n\t\t} else {\n\t\t\ts2 = bsize;\n\t\t\tj2 -= bsize;\n\t\t}\n\t\tox2 = ox + ( j2*sx[2] );\n\t\toy2 = oy + ( j2*sy[2] );\n\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\tif ( j1 < bsize ) {\n\t\t\t\ts1 = j1;\n\t\t\t\tj1 = 0;\n\t\t\t} else {\n\t\t\t\ts1 = bsize;\n\t\t\t\tj1 -= bsize;\n\t\t\t}\n\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\ts0 = j0;\n\t\t\t\t\tj0 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts0 = bsize;\n\t\t\t\t\tj0 -= bsize;\n\t\t\t\t}\n\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t// Compute loop offset increments...\n\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t\tiy += dy2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary3d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a four-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary4d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary4d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\tif ( j3 < bsize ) {\n\t\t\ts3 = j3;\n\t\t\tj3 = 0;\n\t\t} else {\n\t\t\ts3 = bsize;\n\t\t\tj3 -= bsize;\n\t\t}\n\t\tox3 = ox + ( j3*sx[3] );\n\t\toy3 = oy + ( j3*sy[3] );\n\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\tif ( j2 < bsize ) {\n\t\t\t\ts2 = j2;\n\t\t\t\tj2 = 0;\n\t\t\t} else {\n\t\t\t\ts2 = bsize;\n\t\t\t\tj2 -= bsize;\n\t\t\t}\n\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\ts1 = j1;\n\t\t\t\t\tj1 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts1 = bsize;\n\t\t\t\t\tj1 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary4d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a five-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary5d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary5d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\tif ( j4 < bsize ) {\n\t\t\ts4 = j4;\n\t\t\tj4 = 0;\n\t\t} else {\n\t\t\ts4 = bsize;\n\t\t\tj4 -= bsize;\n\t\t}\n\t\tox4 = ox + ( j4*sx[4] );\n\t\toy4 = oy + ( j4*sy[4] );\n\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\tif ( j3 < bsize ) {\n\t\t\t\ts3 = j3;\n\t\t\t\tj3 = 0;\n\t\t\t} else {\n\t\t\t\ts3 = bsize;\n\t\t\t\tj3 -= bsize;\n\t\t\t}\n\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\ts2 = j2;\n\t\t\t\t\tj2 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts2 = bsize;\n\t\t\t\t\tj2 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary5d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a six-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary6d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary6d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\tif ( j5 < bsize ) {\n\t\t\ts5 = j5;\n\t\t\tj5 = 0;\n\t\t} else {\n\t\t\ts5 = bsize;\n\t\t\tj5 -= bsize;\n\t\t}\n\t\tox5 = ox + ( j5*sx[5] );\n\t\toy5 = oy + ( j5*sy[5] );\n\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\tif ( j4 < bsize ) {\n\t\t\t\ts4 = j4;\n\t\t\t\tj4 = 0;\n\t\t\t} else {\n\t\t\t\ts4 = bsize;\n\t\t\t\tj4 -= bsize;\n\t\t\t}\n\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\ts3 = j3;\n\t\t\t\t\tj3 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts3 = bsize;\n\t\t\t\t\tj3 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary6d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a seven-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var real = require( '@stdlib/complex/real' );\n* var imag = require( '@stdlib/complex/imag' );\n*\n* function scale( z ) {\n* return new Complex64( real(z)*10.0, imag(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary7d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = real( v );\n* // returns 10.0\n*\n* var im = imag( v );\n* // returns 20.0\n*/\nfunction blockedunary7d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\tif ( j6 < bsize ) {\n\t\t\ts6 = j6;\n\t\t\tj6 = 0;\n\t\t} else {\n\t\t\ts6 = bsize;\n\t\t\tj6 -= bsize;\n\t\t}\n\t\tox6 = ox + ( j6*sx[6] );\n\t\toy6 = oy + ( j6*sy[6] );\n\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\tif ( j5 < bsize ) {\n\t\t\t\ts5 = j5;\n\t\t\t\tj5 = 0;\n\t\t\t} else {\n\t\t\t\ts5 = bsize;\n\t\t\t\tj5 -= bsize;\n\t\t\t}\n\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\tdy6 = sy[6] - ( s5*sy[5] );\n\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\ts4 = j4;\n\t\t\t\t\tj4 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts4 = bsize;\n\t\t\t\t\tj4 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary7d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from an eight-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary8d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary8d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\tif ( j7 < bsize ) {\n\t\t\ts7 = j7;\n\t\t\tj7 = 0;\n\t\t} else {\n\t\t\ts7 = bsize;\n\t\t\tj7 -= bsize;\n\t\t}\n\t\tox7 = ox + ( j7*sx[7] );\n\t\toy7 = oy + ( j7*sy[7] );\n\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\tif ( j6 < bsize ) {\n\t\t\t\ts6 = j6;\n\t\t\t\tj6 = 0;\n\t\t\t} else {\n\t\t\t\ts6 = bsize;\n\t\t\t\tj6 -= bsize;\n\t\t\t}\n\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\tdy7 = sy[7] - ( s6*sy[6] );\n\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\ts5 = j5;\n\t\t\t\t\tj5 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts5 = bsize;\n\t\t\t\t\tj5 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\tdy6 = sy[6] - ( s5*sy[5] );\n\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\tiy += dy7;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary8d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a nine-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary9d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary9d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar oy8;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\tif ( j8 < bsize ) {\n\t\t\ts8 = j8;\n\t\t\tj8 = 0;\n\t\t} else {\n\t\t\ts8 = bsize;\n\t\t\tj8 -= bsize;\n\t\t}\n\t\tox8 = ox + ( j8*sx[8] );\n\t\toy8 = oy + ( j8*sy[8] );\n\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\tif ( j7 < bsize ) {\n\t\t\t\ts7 = j7;\n\t\t\t\tj7 = 0;\n\t\t\t} else {\n\t\t\t\ts7 = bsize;\n\t\t\t\tj7 -= bsize;\n\t\t\t}\n\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\tdy8 = sy[8] - ( s7*sy[7] );\n\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\toy7 = oy8 + ( j7*sy[7] );\n\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\ts6 = j6;\n\t\t\t\t\tj6 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts6 = bsize;\n\t\t\t\t\tj6 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\tdy7 = sy[7] - ( s6*sy[6] );\n\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\tdy6 = sy[6] - ( s5*sy[5] );\n\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t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\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy7;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx8;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy8;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary9d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a ten-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary10d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary10d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar dy9;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar ox9;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar oy8;\n\tvar oy9;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar s9;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar j9;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j9 = sh[9]; j9 > 0; ) {\n\t\tif ( j9 < bsize ) {\n\t\t\ts9 = j9;\n\t\t\tj9 = 0;\n\t\t} else {\n\t\t\ts9 = bsize;\n\t\t\tj9 -= bsize;\n\t\t}\n\t\tox9 = ox + ( j9*sx[9] );\n\t\toy9 = oy + ( j9*sy[9] );\n\t\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\t\tif ( j8 < bsize ) {\n\t\t\t\ts8 = j8;\n\t\t\t\tj8 = 0;\n\t\t\t} else {\n\t\t\t\ts8 = bsize;\n\t\t\t\tj8 -= bsize;\n\t\t\t}\n\t\t\tdx9 = sx[9] - ( s8*sx[8] );\n\t\t\tdy9 = sy[9] - ( s8*sy[8] );\n\t\t\tox8 = ox9 + ( j8*sx[8] );\n\t\t\toy8 = oy9 + ( j8*sy[8] );\n\t\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\t\tif ( j7 < bsize ) {\n\t\t\t\t\ts7 = j7;\n\t\t\t\t\tj7 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts7 = bsize;\n\t\t\t\t\tj7 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\t\tdy8 = sy[8] - ( s7*sy[7] );\n\t\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\t\toy7 = oy8 + ( j7*sy[7] );\n\t\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\t\ts6 = j6;\n\t\t\t\t\t\tj6 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts6 = bsize;\n\t\t\t\t\t\tj6 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\t\tdy7 = sy[7] - ( s6*sy[6] );\n\t\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\t\tdy6 = sy[6] - ( s5*sy[5] );\n\t\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\t\tfor ( i9 = 0; i9 < s9; i9++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t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\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary10d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a two-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Float64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary2d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0 ]\n*/\nfunction blockedunary2d( x, y, fcn, clbk, thisArg ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dy0;\n\tvar dy1;\n\tvar ox1;\n\tvar oy1;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar j0;\n\tvar j1;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\tif ( j1 < bsize ) {\n\t\t\ts1 = j1;\n\t\t\tj1 = 0;\n\t\t} else {\n\t\t\ts1 = bsize;\n\t\t\tj1 -= bsize;\n\t\t}\n\t\tox1 = ox + ( j1*sx[1] );\n\t\toy1 = oy + ( j1*sy[1] );\n\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\tif ( j0 < bsize ) {\n\t\t\t\ts0 = j0;\n\t\t\t\tj0 = 0;\n\t\t\t} else {\n\t\t\t\ts0 = bsize;\n\t\t\t\tj0 -= bsize;\n\t\t\t}\n\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t// Compute loop offset increments...\n\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t// Iterate over the ndarray dimensions...\n\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\tybuf[ iy ] = fcn( v );\n\t\t\t\t\t}\n\t\t\t\t\tix += dx0;\n\t\t\t\t\tiy += dy0;\n\t\t\t\t\ti += 1;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t\tiy += dy1;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary2d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a three-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n* var sy = [ 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary3d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction blockedunary3d( x, y, fcn, clbk, thisArg ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar ox1;\n\tvar ox2;\n\tvar oy1;\n\tvar oy2;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\tif ( j2 < bsize ) {\n\t\t\ts2 = j2;\n\t\t\tj2 = 0;\n\t\t} else {\n\t\t\ts2 = bsize;\n\t\t\tj2 -= bsize;\n\t\t}\n\t\tox2 = ox + ( j2*sx[2] );\n\t\toy2 = oy + ( j2*sy[2] );\n\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\tif ( j1 < bsize ) {\n\t\t\t\ts1 = j1;\n\t\t\t\tj1 = 0;\n\t\t\t} else {\n\t\t\t\ts1 = bsize;\n\t\t\t\tj1 -= bsize;\n\t\t\t}\n\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\ts0 = j0;\n\t\t\t\t\tj0 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts0 = bsize;\n\t\t\t\t\tj0 -= bsize;\n\t\t\t\t}\n\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t// Compute loop offset increments...\n\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( v );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t\tiy += dy2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary3d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a four-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 4, 1 ];\n* var sy = [ 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary4d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction blockedunary4d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\tif ( j3 < bsize ) {\n\t\t\ts3 = j3;\n\t\t\tj3 = 0;\n\t\t} else {\n\t\t\ts3 = bsize;\n\t\t\tj3 -= bsize;\n\t\t}\n\t\tox3 = ox + ( j3*sx[3] );\n\t\toy3 = oy + ( j3*sy[3] );\n\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\tif ( j2 < bsize ) {\n\t\t\t\ts2 = j2;\n\t\t\t\tj2 = 0;\n\t\t\t} else {\n\t\t\t\ts2 = bsize;\n\t\t\t\tj2 -= bsize;\n\t\t\t}\n\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\ts1 = j1;\n\t\t\t\t\tj1 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts1 = bsize;\n\t\t\t\t\tj1 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( v );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary4d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a five-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary5d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction blockedunary5d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\tif ( j4 < bsize ) {\n\t\t\ts4 = j4;\n\t\t\tj4 = 0;\n\t\t} else {\n\t\t\ts4 = bsize;\n\t\t\tj4 -= bsize;\n\t\t}\n\t\tox4 = ox + ( j4*sx[4] );\n\t\toy4 = oy + ( j4*sy[4] );\n\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\tif ( j3 < bsize ) {\n\t\t\t\ts3 = j3;\n\t\t\t\tj3 = 0;\n\t\t\t} else {\n\t\t\t\ts3 = bsize;\n\t\t\t\tj3 -= bsize;\n\t\t\t}\n\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\ts2 = j2;\n\t\t\t\t\tj2 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts2 = bsize;\n\t\t\t\t\tj2 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( v );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary5d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a six-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary6d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction blockedunary6d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\tif ( j5 < bsize ) {\n\t\t\ts5 = j5;\n\t\t\tj5 = 0;\n\t\t} else {\n\t\t\ts5 = bsize;\n\t\t\tj5 -= bsize;\n\t\t}\n\t\tox5 = ox + ( j5*sx[5] );\n\t\toy5 = oy + ( j5*sy[5] );\n\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\tif ( j4 < bsize ) {\n\t\t\t\ts4 = j4;\n\t\t\t\tj4 = 0;\n\t\t\t} else {\n\t\t\t\ts4 = bsize;\n\t\t\t\tj4 -= bsize;\n\t\t\t}\n\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\ts3 = j3;\n\t\t\t\t\tj3 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts3 = bsize;\n\t\t\t\t\tj3 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( v );\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary6d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a seven-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary7d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction blockedunary7d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\tif ( j6 < bsize ) {\n\t\t\ts6 = j6;\n\t\t\tj6 = 0;\n\t\t} else {\n\t\t\ts6 = bsize;\n\t\t\tj6 -= bsize;\n\t\t}\n\t\tox6 = ox + ( j6*sx[6] );\n\t\toy6 = oy + ( j6*sy[6] );\n\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\tif ( j5 < bsize ) {\n\t\t\t\ts5 = j5;\n\t\t\t\tj5 = 0;\n\t\t\t} else {\n\t\t\t\ts5 = bsize;\n\t\t\t\tj5 -= bsize;\n\t\t\t}\n\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\tdy6 = sy[6] - ( s5*sy[5] );\n\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\ts4 = j4;\n\t\t\t\t\tj4 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts4 = bsize;\n\t\t\t\t\tj4 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( v );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary7d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from an eight-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary8d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction blockedunary8d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\tif ( j7 < bsize ) {\n\t\t\ts7 = j7;\n\t\t\tj7 = 0;\n\t\t} else {\n\t\t\ts7 = bsize;\n\t\t\tj7 -= bsize;\n\t\t}\n\t\tox7 = ox + ( j7*sx[7] );\n\t\toy7 = oy + ( j7*sy[7] );\n\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\tif ( j6 < bsize ) {\n\t\t\t\ts6 = j6;\n\t\t\t\tj6 = 0;\n\t\t\t} else {\n\t\t\t\ts6 = bsize;\n\t\t\t\tj6 -= bsize;\n\t\t\t}\n\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\tdy7 = sy[7] - ( s6*sy[6] );\n\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\ts5 = j5;\n\t\t\t\t\tj5 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts5 = bsize;\n\t\t\t\t\tj5 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\tdy6 = sy[6] - ( s5*sy[5] );\n\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\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\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\tiy += dy7;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary8d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a nine-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary9d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction blockedunary9d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar oy8;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\tif ( j8 < bsize ) {\n\t\t\ts8 = j8;\n\t\t\tj8 = 0;\n\t\t} else {\n\t\t\ts8 = bsize;\n\t\t\tj8 -= bsize;\n\t\t}\n\t\tox8 = ox + ( j8*sx[8] );\n\t\toy8 = oy + ( j8*sy[8] );\n\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\tif ( j7 < bsize ) {\n\t\t\t\ts7 = j7;\n\t\t\t\tj7 = 0;\n\t\t\t} else {\n\t\t\t\ts7 = bsize;\n\t\t\t\tj7 -= bsize;\n\t\t\t}\n\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\tdy8 = sy[8] - ( s7*sy[7] );\n\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\toy7 = oy8 + ( j7*sy[7] );\n\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\ts6 = j6;\n\t\t\t\t\tj6 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts6 = bsize;\n\t\t\t\t\tj6 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\tdy7 = sy[7] - ( s6*sy[6] );\n\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\tdy6 = sy[6] - ( s5*sy[5] );\n\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( v );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy7;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx8;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy8;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary9d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a ten-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary10d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction blockedunary10d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar dy9;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar ox9;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar oy8;\n\tvar oy9;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar s9;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar j9;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j9 = sh[9]; j9 > 0; ) {\n\t\tif ( j9 < bsize ) {\n\t\t\ts9 = j9;\n\t\t\tj9 = 0;\n\t\t} else {\n\t\t\ts9 = bsize;\n\t\t\tj9 -= bsize;\n\t\t}\n\t\tox9 = ox + ( j9*sx[9] );\n\t\toy9 = oy + ( j9*sy[9] );\n\t\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\t\tif ( j8 < bsize ) {\n\t\t\t\ts8 = j8;\n\t\t\t\tj8 = 0;\n\t\t\t} else {\n\t\t\t\ts8 = bsize;\n\t\t\t\tj8 -= bsize;\n\t\t\t}\n\t\t\tdx9 = sx[9] - ( s8*sx[8] );\n\t\t\tdy9 = sy[9] - ( s8*sy[8] );\n\t\t\tox8 = ox9 + ( j8*sx[8] );\n\t\t\toy8 = oy9 + ( j8*sy[8] );\n\t\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\t\tif ( j7 < bsize ) {\n\t\t\t\t\ts7 = j7;\n\t\t\t\t\tj7 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts7 = bsize;\n\t\t\t\t\tj7 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\t\tdy8 = sy[8] - ( s7*sy[7] );\n\t\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\t\toy7 = oy8 + ( j7*sy[7] );\n\t\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\t\ts6 = j6;\n\t\t\t\t\t\tj6 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts6 = bsize;\n\t\t\t\t\t\tj6 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\t\tdy7 = sy[7] - ( s6*sy[6] );\n\t\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\t\tdy6 = sy[6] - ( s5*sy[5] );\n\t\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\t\tfor ( i9 = 0; i9 < s9; i9++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ )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t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary10d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a zero-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0 ] );\n* var ybuf = new Complex64Array( 2 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [];\n*\n* // Define the array strides:\n* var sx = [ 0 ];\n* var sy = [ 0 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary0d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 30.0\n*\n* var im = imagf( v );\n* // returns 40.0\n*/\nfunction unary0d( x, y, fcn, clbk, thisArg ) {\n\tvar ox = x.offset;\n\tvar oy = y.offset;\n\tvar v = clbk.call( thisArg, x.accessors[ 0 ]( x.data, ox ), 0, [ ox, oy ], [ x, y ] ); // eslint-disable-line max-len\n\tif ( v !== void 0 ) {\n\t\ty.accessors[ 1 ]( y.data, oy, fcn( v ) );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary0d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a one-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 4 ];\n*\n* // Define the array strides:\n* var sx = [ 1 ];\n* var sy = [ 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary1d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary1d( x, y, fcn, clbk, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dy0;\n\tvar S0;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables: dimensions and loop offset (pointer) increments...\n\tS0 = x.shape[ 0 ];\n\tdx0 = x.strides[ 0 ];\n\tdy0 = y.strides[ 0 ];\n\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\tif ( v !== void 0 ) {\n\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t}\n\t\tix += dx0;\n\t\tiy += dy0;\n\t\ti += 1;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary1d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a two-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary2d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary2d( x, y, fcn, clbk, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dy0;\n\tvar dy1;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 1 ];\n\t\tS1 = sh[ 0 ];\n\t\tdx0 = sx[ 1 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 0 ] - ( S0*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 1 ];\n\t\tdy1 = sy[ 0 ] - ( S0*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\tif ( v !== void 0 ) {\n\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t}\n\t\t\tix += dx0;\n\t\t\tiy += dy0;\n\t\t\ti += 1;\n\t\t}\n\t\tix += dx1;\n\t\tiy += dy1;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary2d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-len */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a three-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 1 ];\n* var sy = [ 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary3d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary3d( x, y, fcn, clbk, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 2 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 0 ];\n\t\tdx0 = sx[ 2 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[2] );\n\t\tdx2 = sx[ 0 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 2 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[2] );\n\t\tdy2 = sy[ 0 ] - ( S1*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t\t}\n\t\t\t\tix += dx0;\n\t\t\t\tiy += dy0;\n\t\t\t\ti += 1;\n\t\t\t}\n\t\t\tix += dx1;\n\t\t\tiy += dy1;\n\t\t}\n\t\tix += dx2;\n\t\tiy += dy2;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary3d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-len */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a four-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary4d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary4d( x, y, fcn, clbk, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 3 ];\n\t\tS1 = sh[ 2 ];\n\t\tS2 = sh[ 1 ];\n\t\tS3 = sh[ 0 ];\n\t\tdx0 = sx[ 3 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 2 ] - ( S0*sx[3] );\n\t\tdx2 = sx[ 1 ] - ( S1*sx[2] );\n\t\tdx3 = sx[ 0 ] - ( S2*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 3 ];\n\t\tdy1 = sy[ 2 ] - ( S0*sy[3] );\n\t\tdy2 = sy[ 1 ] - ( S1*sy[2] );\n\t\tdy3 = sy[ 0 ] - ( S2*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t\t\t}\n\t\t\t\t\tix += dx0;\n\t\t\t\t\tiy += dy0;\n\t\t\t\t\ti += 1;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t\tiy += dy1;\n\t\t\t}\n\t\t\tix += dx2;\n\t\t\tiy += dy2;\n\t\t}\n\t\tix += dx3;\n\t\tiy += dy3;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary4d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a five-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary5d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary5d( x, y, fcn, clbk, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 4 ];\n\t\tS1 = sh[ 3 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 1 ];\n\t\tS4 = sh[ 0 ];\n\t\tdx0 = sx[ 4 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 3 ] - ( S0*sx[4] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[3] );\n\t\tdx3 = sx[ 1 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 0 ] - ( S3*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 4 ];\n\t\tdy1 = sy[ 3 ] - ( S0*sy[4] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[3] );\n\t\tdy3 = sy[ 1 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 0 ] - ( S3*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\ti += 1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx1;\n\t\t\t\t\tiy += dy1;\n\t\t\t\t}\n\t\t\t\tix += dx2;\n\t\t\t\tiy += dy2;\n\t\t\t}\n\t\t\tix += dx3;\n\t\t\tiy += dy3;\n\t\t}\n\t\tix += dx4;\n\t\tiy += dy4;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary5d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a six-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary6d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary6d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 5 ];\n\t\tS1 = sh[ 4 ];\n\t\tS2 = sh[ 3 ];\n\t\tS3 = sh[ 2 ];\n\t\tS4 = sh[ 1 ];\n\t\tS5 = sh[ 0 ];\n\t\tdx0 = sx[ 5 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 4 ] - ( S0*sx[5] );\n\t\tdx2 = sx[ 3 ] - ( S1*sx[4] );\n\t\tdx3 = sx[ 2 ] - ( S2*sx[3] );\n\t\tdx4 = sx[ 1 ] - ( S3*sx[2] );\n\t\tdx5 = sx[ 0 ] - ( S4*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 5 ];\n\t\tdy1 = sy[ 4 ] - ( S0*sy[5] );\n\t\tdy2 = sy[ 3 ] - ( S1*sy[4] );\n\t\tdy3 = sy[ 2 ] - ( S2*sy[3] );\n\t\tdy4 = sy[ 1 ] - ( S3*sy[2] );\n\t\tdy5 = sy[ 0 ] - ( S4*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t\tiy += dy2;\n\t\t\t\t}\n\t\t\t\tix += dx3;\n\t\t\t\tiy += dy3;\n\t\t\t}\n\t\t\tix += dx4;\n\t\t\tiy += dy4;\n\t\t}\n\t\tix += dx5;\n\t\tiy += dy5;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary6d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a seven-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var real = require( '@stdlib/complex/real' );\n* var imag = require( '@stdlib/complex/imag' );\n*\n* function scale( z ) {\n* return new Complex64( real(z)*10.0, imag(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary7d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = real( v );\n* // returns 10.0\n*\n* var im = imag( v );\n* // returns 20.0\n*/\nfunction unary7d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 6 ];\n\t\tS1 = sh[ 5 ];\n\t\tS2 = sh[ 4 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 2 ];\n\t\tS5 = sh[ 1 ];\n\t\tS6 = sh[ 0 ];\n\t\tdx0 = sx[ 6 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 5 ] - ( S0*sx[6] );\n\t\tdx2 = sx[ 4 ] - ( S1*sx[5] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[4] );\n\t\tdx4 = sx[ 2 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 1 ] - ( S4*sx[2] );\n\t\tdx6 = sx[ 0 ] - ( S5*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 6 ];\n\t\tdy1 = sy[ 5 ] - ( S0*sy[6] );\n\t\tdy2 = sy[ 4 ] - ( S1*sy[5] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[4] );\n\t\tdy4 = sy[ 2 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 1 ] - ( S4*sy[2] );\n\t\tdy6 = sy[ 0 ] - ( S5*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx3;\n\t\t\t\t\tiy += dy3;\n\t\t\t\t}\n\t\t\t\tix += dx4;\n\t\t\t\tiy += dy4;\n\t\t\t}\n\t\t\tix += dx5;\n\t\t\tiy += dy5;\n\t\t}\n\t\tix += dx6;\n\t\tiy += dy6;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary7d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from an eight-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary8d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary8d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 7 ];\n\t\tS1 = sh[ 6 ];\n\t\tS2 = sh[ 5 ];\n\t\tS3 = sh[ 4 ];\n\t\tS4 = sh[ 3 ];\n\t\tS5 = sh[ 2 ];\n\t\tS6 = sh[ 1 ];\n\t\tS7 = sh[ 0 ];\n\t\tdx0 = sx[ 7 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 6 ] - ( S0*sx[7] );\n\t\tdx2 = sx[ 5 ] - ( S1*sx[6] );\n\t\tdx3 = sx[ 4 ] - ( S2*sx[5] );\n\t\tdx4 = sx[ 3 ] - ( S3*sx[4] );\n\t\tdx5 = sx[ 2 ] - ( S4*sx[3] );\n\t\tdx6 = sx[ 1 ] - ( S5*sx[2] );\n\t\tdx7 = sx[ 0 ] - ( S6*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 7 ];\n\t\tdy1 = sy[ 6 ] - ( S0*sy[7] );\n\t\tdy2 = sy[ 5 ] - ( S1*sy[6] );\n\t\tdy3 = sy[ 4 ] - ( S2*sy[5] );\n\t\tdy4 = sy[ 3 ] - ( S3*sy[4] );\n\t\tdy5 = sy[ 2 ] - ( S4*sy[3] );\n\t\tdy6 = sy[ 1 ] - ( S5*sy[2] );\n\t\tdy7 = sy[ 0 ] - ( S6*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx4;\n\t\t\t\t\tiy += dy4;\n\t\t\t\t}\n\t\t\t\tix += dx5;\n\t\t\t\tiy += dy5;\n\t\t\t}\n\t\t\tix += dx6;\n\t\t\tiy += dy6;\n\t\t}\n\t\tix += dx7;\n\t\tiy += dy7;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary8d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a nine-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary9d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary9d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 8 ];\n\t\tS1 = sh[ 7 ];\n\t\tS2 = sh[ 6 ];\n\t\tS3 = sh[ 5 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 3 ];\n\t\tS6 = sh[ 2 ];\n\t\tS7 = sh[ 1 ];\n\t\tS8 = sh[ 0 ];\n\t\tdx0 = sx[ 8 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 7 ] - ( S0*sx[8] );\n\t\tdx2 = sx[ 6 ] - ( S1*sx[7] );\n\t\tdx3 = sx[ 5 ] - ( S2*sx[6] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[5] );\n\t\tdx5 = sx[ 3 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 2 ] - ( S5*sx[3] );\n\t\tdx7 = sx[ 1 ] - ( S6*sx[2] );\n\t\tdx8 = sx[ 0 ] - ( S7*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 8 ];\n\t\tdy1 = sy[ 7 ] - ( S0*sy[8] );\n\t\tdy2 = sy[ 6 ] - ( S1*sy[7] );\n\t\tdy3 = sy[ 5 ] - ( S2*sy[6] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[5] );\n\t\tdy5 = sy[ 3 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 2 ] - ( S5*sy[3] );\n\t\tdy7 = sy[ 1 ] - ( S6*sy[2] );\n\t\tdy8 = sy[ 0 ] - ( S7*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t\tdy8 = sy[ 8 ] - ( S7*sy[7] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx5;\n\t\t\t\t\tiy += dy5;\n\t\t\t\t}\n\t\t\t\tix += dx6;\n\t\t\t\tiy += dy6;\n\t\t\t}\n\t\t\tix += dx7;\n\t\t\tiy += dy7;\n\t\t}\n\t\tix += dx8;\n\t\tiy += dy8;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary9d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a ten-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary10d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary10d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar dy9;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar S9;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 9 ];\n\t\tS1 = sh[ 8 ];\n\t\tS2 = sh[ 7 ];\n\t\tS3 = sh[ 6 ];\n\t\tS4 = sh[ 5 ];\n\t\tS5 = sh[ 4 ];\n\t\tS6 = sh[ 3 ];\n\t\tS7 = sh[ 2 ];\n\t\tS8 = sh[ 1 ];\n\t\tS9 = sh[ 0 ];\n\t\tdx0 = sx[ 9 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 8 ] - ( S0*sx[9] );\n\t\tdx2 = sx[ 7 ] - ( S1*sx[8] );\n\t\tdx3 = sx[ 6 ] - ( S2*sx[7] );\n\t\tdx4 = sx[ 5 ] - ( S3*sx[6] );\n\t\tdx5 = sx[ 4 ] - ( S4*sx[5] );\n\t\tdx6 = sx[ 3 ] - ( S5*sx[4] );\n\t\tdx7 = sx[ 2 ] - ( S6*sx[3] );\n\t\tdx8 = sx[ 1 ] - ( S7*sx[2] );\n\t\tdx9 = sx[ 0 ] - ( S8*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 9 ];\n\t\tdy1 = sy[ 8 ] - ( S0*sy[9] );\n\t\tdy2 = sy[ 7 ] - ( S1*sy[8] );\n\t\tdy3 = sy[ 6 ] - ( S2*sy[7] );\n\t\tdy4 = sy[ 5 ] - ( S3*sy[6] );\n\t\tdy5 = sy[ 4 ] - ( S4*sy[5] );\n\t\tdy6 = sy[ 3 ] - ( S5*sy[4] );\n\t\tdy7 = sy[ 2 ] - ( S6*sy[3] );\n\t\tdy8 = sy[ 1 ] - ( S7*sy[2] );\n\t\tdy9 = sy[ 0 ] - ( S8*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tS9 = sh[ 9 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] );\n\t\tdx9 = sx[ 9 ] - ( S8*sx[8] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t\tdy8 = sy[ 8 ] - ( S7*sy[7] );\n\t\tdy9 = sy[ 9 ] - ( S8*sy[8] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i9 = 0; i9 < S9; i9++ ) {\n\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx6;\n\t\t\t\t\tiy += dy6;\n\t\t\t\t}\n\t\t\t\tix += dx7;\n\t\t\t\tiy += dy7;\n\t\t\t}\n\t\t\tix += dx8;\n\t\t\tiy += dy8;\n\t\t}\n\t\tix += dx9;\n\t\tiy += dy9;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary10d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar numel = require( './../../../base/numel' );\nvar vind2bind = require( './../../../base/vind2bind' );\n\n\n// VARIABLES //\n\nvar MODE = 'throw';\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from an n-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unarynd( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unarynd( x, y, fcn, clbk, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar ordx;\n\tvar ordy;\n\tvar len;\n\tvar get;\n\tvar set;\n\tvar sh;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar v;\n\tvar i;\n\n\tsh = x.shape;\n\n\t// Compute the total number of elements over which to iterate:\n\tlen = numel( sh );\n\n\t// Cache references to the input and output ndarray data buffers:\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache references to the respective stride arrays:\n\tsx = x.strides;\n\tsy = y.strides;\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays:\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache the respective array orders:\n\tordx = x.order;\n\tordy = y.order;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over each element based on the linear **view** index, regardless as to how the data is stored in memory...\n\tfor ( i = 0; i < len; i++ ) {\n\t\tix = vind2bind( sh, sx, ox, ordx, i, MODE );\n\t\tiy = vind2bind( sh, sy, oy, ordy, i, MODE );\n\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\tif ( v !== void 0 ) {\n\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unarynd;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a zero-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0 ] );\n* var ybuf = new Float64Array( 1 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [];\n*\n* // Define the array strides:\n* var sx = [ 0 ];\n* var sy = [ 0 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary0d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0 ]\n*/\nfunction unary0d( x, y, fcn, clbk, thisArg ) {\n\tvar ox = x.offset;\n\tvar oy = y.offset;\n\tvar v = clbk.call( thisArg, x.data[ ox ], 0, [ ox, oy ], [ x, y ] );\n\tif ( v !== void 0 ) {\n\t\ty.data[ oy ] = fcn( v );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary0d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a one-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Float64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 4 ];\n*\n* // Define the array strides:\n* var sx = [ 2 ];\n* var sy = [ 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary1d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40, 80, 120, 160 ]\n*/\nfunction unary1d( x, y, fcn, clbk, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dy0;\n\tvar S0;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables: dimensions and loop offset (pointer) increments...\n\tS0 = x.shape[ 0 ];\n\tdx0 = x.strides[ 0 ];\n\tdy0 = y.strides[ 0 ];\n\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\tif ( v !== void 0 ) {\n\t\t\tybuf[ iy ] = fcn( v );\n\t\t}\n\t\tix += dx0;\n\t\tiy += dy0;\n\t\ti += 1;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary1d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a two-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Float64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary2d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0 ]\n*/\nfunction unary2d( x, y, fcn, clbk, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dy0;\n\tvar dy1;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 1 ];\n\t\tS1 = sh[ 0 ];\n\t\tdx0 = sx[ 1 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 0 ] - ( S0*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 1 ];\n\t\tdy1 = sy[ 0 ] - ( S0*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\t\tif ( v !== void 0 ) {\n\t\t\t\tybuf[ iy ] = fcn( v );\n\t\t\t}\n\t\t\tix += dx0;\n\t\t\tiy += dy0;\n\t\t\ti += 1;\n\t\t}\n\t\tix += dx1;\n\t\tiy += dy1;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary2d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a three-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n* var sy = [ 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary3d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction unary3d( x, y, fcn, clbk, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 2 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 0 ];\n\t\tdx0 = sx[ 2 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[2] );\n\t\tdx2 = sx[ 0 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 2 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[2] );\n\t\tdy2 = sy[ 0 ] - ( S1*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\tybuf[ iy ] = fcn( v );\n\t\t\t\t}\n\t\t\t\tix += dx0;\n\t\t\t\tiy += dy0;\n\t\t\t\ti += 1;\n\t\t\t}\n\t\t\tix += dx1;\n\t\t\tiy += dy1;\n\t\t}\n\t\tix += dx2;\n\t\tiy += dy2;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary3d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/* eslint-disable max-len */\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a four-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 4, 1 ];\n* var sy = [ 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary4d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction unary4d( x, y, fcn, clbk, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 3 ];\n\t\tS1 = sh[ 2 ];\n\t\tS2 = sh[ 1 ];\n\t\tS3 = sh[ 0 ];\n\t\tdx0 = sx[ 3 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 2 ] - ( S0*sx[3] );\n\t\tdx2 = sx[ 1 ] - ( S1*sx[2] );\n\t\tdx3 = sx[ 0 ] - ( S2*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 3 ];\n\t\tdy1 = sy[ 2 ] - ( S0*sy[3] );\n\t\tdy2 = sy[ 1 ] - ( S1*sy[2] );\n\t\tdy3 = sy[ 0 ] - ( S2*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\tybuf[ iy ] = fcn( v );\n\t\t\t\t\t}\n\t\t\t\t\tix += dx0;\n\t\t\t\t\tiy += dy0;\n\t\t\t\t\ti += 1;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t\tiy += dy1;\n\t\t\t}\n\t\t\tix += dx2;\n\t\t\tiy += dy2;\n\t\t}\n\t\tix += dx3;\n\t\tiy += dy3;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary4d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/* eslint-disable max-depth, max-len */\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a five-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary5d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction unary5d( x, y, fcn, clbk, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 4 ];\n\t\tS1 = sh[ 3 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 1 ];\n\t\tS4 = sh[ 0 ];\n\t\tdx0 = sx[ 4 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 3 ] - ( S0*sx[4] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[3] );\n\t\tdx3 = sx[ 1 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 0 ] - ( S3*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 4 ];\n\t\tdy1 = sy[ 3 ] - ( S0*sy[4] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[3] );\n\t\tdy3 = sy[ 1 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 0 ] - ( S3*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\tybuf[ iy ] = fcn( v );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\ti += 1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx1;\n\t\t\t\t\tiy += dy1;\n\t\t\t\t}\n\t\t\t\tix += dx2;\n\t\t\t\tiy += dy2;\n\t\t\t}\n\t\t\tix += dx3;\n\t\t\tiy += dy3;\n\t\t}\n\t\tix += dx4;\n\t\tiy += dy4;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary5d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a six-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary6d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction unary6d( x, y, fcn, clbk, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 5 ];\n\t\tS1 = sh[ 4 ];\n\t\tS2 = sh[ 3 ];\n\t\tS3 = sh[ 2 ];\n\t\tS4 = sh[ 1 ];\n\t\tS5 = sh[ 0 ];\n\t\tdx0 = sx[ 5 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 4 ] - ( S0*sx[5] );\n\t\tdx2 = sx[ 3 ] - ( S1*sx[4] );\n\t\tdx3 = sx[ 2 ] - ( S2*sx[3] );\n\t\tdx4 = sx[ 1 ] - ( S3*sx[2] );\n\t\tdx5 = sx[ 0 ] - ( S4*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 5 ];\n\t\tdy1 = sy[ 4 ] - ( S0*sy[5] );\n\t\tdy2 = sy[ 3 ] - ( S1*sy[4] );\n\t\tdy3 = sy[ 2 ] - ( S2*sy[3] );\n\t\tdy4 = sy[ 1 ] - ( S3*sy[2] );\n\t\tdy5 = sy[ 0 ] - ( S4*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( v );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t\tiy += dy2;\n\t\t\t\t}\n\t\t\t\tix += dx3;\n\t\t\t\tiy += dy3;\n\t\t\t}\n\t\t\tix += dx4;\n\t\t\tiy += dy4;\n\t\t}\n\t\tix += dx5;\n\t\tiy += dy5;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary6d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a seven-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary7d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction unary7d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 6 ];\n\t\tS1 = sh[ 5 ];\n\t\tS2 = sh[ 4 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 2 ];\n\t\tS5 = sh[ 1 ];\n\t\tS6 = sh[ 0 ];\n\t\tdx0 = sx[ 6 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 5 ] - ( S0*sx[6] );\n\t\tdx2 = sx[ 4 ] - ( S1*sx[5] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[4] );\n\t\tdx4 = sx[ 2 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 1 ] - ( S4*sx[2] );\n\t\tdx6 = sx[ 0 ] - ( S5*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 6 ];\n\t\tdy1 = sy[ 5 ] - ( S0*sy[6] );\n\t\tdy2 = sy[ 4 ] - ( S1*sy[5] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[4] );\n\t\tdy4 = sy[ 2 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 1 ] - ( S4*sy[2] );\n\t\tdy6 = sy[ 0 ] - ( S5*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( v );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx3;\n\t\t\t\t\tiy += dy3;\n\t\t\t\t}\n\t\t\t\tix += dx4;\n\t\t\t\tiy += dy4;\n\t\t\t}\n\t\t\tix += dx5;\n\t\t\tiy += dy5;\n\t\t}\n\t\tix += dx6;\n\t\tiy += dy6;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary7d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from an eight-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary8d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction unary8d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 7 ];\n\t\tS1 = sh[ 6 ];\n\t\tS2 = sh[ 5 ];\n\t\tS3 = sh[ 4 ];\n\t\tS4 = sh[ 3 ];\n\t\tS5 = sh[ 2 ];\n\t\tS6 = sh[ 1 ];\n\t\tS7 = sh[ 0 ];\n\t\tdx0 = sx[ 7 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 6 ] - ( S0*sx[7] );\n\t\tdx2 = sx[ 5 ] - ( S1*sx[6] );\n\t\tdx3 = sx[ 4 ] - ( S2*sx[5] );\n\t\tdx4 = sx[ 3 ] - ( S3*sx[4] );\n\t\tdx5 = sx[ 2 ] - ( S4*sx[3] );\n\t\tdx6 = sx[ 1 ] - ( S5*sx[2] );\n\t\tdx7 = sx[ 0 ] - ( S6*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 7 ];\n\t\tdy1 = sy[ 6 ] - ( S0*sy[7] );\n\t\tdy2 = sy[ 5 ] - ( S1*sy[6] );\n\t\tdy3 = sy[ 4 ] - ( S2*sy[5] );\n\t\tdy4 = sy[ 3 ] - ( S3*sy[4] );\n\t\tdy5 = sy[ 2 ] - ( S4*sy[3] );\n\t\tdy6 = sy[ 1 ] - ( S5*sy[2] );\n\t\tdy7 = sy[ 0 ] - ( S6*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( v );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx4;\n\t\t\t\t\tiy += dy4;\n\t\t\t\t}\n\t\t\t\tix += dx5;\n\t\t\t\tiy += dy5;\n\t\t\t}\n\t\t\tix += dx6;\n\t\t\tiy += dy6;\n\t\t}\n\t\tix += dx7;\n\t\tiy += dy7;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary8d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a nine-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary9d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction unary9d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 8 ];\n\t\tS1 = sh[ 7 ];\n\t\tS2 = sh[ 6 ];\n\t\tS3 = sh[ 5 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 3 ];\n\t\tS6 = sh[ 2 ];\n\t\tS7 = sh[ 1 ];\n\t\tS8 = sh[ 0 ];\n\t\tdx0 = sx[ 8 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 7 ] - ( S0*sx[8] );\n\t\tdx2 = sx[ 6 ] - ( S1*sx[7] );\n\t\tdx3 = sx[ 5 ] - ( S2*sx[6] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[5] );\n\t\tdx5 = sx[ 3 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 2 ] - ( S5*sx[3] );\n\t\tdx7 = sx[ 1 ] - ( S6*sx[2] );\n\t\tdx8 = sx[ 0 ] - ( S7*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 8 ];\n\t\tdy1 = sy[ 7 ] - ( S0*sy[8] );\n\t\tdy2 = sy[ 6 ] - ( S1*sy[7] );\n\t\tdy3 = sy[ 5 ] - ( S2*sy[6] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[5] );\n\t\tdy5 = sy[ 3 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 2 ] - ( S5*sy[3] );\n\t\tdy7 = sy[ 1 ] - ( S6*sy[2] );\n\t\tdy8 = sy[ 0 ] - ( S7*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t\tdy8 = sy[ 8 ] - ( S7*sy[7] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( v );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx5;\n\t\t\t\t\tiy += dy5;\n\t\t\t\t}\n\t\t\t\tix += dx6;\n\t\t\t\tiy += dy6;\n\t\t\t}\n\t\t\tix += dx7;\n\t\t\tiy += dy7;\n\t\t}\n\t\tix += dx8;\n\t\tiy += dy8;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary9d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a ten-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary10d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction unary10d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar dy9;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar S9;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 9 ];\n\t\tS1 = sh[ 8 ];\n\t\tS2 = sh[ 7 ];\n\t\tS3 = sh[ 6 ];\n\t\tS4 = sh[ 5 ];\n\t\tS5 = sh[ 4 ];\n\t\tS6 = sh[ 3 ];\n\t\tS7 = sh[ 2 ];\n\t\tS8 = sh[ 1 ];\n\t\tS9 = sh[ 0 ];\n\t\tdx0 = sx[ 9 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 8 ] - ( S0*sx[9] );\n\t\tdx2 = sx[ 7 ] - ( S1*sx[8] );\n\t\tdx3 = sx[ 6 ] - ( S2*sx[7] );\n\t\tdx4 = sx[ 5 ] - ( S3*sx[6] );\n\t\tdx5 = sx[ 4 ] - ( S4*sx[5] );\n\t\tdx6 = sx[ 3 ] - ( S5*sx[4] );\n\t\tdx7 = sx[ 2 ] - ( S6*sx[3] );\n\t\tdx8 = sx[ 1 ] - ( S7*sx[2] );\n\t\tdx9 = sx[ 0 ] - ( S8*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 9 ];\n\t\tdy1 = sy[ 8 ] - ( S0*sy[9] );\n\t\tdy2 = sy[ 7 ] - ( S1*sy[8] );\n\t\tdy3 = sy[ 6 ] - ( S2*sy[7] );\n\t\tdy4 = sy[ 5 ] - ( S3*sy[6] );\n\t\tdy5 = sy[ 4 ] - ( S4*sy[5] );\n\t\tdy6 = sy[ 3 ] - ( S5*sy[4] );\n\t\tdy7 = sy[ 2 ] - ( S6*sy[3] );\n\t\tdy8 = sy[ 1 ] - ( S7*sy[2] );\n\t\tdy9 = sy[ 0 ] - ( S8*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tS9 = sh[ 9 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] );\n\t\tdx9 = sx[ 9 ] - ( S8*sx[8] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t\tdy8 = sy[ 8 ] - ( S7*sy[7] );\n\t\tdy9 = sy[ 9 ] - ( S8*sy[8] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i9 = 0; i9 < S9; i9++ ) {\n\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( v );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx6;\n\t\t\t\t\tiy += dy6;\n\t\t\t\t}\n\t\t\t\tix += dx7;\n\t\t\t\tiy += dy7;\n\t\t\t}\n\t\t\tix += dx8;\n\t\t\tiy += dy8;\n\t\t}\n\t\tix += dx9;\n\t\tiy += dy9;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary10d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar numel = require( './../../../base/numel' );\nvar vind2bind = require( './../../../base/vind2bind' );\n\n\n// VARIABLES //\n\nvar MODE = 'throw';\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from an n-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Float64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unarynd( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0 ]\n*/\nfunction unarynd( x, y, fcn, clbk, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar ordx;\n\tvar ordy;\n\tvar len;\n\tvar sh;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar v;\n\tvar i;\n\n\tsh = x.shape;\n\n\t// Compute the total number of elements over which to iterate:\n\tlen = numel( sh );\n\n\t// Cache references to the input and output ndarray data buffers:\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache references to the respective stride arrays:\n\tsx = x.strides;\n\tsy = y.strides;\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays:\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache the respective array orders:\n\tordx = x.order;\n\tordy = y.order;\n\n\t// Iterate over each element based on the linear **view** index, regardless as to how the data is stored in memory...\n\tfor ( i = 0; i < len; i++ ) {\n\t\tix = vind2bind( sh, sx, ox, ordx, i, MODE );\n\t\tiy = vind2bind( sh, sy, oy, ordy, i, MODE );\n\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\tif ( v !== void 0 ) {\n\t\t\tybuf[ iy ] = fcn( v );\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unarynd;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar iterationOrder = require( './../../../base/iteration-order' );\nvar minmaxViewBufferIndex = require( './../../../base/minmax-view-buffer-index' );\nvar ndarray2object = require( './../../../base/ndarraylike2object' );\nvar blockedaccessorunary2d = require( './2d_blocked_accessors.js' );\nvar blockedaccessorunary3d = require( './3d_blocked_accessors.js' );\nvar blockedaccessorunary4d = require( './4d_blocked_accessors.js' );\nvar blockedaccessorunary5d = require( './5d_blocked_accessors.js' );\nvar blockedaccessorunary6d = require( './6d_blocked_accessors.js' );\nvar blockedaccessorunary7d = require( './7d_blocked_accessors.js' );\nvar blockedaccessorunary8d = require( './8d_blocked_accessors.js' );\nvar blockedaccessorunary9d = require( './9d_blocked_accessors.js' );\nvar blockedaccessorunary10d = require( './10d_blocked_accessors.js' );\nvar blockedunary2d = require( './2d_blocked.js' );\nvar blockedunary3d = require( './3d_blocked.js' );\nvar blockedunary4d = require( './4d_blocked.js' );\nvar blockedunary5d = require( './5d_blocked.js' );\nvar blockedunary6d = require( './6d_blocked.js' );\nvar blockedunary7d = require( './7d_blocked.js' );\nvar blockedunary8d = require( './8d_blocked.js' );\nvar blockedunary9d = require( './9d_blocked.js' );\nvar blockedunary10d = require( './10d_blocked.js' );\nvar accessorunary0d = require( './0d_accessors.js' );\nvar accessorunary1d = require( './1d_accessors.js' );\nvar accessorunary2d = require( './2d_accessors.js' );\nvar accessorunary3d = require( './3d_accessors.js' );\nvar accessorunary4d = require( './4d_accessors.js' );\nvar accessorunary5d = require( './5d_accessors.js' );\nvar accessorunary6d = require( './6d_accessors.js' );\nvar accessorunary7d = require( './7d_accessors.js' );\nvar accessorunary8d = require( './8d_accessors.js' );\nvar accessorunary9d = require( './9d_accessors.js' );\nvar accessorunary10d = require( './10d_accessors.js' );\nvar accessorunarynd = require( './nd_accessors.js' );\nvar unary0d = require( './0d.js' );\nvar unary1d = require( './1d.js' );\nvar unary2d = require( './2d.js' );\nvar unary3d = require( './3d.js' );\nvar unary4d = require( './4d.js' );\nvar unary5d = require( './5d.js' );\nvar unary6d = require( './6d.js' );\nvar unary7d = require( './7d.js' );\nvar unary8d = require( './8d.js' );\nvar unary9d = require( './9d.js' );\nvar unary10d = require( './10d.js' );\nvar unarynd = require( './nd.js' );\n\n\n// VARIABLES //\n\nvar UNARY = [\n\tunary0d,\n\tunary1d,\n\tunary2d,\n\tunary3d,\n\tunary4d,\n\tunary5d,\n\tunary6d,\n\tunary7d,\n\tunary8d,\n\tunary9d,\n\tunary10d\n];\nvar ACCESSOR_UNARY = [\n\taccessorunary0d,\n\taccessorunary1d,\n\taccessorunary2d,\n\taccessorunary3d,\n\taccessorunary4d,\n\taccessorunary5d,\n\taccessorunary6d,\n\taccessorunary7d,\n\taccessorunary8d,\n\taccessorunary9d,\n\taccessorunary10d\n];\nvar BLOCKED_UNARY = [\n\tblockedunary2d, // 0\n\tblockedunary3d,\n\tblockedunary4d,\n\tblockedunary5d,\n\tblockedunary6d,\n\tblockedunary7d,\n\tblockedunary8d,\n\tblockedunary9d,\n\tblockedunary10d // 8\n];\nvar BLOCKED_ACCESSOR_UNARY = [\n\tblockedaccessorunary2d, // 0\n\tblockedaccessorunary3d,\n\tblockedaccessorunary4d,\n\tblockedaccessorunary5d,\n\tblockedaccessorunary6d,\n\tblockedaccessorunary7d,\n\tblockedaccessorunary8d,\n\tblockedaccessorunary9d,\n\tblockedaccessorunary10d // 8\n];\nvar MAX_DIMS = UNARY.length - 1;\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from an input ndarray according to a callback function and assigns results to elements in an output ndarray.\n*\n* ## Notes\n*\n* - Each provided ndarray should be an `object` with the following properties:\n*\n* - **dtype**: data type.\n* - **data**: data buffer.\n* - **shape**: dimensions.\n* - **strides**: stride lengths.\n* - **offset**: index offset.\n* - **order**: specifies whether an ndarray is row-major (C-style) or column major (Fortran-style).\n*\n* @param {ArrayLikeObject} arrays - array-like object containing one input array and one output array\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @throws {Error} arrays must have the same number of dimensions\n* @throws {Error} arrays must have the same shape\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n* var sy = [ 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unaryBy( [ x, y ], scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction unaryBy( arrays, fcn, clbk, thisArg ) {\n\tvar ndims;\n\tvar xmmv;\n\tvar ymmv;\n\tvar shx;\n\tvar shy;\n\tvar iox;\n\tvar ioy;\n\tvar len;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ns;\n\tvar x;\n\tvar y;\n\tvar d;\n\tvar i;\n\n\t// Unpack the ndarrays and standardize ndarray meta data:\n\tx = ndarray2object( arrays[ 0 ] );\n\ty = ndarray2object( arrays[ 1 ] );\n\n\t// Verify that the input and output arrays have the same number of dimensions...\n\tshx = x.shape;\n\tshy = y.shape;\n\tndims = shx.length;\n\tif ( ndims !== shy.length ) {\n\t\tthrow new Error( 'invalid arguments. Arrays must have the same number of dimensions (i.e., same rank). ndims(x) == '+ndims+'. ndims(y) == '+shy.length+'.' );\n\t}\n\t// Determine whether we can avoid iteration altogether...\n\tif ( ndims === 0 ) {\n\t\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\t\treturn ACCESSOR_UNARY[ ndims ]( x, y, fcn, clbk, thisArg );\n\t\t}\n\t\treturn UNARY[ ndims ]( x, y, fcn, clbk, thisArg );\n\t}\n\t// Verify that the input and output arrays have the same dimensions...\n\tlen = 1; // number of elements\n\tns = 0; // number of singleton dimensions\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\td = shx[ i ];\n\t\tif ( d !== shy[ i ] ) {\n\t\t\tthrow new Error( 'invalid arguments. Arrays must have the same shape.' );\n\t\t}\n\t\t// Note that, if one of the dimensions is `0`, the length will be `0`...\n\t\tlen *= d;\n\n\t\t// Check whether the current dimension is a singleton dimension...\n\t\tif ( d === 1 ) {\n\t\t\tns += 1;\n\t\t}\n\t}\n\t// Check whether we were provided empty ndarrays...\n\tif ( len === 0 ) {\n\t\treturn;\n\t}\n\t// Determine whether the ndarrays are one-dimensional and thus readily translate to one-dimensional strided arrays...\n\tif ( ndims === 1 ) {\n\t\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\t\treturn ACCESSOR_UNARY[ ndims ]( x, y, fcn, clbk, thisArg );\n\t\t}\n\t\treturn UNARY[ ndims ]( x, y, fcn, clbk, thisArg );\n\t}\n\tsx = x.strides;\n\tsy = y.strides;\n\n\t// Determine whether the ndarray has only **one** non-singleton dimension (e.g., ndims=4, shape=[10,1,1,1]) so that we can treat the ndarrays as being equivalent to one-dimensional strided arrays...\n\tif ( ns === ndims-1 ) {\n\t\t// Get the index of the non-singleton dimension...\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\tif ( shx[ i ] !== 1 ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tx.shape = [ shx[i] ];\n\t\ty.shape = x.shape;\n\t\tx.strides = [ sx[i] ];\n\t\ty.strides = [ sy[i] ];\n\t\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\t\treturn ACCESSOR_UNARY[ 1 ]( x, y, fcn, clbk, thisArg );\n\t\t}\n\t\treturn UNARY[ 1 ]( x, y, fcn, clbk, thisArg );\n\t}\n\tiox = iterationOrder( sx ); // +/-1\n\tioy = iterationOrder( sy ); // +/-1\n\n\t// Determine whether we can avoid blocked iteration...\n\tif ( iox !== 0 && ioy !== 0 && x.order === y.order ) {\n\t\t// Determine the minimum and maximum linear indices which are accessible by the array views:\n\t\txmmv = minmaxViewBufferIndex( shx, sx, x.offset );\n\t\tymmv = minmaxViewBufferIndex( shy, sy, y.offset );\n\n\t\t// Determine whether we can ignore shape (and strides) and treat the ndarrays as linear one-dimensional strided arrays...\n\t\tif ( len === ( xmmv[1]-xmmv[0]+1 ) && len === ( ymmv[1]-ymmv[0]+1 ) ) {\n\t\t\t// Note: the above is equivalent to @stdlib/ndarray/base/assert/is-contiguous, but in-lined so we can retain computed values...\n\t\t\tif ( iox === 1 ) {\n\t\t\t\tox = xmmv[ 0 ];\n\t\t\t} else {\n\t\t\t\tox = xmmv[ 1 ];\n\t\t\t}\n\t\t\tif ( ioy === 1 ) {\n\t\t\t\toy = ymmv[ 0 ];\n\t\t\t} else {\n\t\t\t\toy = ymmv[ 1 ];\n\t\t\t}\n\t\t\tx.shape = [ len ];\n\t\t\ty.shape = x.shape;\n\t\t\tx.strides = [ iox ];\n\t\t\ty.strides = [ ioy ];\n\t\t\tx.offset = ox;\n\t\t\ty.offset = oy;\n\t\t\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\t\t\treturn ACCESSOR_UNARY[ 1 ]( x, y, fcn, clbk, thisArg );\n\t\t\t}\n\t\t\treturn UNARY[ 1 ]( x, y, fcn, clbk, thisArg );\n\t\t}\n\t\t// At least one ndarray is non-contiguous, so we cannot directly use one-dimensional array functionality...\n\n\t\t// Determine whether we can use simple nested loops...\n\t\tif ( ndims <= MAX_DIMS ) {\n\t\t\t// So long as iteration for each respective array always moves in the same direction (i.e., no mixed sign strides), we can leverage cache-optimal (i.e., normal) nested loops without resorting to blocked iteration...\n\t\t\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\t\t\treturn ACCESSOR_UNARY[ ndims ]( x, y, fcn, clbk, thisArg );\n\t\t\t}\n\t\t\treturn UNARY[ ndims ]( x, y, fcn, clbk, thisArg );\n\t\t}\n\t\t// Fall-through to blocked iteration...\n\t}\n\t// At this point, we're either dealing with non-contiguous n-dimensional arrays, high dimensional n-dimensional arrays, and/or arrays having differing memory layouts, so our only hope is that we can still perform blocked iteration...\n\n\t// Determine whether we can perform blocked iteration...\n\tif ( ndims <= MAX_DIMS ) {\n\t\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\t\treturn BLOCKED_ACCESSOR_UNARY[ ndims-2 ]( x, y, fcn, clbk, thisArg ); // eslint-disable-line max-len\n\t\t}\n\t\treturn BLOCKED_UNARY[ ndims-2 ]( x, y, fcn, clbk, thisArg );\n\t}\n\t// Fall-through to linear view iteration without regard for how data is stored in memory (i.e., take the slow path)...\n\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\treturn accessorunarynd( x, y, fcn, clbk, thisArg );\n\t}\n\tunarynd( x, y, fcn, clbk, thisArg );\n}\n\n\n// EXPORTS //\n\nmodule.exports = unaryBy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Apply a unary function to each element retrieved from an input ndarray according to a callback function and assign results to elements in an output ndarray.\n*\n* @module @stdlib/ndarray/base/unary-by\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var unaryBy = require( '@stdlib/ndarray/base/unary-by' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n* var sy = [ 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unaryBy( [ x, y ], scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isFloatingPointDataType = require( './../../../base/assert/is-floating-point-data-type' );\nvar isRealFloatingPointDataType = require( './../../../base/assert/is-real-floating-point-data-type' ); // eslint-disable-line id-length\nvar isComplexFloatingPointDataType = require( './../../../base/assert/is-complex-floating-point-data-type' ); // eslint-disable-line id-length\nvar isIntegerDataType = require( './../../../base/assert/is-integer-data-type' );\nvar isSignedIntegerDataType = require( './../../../base/assert/is-signed-integer-data-type' );\nvar isUnsignedIntegerDataType = require( './../../../base/assert/is-unsigned-integer-data-type' );\nvar isRealDataType = require( './../../../base/assert/is-real-data-type' );\nvar isNumericDataType = require( './../../../base/assert/is-numeric-data-type' );\nvar isDataType = require( './../../../base/assert/is-data-type' );\nvar defaults = require( './../../../defaults' );\nvar format = require( '@stdlib/string/format' );\n\n\n// VARIABLES //\n\nvar POLICY_TABLE = {\n\t'floating_point': [\n\t\tisFloatingPointDataType,\n\t\tdefaults.get( 'dtypes.floating_point' )\n\t],\n\t'real_floating_point': [\n\t\tisRealFloatingPointDataType,\n\t\tdefaults.get( 'dtypes.real_floating_point' )\n\t],\n\t'complex_floating_point': [\n\t\tisComplexFloatingPointDataType,\n\t\tdefaults.get( 'dtypes.complex_floating_point' )\n\t],\n\n\t'integer': [\n\t\tisIntegerDataType,\n\t\tdefaults.get( 'dtypes.integer' )\n\t],\n\t'signed_integer': [\n\t\tisSignedIntegerDataType,\n\t\tdefaults.get( 'dtypes.signed_integer' )\n\t],\n\t'unsigned_integer': [\n\t\tisUnsignedIntegerDataType,\n\t\tdefaults.get( 'dtypes.unsigned_integer' )\n\t],\n\n\t'real': [\n\t\tisRealDataType,\n\t\tdefaults.get( 'dtypes.real' )\n\t],\n\n\t'numeric': [\n\t\tisNumericDataType,\n\t\tdefaults.get( 'dtypes.numeric' )\n\t]\n};\nvar DEFAULT_DTYPE = defaults.get( 'dtypes.default' );\n\n\n// MAIN //\n\n/**\n* Resolves the output ndarray data type for a unary function.\n*\n* @param {string} dtype - input ndarray data type\n* @param {string} policy - output ndarray data type policy\n* @throws {TypeError} second argument must be a recognized data type policy\n* @throws {Error} unexpected error\n* @returns {string} output ndarray data type\n*\n* @example\n* var dt = resolve( 'float64', 'complex_floating_point' );\n* // returns \n*/\nfunction resolve( dtype, policy ) {\n\tvar p;\n\tif ( policy === 'default' ) {\n\t\t// When the policy is \"default\", the output data type should always be the default data type without consideration for the input data type:\n\t\treturn DEFAULT_DTYPE;\n\t}\n\tif ( policy === 'same' || policy === 'promoted' ) { // note: for unary APIs, the \"promoted\" data type is the same as the input data type\n\t\treturn dtype;\n\t}\n\tif ( policy === 'bool' ) {\n\t\tthrow new Error( 'not implemented' ); // TODO: update once the `bool` dtype is supported\n\t}\n\tp = POLICY_TABLE[ policy ];\n\tif ( p === void 0 ) {\n\t\t// Check for an explicit data type...\n\t\tif ( isDataType( policy ) ) {\n\t\t\treturn policy;\n\t\t}\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a supported data type policy. Value: `%s`.', policy ) );\n\t}\n\tif ( p[ 0 ]( dtype ) ) {\n\t\treturn dtype;\n\t}\n\treturn p[ 1 ];\n}\n\n\n// EXPORTS //\n\nmodule.exports = resolve;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Resolve the output ndarray data type for a unary function.\n*\n* @module @stdlib/ndarray/base/unary-output-dtype\n*\n* @example\n* var resolve = require( '@stdlib/ndarray/base/unary-output-dtype' );\n*\n* var dt = resolve( 'float64', 'complex_floating_point' );\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar shape2strides = require( './../../../base/shape2strides' );\nvar strides2offset = require( './../../../base/strides2offset' );\nvar buffer = require( './../../../base/buffer' );\nvar format = require( '@stdlib/string/format' );\nvar ndarray = require( './../../../base/ctor' );\nvar numel = require( './../../../base/numel' );\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled ndarray having a specified shape and data type.\n*\n* @param {string} dtype - data type\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {string} order - array order\n* @throws {TypeError} first argument must be a recognized data type\n* @returns {ndarray} ndarray\n*\n* @example\n* var arr = zeros( 'float32', [ 2, 2 ], 'row-major' );\n* // returns \n*\n* var sh = arr.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = arr.dtype;\n* // returns 'float32'\n*/\nfunction zeros( dtype, shape, order ) {\n\tvar ndims;\n\tvar buf;\n\tvar len;\n\tvar st;\n\n\tndims = shape.length;\n\tif ( ndims > 0 ) {\n\t\tlen = numel( shape );\n\t\tst = shape2strides( shape, order );\n\t} else {\n\t\t// For 0-dimensional arrays, the buffer should contain a single element...\n\t\tlen = 1;\n\t\tst = [ 0 ];\n\t}\n\tbuf = buffer( dtype, len );\n\tif ( buf === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a recognized data type. Value: `%s`.', dtype ) );\n\t}\n\n\treturn new ndarray( dtype, buf, shape, st, strides2offset( shape, st ), order ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = zeros;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create a zero-filled ndarray having a specified shape and data type.\n*\n* @module @stdlib/ndarray/base/zeros\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/base/zeros' );\n*\n* var arr = zeros( 'float32', [ 2, 2 ], 'row-major' );\n* // returns \n*\n* var sh = arr.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = arr.dtype;\n* // returns 'float32'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar shape2strides = require( './../../../base/shape2strides' );\nvar strides2offset = require( './../../../base/strides2offset' );\nvar buffer = require( './../../../base/buffer' );\nvar numel = require( './../../../base/numel' );\nvar getDType = require( './../../../base/dtype' );\nvar getShape = require( './../../../base/shape' );\nvar getOrder = require( './../../../base/order' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled ndarray having the same shape and data type as a provided ndarray.\n*\n* @param {ndarray} x - input array\n* @throws {TypeError} first argument must have a recognized data type\n* @returns {ndarray} ndarray\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/base/zeros' );\n*\n* var x = zeros( 'float32', [ 2, 2 ], 'row-major' );\n* // returns \n*\n* var y = zerosLike( x );\n* // returns \n*\n* var sh = y.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = y.dtype;\n* // returns 'float32'\n*/\nfunction zerosLike( x ) {\n\tvar ndims;\n\tvar len;\n\tvar buf;\n\tvar ord;\n\tvar sh;\n\tvar st;\n\tvar dt;\n\n\tdt = getDType( x );\n\tsh = getShape( x, true );\n\tord = getOrder( x );\n\n\tndims = sh.length;\n\tif ( ndims > 0 ) {\n\t\tlen = numel( sh );\n\t\tst = shape2strides( sh, ord );\n\t} else {\n\t\t// For 0-dimensional arrays, the buffer should contain a single element...\n\t\tlen = 1;\n\t\tst = [ 0 ];\n\t}\n\tbuf = buffer( dt, len );\n\tif ( buf === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must have a recognized data type. Value: `%s`.', dt ) );\n\t}\n\treturn new x.constructor( dt, buf, sh, st, strides2offset( sh, st ), ord );\n}\n\n\n// EXPORTS //\n\nmodule.exports = zerosLike;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create a zero-filled ndarray having the same shape and data type as a provided ndarray.\n*\n* @module @stdlib/ndarray/base/zeros-like\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/base/zeros' );\n* var zerosLike = require( '@stdlib/ndarray/base/zeros-like' );\n*\n* var x = zeros( 'float32', [ 2, 2 ], 'row-major' );\n* // returns \n*\n* var y = zerosLike( x );\n* // returns \n*\n* var sh = y.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = y.dtype;\n* // returns 'float32'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n/*\n* The following modules are intentionally not exported: function-object, napi, unary\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name assert\n* @memberof ns\n* @readonly\n* @type {Namespace}\n* @see {@link module:@stdlib/ndarray/base/assert}\n*/\nsetReadOnly( ns, 'assert', require( './../../base/assert' ) );\n\n/**\n* @name binaryLoopOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/binary-loop-interchange-order}\n*/\nsetReadOnly( ns, 'binaryLoopOrder', require( './../../base/binary-loop-interchange-order' ) );\n\n/**\n* @name binaryBlockSize\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/binary-tiling-block-size}\n*/\nsetReadOnly( ns, 'binaryBlockSize', require( './../../base/binary-tiling-block-size' ) );\n\n/**\n* @name bind2vind\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/bind2vind}\n*/\nsetReadOnly( ns, 'bind2vind', require( './../../base/bind2vind' ) );\n\n/**\n* @name broadcastArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/broadcast-array}\n*/\nsetReadOnly( ns, 'broadcastArray', require( './../../base/broadcast-array' ) );\n\n/**\n* @name broadcastScalar\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/broadcast-scalar}\n*/\nsetReadOnly( ns, 'broadcastScalar', require( './../../base/broadcast-scalar' ) );\n\n/**\n* @name broadcastShapes\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/broadcast-shapes}\n*/\nsetReadOnly( ns, 'broadcastShapes', require( './../../base/broadcast-shapes' ) );\n\n/**\n* @name buffer\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/buffer}\n*/\nsetReadOnly( ns, 'buffer', require( './../../base/buffer' ) );\n\n/**\n* @name bufferCtors\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/buffer-ctors}\n*/\nsetReadOnly( ns, 'bufferCtors', require( './../../base/buffer-ctors' ) );\n\n/**\n* @name bufferDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/buffer-dtype}\n*/\nsetReadOnly( ns, 'bufferDataType', require( './../../base/buffer-dtype' ) );\n\n/**\n* @name bufferDataTypeEnum\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/buffer-dtype-enum}\n*/\nsetReadOnly( ns, 'bufferDataTypeEnum', require( './../../base/buffer-dtype-enum' ) );\n\n/**\n* @name bytesPerElement\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/bytes-per-element}\n*/\nsetReadOnly( ns, 'bytesPerElement', require( './../../base/bytes-per-element' ) );\n\n/**\n* @name char2dtype\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/char2dtype}\n*/\nsetReadOnly( ns, 'char2dtype', require( './../../base/char2dtype' ) );\n\n/**\n* @name clampIndex\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/clamp-index}\n*/\nsetReadOnly( ns, 'clampIndex', require( './../../base/clamp-index' ) );\n\n/**\n* @name ndarray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/ctor}\n*/\nsetReadOnly( ns, 'ndarray', require( './../../base/ctor' ) );\n\n/**\n* @name data\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/data-buffer}\n*/\nsetReadOnly( ns, 'data', require( './../../base/data-buffer' ) );\n\n/**\n* @name dtype\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/dtype}\n*/\nsetReadOnly( ns, 'dtype', require( './../../base/dtype' ) );\n\n/**\n* @name dtypeChar\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/dtype-char}\n*/\nsetReadOnly( ns, 'dtypeChar', require( './../../base/dtype-char' ) );\n\n/**\n* @name dtypeDesc\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/dtype-desc}\n*/\nsetReadOnly( ns, 'dtypeDesc', require( './../../base/dtype-desc' ) );\n\n/**\n* @name dtypeEnum2Str\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/dtype-enum2str}\n*/\nsetReadOnly( ns, 'dtypeEnum2Str', require( './../../base/dtype-enum2str' ) );\n\n/**\n* @name dtypeResolveEnum\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/dtype-resolve-enum}\n*/\nsetReadOnly( ns, 'dtypeResolveEnum', require( './../../base/dtype-resolve-enum' ) );\n\n/**\n* @name dtypeResolveStr\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/dtype-resolve-str}\n*/\nsetReadOnly( ns, 'dtypeResolveStr', require( './../../base/dtype-resolve-str' ) );\n\n/**\n* @name dtypeStr2Enum\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/dtype-str2enum}\n*/\nsetReadOnly( ns, 'dtypeStr2Enum', require( './../../base/dtype-str2enum' ) );\n\n/**\n* @name dtype2c\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/dtype2c}\n*/\nsetReadOnly( ns, 'dtype2c', require( './../../base/dtype2c' ) );\n\n/**\n* @name dtypes2signatures\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/dtypes2signatures}\n*/\nsetReadOnly( ns, 'dtypes2signatures', require( './../../base/dtypes2signatures' ) );\n\n/**\n* @name empty\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/empty}\n*/\nsetReadOnly( ns, 'empty', require( './../../base/empty' ) );\n\n/**\n* @name emptyLike\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/empty-like}\n*/\nsetReadOnly( ns, 'emptyLike', require( './../../base/empty-like' ) );\n\n/**\n* @name expandDimensions\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/expand-dimensions}\n*/\nsetReadOnly( ns, 'expandDimensions', require( './../../base/expand-dimensions' ) );\n\n/**\n* @name scalar2ndarray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/from-scalar}\n*/\nsetReadOnly( ns, 'scalar2ndarray', require( './../../base/from-scalar' ) );\n\n/**\n* @name ind\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/ind}\n*/\nsetReadOnly( ns, 'ind', require( './../../base/ind' ) );\n\n/**\n* @name ind2sub\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/ind2sub}\n*/\nsetReadOnly( ns, 'ind2sub', require( './../../base/ind2sub' ) );\n\n/**\n* @name iterationOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/iteration-order}\n*/\nsetReadOnly( ns, 'iterationOrder', require( './../../base/iteration-order' ) );\n\n/**\n* @name maxViewBufferIndex\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/max-view-buffer-index}\n*/\nsetReadOnly( ns, 'maxViewBufferIndex', require( './../../base/max-view-buffer-index' ) );\n\n/**\n* @name maybeBroadcastArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/maybe-broadcast-array}\n*/\nsetReadOnly( ns, 'maybeBroadcastArray', require( './../../base/maybe-broadcast-array' ) );\n\n/**\n* @name metaDataProps\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/meta-data-props}\n*/\nsetReadOnly( ns, 'metaDataProps', require( './../../base/meta-data-props' ) );\n\n/**\n* @name minViewBufferIndex\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/min-view-buffer-index}\n*/\nsetReadOnly( ns, 'minViewBufferIndex', require( './../../base/min-view-buffer-index' ) );\n\n/**\n* @name minmaxViewBufferIndex\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/minmax-view-buffer-index}\n*/\nsetReadOnly( ns, 'minmaxViewBufferIndex', require( './../../base/minmax-view-buffer-index' ) );\n\n/**\n* @name ndarraylike2object\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/ndarraylike2object}\n*/\nsetReadOnly( ns, 'ndarraylike2object', require( './../../base/ndarraylike2object' ) );\n\n/**\n* @name ndims\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/ndims}\n*/\nsetReadOnly( ns, 'ndims', require( './../../base/ndims' ) );\n\n/**\n* @name nextCartesianIndex\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/next-cartesian-index}\n*/\nsetReadOnly( ns, 'nextCartesianIndex', require( './../../base/next-cartesian-index' ) );\n\n/**\n* @name nonsingletonDimensions\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/nonsingleton-dimensions}\n*/\nsetReadOnly( ns, 'nonsingletonDimensions', require( './../../base/nonsingleton-dimensions' ) );\n\n/**\n* @name nullary\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/nullary}\n*/\nsetReadOnly( ns, 'nullary', require( './../../base/nullary' ) );\n\n/**\n* @name nullaryLoopOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/nullary-loop-interchange-order}\n*/\nsetReadOnly( ns, 'nullaryLoopOrder', require( './../../base/nullary-loop-interchange-order' ) );\n\n/**\n* @name nullaryBlockSize\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/nullary-tiling-block-size}\n*/\nsetReadOnly( ns, 'nullaryBlockSize', require( './../../base/nullary-tiling-block-size' ) );\n\n/**\n* @name numel\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/numel}\n*/\nsetReadOnly( ns, 'numel', require( './../../base/numel' ) );\n\n/**\n* @name offset\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/offset}\n*/\nsetReadOnly( ns, 'offset', require( './../../base/offset' ) );\n\n/**\n* @name order\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/order}\n*/\nsetReadOnly( ns, 'order', require( './../../base/order' ) );\n\n/**\n* @name outputPolicyEnum2Str\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/output-policy-enum2str}\n*/\nsetReadOnly( ns, 'outputPolicyEnum2Str', require( './../../base/output-policy-enum2str' ) );\n\n/**\n* @name outputPolicyResolveEnum\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/output-policy-resolve-enum}\n*/\nsetReadOnly( ns, 'outputPolicyResolveEnum', require( './../../base/output-policy-resolve-enum' ) );\n\n/**\n* @name outputPolicyResolveStr\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/output-policy-resolve-str}\n*/\nsetReadOnly( ns, 'outputPolicyResolveStr', require( './../../base/output-policy-resolve-str' ) );\n\n/**\n* @name outputPolicyStr2Enum\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/output-policy-str2enum}\n*/\nsetReadOnly( ns, 'outputPolicyStr2Enum', require( './../../base/output-policy-str2enum' ) );\n\n/**\n* @name prependSingletonDimensions\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/prepend-singleton-dimensions}\n*/\nsetReadOnly( ns, 'prependSingletonDimensions', require( './../../base/prepend-singleton-dimensions' ) );\n\n/**\n* @name removeSingletonDimensions\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/remove-singleton-dimensions}\n*/\nsetReadOnly( ns, 'removeSingletonDimensions', require( './../../base/remove-singleton-dimensions' ) );\n\n/**\n* @name serializeMetaData\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/serialize-meta-data}\n*/\nsetReadOnly( ns, 'serializeMetaData', require( './../../base/serialize-meta-data' ) );\n\n/**\n* @name shape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/shape}\n*/\nsetReadOnly( ns, 'shape', require( './../../base/shape' ) );\n\n/**\n* @name shape2strides\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/shape2strides}\n*/\nsetReadOnly( ns, 'shape2strides', require( './../../base/shape2strides' ) );\n\n/**\n* @name singletonDimensions\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/singleton-dimensions}\n*/\nsetReadOnly( ns, 'singletonDimensions', require( './../../base/singleton-dimensions' ) );\n\n/**\n* @name slice\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/slice}\n*/\nsetReadOnly( ns, 'slice', require( './../../base/slice' ) );\n\n/**\n* @name sliceAssign\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/slice-assign}\n*/\nsetReadOnly( ns, 'sliceAssign', require( './../../base/slice-assign' ) );\n\n/**\n* @name sliceDimension\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/slice-dimension}\n*/\nsetReadOnly( ns, 'sliceDimension', require( './../../base/slice-dimension' ) );\n\n/**\n* @name strides\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/strides}\n*/\nsetReadOnly( ns, 'strides', require( './../../base/strides' ) );\n\n/**\n* @name strides2offset\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/strides2offset}\n*/\nsetReadOnly( ns, 'strides2offset', require( './../../base/strides2offset' ) );\n\n/**\n* @name strides2order\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/strides2order}\n*/\nsetReadOnly( ns, 'strides2order', require( './../../base/strides2order' ) );\n\n/**\n* @name sub2ind\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/sub2ind}\n*/\nsetReadOnly( ns, 'sub2ind', require( './../../base/sub2ind' ) );\n\n/**\n* @name ndarray2array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/to-array}\n*/\nsetReadOnly( ns, 'ndarray2array', require( './../../base/to-array' ) );\n\n/**\n* @name transpose\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/transpose}\n*/\nsetReadOnly( ns, 'transpose', require( './../../base/transpose' ) );\n\n/**\n* @name unary\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/unary}\n*/\nsetReadOnly( ns, 'unary', require( './../../base/unary' ) );\n\n/**\n* @name unaryBy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/unary-by}\n*/\nsetReadOnly( ns, 'unaryBy', require( './../../base/unary-by' ) );\n\n/**\n* @name unaryLoopOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/unary-loop-interchange-order}\n*/\nsetReadOnly( ns, 'unaryLoopOrder', require( './../../base/unary-loop-interchange-order' ) );\n\n/**\n* @name unaryOutputDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/unary-output-dtype}\n*/\nsetReadOnly( ns, 'unaryOutputDataType', require( './../../base/unary-output-dtype' ) );\n\n/**\n* @name unaryBlockSize\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/unary-tiling-block-size}\n*/\nsetReadOnly( ns, 'unaryBlockSize', require( './../../base/unary-tiling-block-size' ) );\n\n/**\n* @name vind2bind\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/vind2bind}\n*/\nsetReadOnly( ns, 'vind2bind', require( './../../base/vind2bind' ) );\n\n/**\n* @name wrapIndex\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/wrap-index}\n*/\nsetReadOnly( ns, 'wrapIndex', require( './../../base/wrap-index' ) );\n\n/**\n* @name zeros\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/zeros}\n*/\nsetReadOnly( ns, 'zeros', require( './../../base/zeros' ) );\n\n/**\n* @name zerosLike\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/zeros-like}\n*/\nsetReadOnly( ns, 'zerosLike', require( './../../base/zeros-like' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );\nvar isCollection = require( '@stdlib/assert/is-collection' );\nvar isNonNegativeInteger = require( '@stdlib/assert/is-nonnegative-integer' ).isPrimitive;\nvar copy = require( '@stdlib/array/base/copy-indexed' );\nvar getDType = require( './../../dtype' );\nvar getShape = require( './../../shape' );\nvar getStrides = require( './../../strides' );\nvar getOffset = require( './../../offset' );\nvar getOrder = require( './../../order' );\nvar getData = require( './../../data-buffer' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Broadcasts an ndarray to a specified shape.\n*\n* ## Notes\n*\n* - The returned array is a **read-only** view on the input array data buffer. The view is typically **not** contiguous. As more than one element of a returned view may refer to the same memory location, writing to the input array may affect multiple elements. If you need to write to the input array, copy the input array before broadcasting.\n*\n* @param {ndarray} x - input array\n* @param {NonNegativeIntegerArray} shape - desired shape\n* @throws {TypeError} first argument must be an ndarray\n* @throws {TypeError} second argument must be an array of nonnegative integers\n* @throws {Error} input array cannot have more dimensions than the desired shape\n* @throws {Error} input array dimension sizes must be `1` or equal to the corresponding dimension in the provided shape\n* @throws {Error} input array and desired shape must be broadcast compatible\n* @returns {ndarray} broadcasted array\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var shx = x.shape;\n* // returns [ 2, 2 ]\n*\n* var y = broadcastArray( x, [ 3, 2, 2 ] );\n* // returns \n*\n* var shy = y.shape;\n* // returns [ 3, 2, 2 ]\n*\n* var v = y.get( 0, 0, 0 );\n* // returns 1\n*\n* v = y.get( 0, 0, 1 );\n* // returns 2\n*\n* v = y.get( 1, 0, 0 );\n* // returns 1\n*\n* v = y.get( 1, 1, 0 );\n* // returns 3\n*\n* v = y.get( 2, 0, 0 );\n* // returns 1\n*\n* v = y.get( 2, 1, 1 );\n* // returns 4\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var y = broadcastArray( x, [ 3, 2 ] );\n* // throws \n*/\nfunction broadcastArray( x, shape ) {\n\tvar strides;\n\tvar dim;\n\tvar sh;\n\tvar st;\n\tvar N;\n\tvar M;\n\tvar d;\n\tvar i;\n\tvar j;\n\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ndarray. Value: `%s`.', x ) );\n\t}\n\tif ( !isCollection( shape ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an array of nonnegative integers. Value: `%s`.', shape ) );\n\t}\n\tN = shape.length;\n\tsh = getShape( x );\n\tM = sh.length;\n\tif ( N < M ) {\n\t\tthrow new Error( 'invalid argument. Cannot broadcast an array to a shape having fewer dimensions. Arrays can only be broadcasted to shapes having the same or more dimensions.' );\n\t}\n\t// Initialize a strides array...\n\tstrides = [];\n\tfor ( i = 0; i < N; i++ ) {\n\t\tstrides.push( 0 );\n\t}\n\t// Determine the output array strides...\n\tst = getStrides( x );\n\tfor ( i = N-1; i >= 0; i-- ) {\n\t\tj = M - N + i;\n\t\tif ( j < 0 ) {\n\t\t\t// Prepended singleton dimension; stride is zero...\n\t\t\tcontinue;\n\t\t}\n\t\td = sh[ j ];\n\t\tdim = shape[ i ];\n\t\tif ( !isNonNegativeInteger( dim ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an array of nonnegative integers. Value: `%s`.', '[' + shape.join( ',' ) + ']' ) );\n\t\t}\n\t\tif ( dim !== 0 && dim < d ) {\n\t\t\tthrow new Error( format( 'invalid argument. Input array cannot be broadcast to the specified shape, as the specified shape has a dimension whose size is less than the size of the corresponding dimension in the input array. Array shape: (%s). Desired shape: (%s). Dimension: %u.', copy( sh ).join( ', ' ), copy( shape ).join( ', ' ), i ) );\n\t\t}\n\t\tif ( d === dim ) {\n\t\t\tstrides[ i ] = st[ j ];\n\t\t} else if ( d === 1 ) {\n\t\t\t// In order to broadcast dimensions, we set the stride for that dimension to zero...\n\t\t\tstrides[ i ] = 0;\n\t\t} else {\n\t\t\t// At this point, we know that `dim > d` and that `d` does not equal `1` (e.g., `dim=3` and `d=2`); in which case, the shapes are considered incompatible (even for desired shapes which are multiples of array dimensions, as might be desired when \"tiling\" an array; e.g., `dim=4` and `d=2`)...\n\t\t\tthrow new Error( format( 'invalid argument. Input array and the specified shape are broadcast incompatible. Array shape: (%s). Desired shape: (%s). Dimension: %u.', copy( sh ).join( ', ' ), copy( shape ).join( ', ' ), i ) );\n\t\t}\n\t}\n\treturn new x.constructor( getDType( x ), getData( x ), copy( shape ), strides, getOffset( x ), getOrder( x ), { // eslint-disable-line max-len\n\t\t'readonly': true\n\t});\n}\n\n\n// EXPORTS //\n\nmodule.exports = broadcastArray;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Broadcast an ndarray to a specified shape.\n*\n* @module @stdlib/ndarray/broadcast-array\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var broadcastArray = require( '@stdlib/ndarray/broadcast-array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var shx = x.shape;\n* // returns [ 2, 2 ]\n*\n* var y = broadcastArray( x, [ 3, 2, 2 ] );\n* // returns \n*\n* var shy = y.shape;\n* // returns [ 3, 2, 2 ]\n*\n* var v = y.get( 0, 0, 0 );\n* // returns 1\n*\n* v = y.get( 0, 0, 1 );\n* // returns 2\n*\n* v = y.get( 1, 0, 0 );\n* // returns 1\n*\n* v = y.get( 1, 1, 0 );\n* // returns 3\n*\n* v = y.get( 2, 0, 0 );\n* // returns 1\n*\n* v = y.get( 2, 1, 1 );\n* // returns 4\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the first row index at which a given one-dimensional array of types can be found in a two-dimensional reference array of types (or `-1` if not found).\n*\n* ## Notes\n*\n* - The intended use case for this function is for type dispatch (i.e., given a set of array data types, find a matching interface according the interface's accepted array data types).\n* - The function assumes that `x` is stored in row-major order.\n* - The function assumes that the number of indexed elements in `y` equals the number of columns in `x`.\n* - The function returns a row index. To convert to a linear index, multiply `strideX1` by the return value.\n*\n* @private\n* @param {NonNegativeInteger} N - number of rows in `x` (size of first dimension)\n* @param {NonNegativeInteger} M - number of columns in `x` (size of second dimension)\n* @param {ArrayLikeObject} x - input two-dimensional reference array\n* @param {integer} strideX1 - `x` stride length along first dimension\n* @param {integer} strideX2 - `x` stride length along second dimension\n* @param {NonNegativeInteger} offsetX - `x` starting index\n* @param {ArrayLikeObject} y - search array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - `y` starting index\n* @returns {integer} row index (if found) and `-1` otherwise\n*\n* @example\n* // Define a reference array to search:\n* var types = [\n* 'float64', 'float64', 'float64',\n* 'float32', 'float32', 'float32',\n* 'uint32', 'uint32', 'float64',\n* 'int32', 'int32', 'float64',\n* 'uint16', 'uint16', 'float64',\n* 'int16', 'int16', 'float64',\n* 'uint8', 'uint8', 'float64',\n* 'int8', 'int8', 'float64'\n* ];\n*\n* // Define reference array dimensions:\n* var N = 8; // rows\n* var M = 3; // columns\n*\n* // Define a search array:\n* y1 = [\n* 'float32', 'float32', 'float32',\n* ];\n*\n* // Find the list of types:\n* var r1 = indexOfTypes( N, M, types, M, 1, 0, y1, 1, 0 );\n* // returns 1\n*\n// Define a search array:\n* y2 = [\n* 'float32', 'float32', 'float64',\n* ];\n*\n* // Find the list of types:\n* var r2 = indexOfTypes( N, M, types, M, 1, 0, y2, 1, 0 );\n* // returns -1\n*/\nfunction indexOfTypes( N, M, x, strideX1, strideX2, offsetX, y, strideY, offsetY ) { // eslint-disable-line max-len\n\tvar ix;\n\tvar iy;\n\tvar i;\n\tvar j;\n\n\t// Search for the first row which matches `y`...\n\tix = offsetX;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tiy = offsetY;\n\t\tfor ( j = 0; j < M; j++ ) {\n\t\t\tif ( x[ ix+(j*strideX2) ] !== y[ iy ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tiy += strideY;\n\t\t}\n\t\t// If we successfully iterated over all columns, then that means we've found a match...\n\t\tif ( j === M ) {\n\t\t\treturn i;\n\t\t}\n\t\tix += strideX1;\n\t}\n\treturn -1;\n}\n\n\n// EXPORTS //\n\nmodule.exports = indexOfTypes;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isNonNegativeInteger = require( '@stdlib/assert/is-nonnegative-integer' ).isPrimitive;\nvar isPositiveInteger = require( '@stdlib/assert/is-positive-integer' );\nvar isInteger = require( '@stdlib/assert/is-integer' ).isPrimitive;\nvar isFunctionArray = require( '@stdlib/assert/is-function-array' );\nvar isFunction = require( '@stdlib/assert/is-function' );\nvar isCollection = require( '@stdlib/assert/is-collection' );\nvar isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );\nvar format = require( '@stdlib/string/format' );\nvar getDType = require( './../../dtype' );\nvar resolveEnum = require( './../../base/dtype-resolve-enum' );\nvar indexOfTypes = require( './index_of_types.js' );\n\n\n// FUNCTIONS //\n\n/**\n* Returns a list of data type enumeration constants.\n*\n* @private\n* @param {Collection} types - list of types\n* @returns {IntegerArray} list of data type enumeration constants\n*/\nfunction types2enums( types ) {\n\tvar out;\n\tvar i;\n\n\tout = [];\n\tfor ( i = 0; i < types.length; i++ ) {\n\t\tout.push( resolveEnum( types[ i ] ) );\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Returns an ndarray function interface which performs multiple dispatch.\n*\n* @param {(FunctionArray|Function)} fcns - list of ndarray functions\n* @param {Collection} types - one-dimensional list of ndarray argument data types\n* @param {(Collection|null)} data - ndarray function data (e.g., callbacks)\n* @param {PositiveInteger} nargs - total number of ndarray function interface arguments\n* @param {NonNegativeInteger} nin - number of input ndarrays\n* @param {NonNegativeInteger} nout - number of output ndarrays\n* @throws {TypeError} first argument must be either a function or an array of functions\n* @throws {TypeError} second argument must be an array-like object\n* @throws {TypeError} third argument must be an array-like object or `null`\n* @throws {Error} third and first arguments must have the same number of elements\n* @throws {TypeError} fourth argument must be a positive integer\n* @throws {TypeError} fifth argument must be a nonnegative integer\n* @throws {TypeError} sixth argument must be a nonnegative integer\n* @throws {Error} fourth argument must equal the specified number of input and output arrays\n* @throws {Error} number of types must match the number of functions times the total number of array arguments for each function\n* @throws {Error} interface must accept at least one input and/or output ndarray\n* @returns {Function} ndarray function interface\n*\n* @example\n* var unary = require( '@stdlib/ndarray/base/unary' );\n* var abs = require( '@stdlib/math/base/special/abs' );\n* var Float64Array = require( '@stdlib/array/float64' );\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n*\n* var types = [\n* 'float64', 'float64'\n* ];\n*\n* var data = [\n* abs\n* ];\n*\n* var absolute = dispatch( unary, types, data, 2, 1, 1 );\n*\n* // ...\n*\n* var xbuf = new Float64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0 ] );\n* var ybuf = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] );\n*\n* var x = ndarray( 'float64', xbuf, [ 5 ], [ 1 ], 0, 'row-major' );\n* var y = ndarray( 'float64', ybuf, [ 5 ], [ 1 ], 0, 'row-major' );\n*\n* absolute( x, y );\n* // ybuf => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\nfunction dispatch( fcns, types, data, nargs, nin, nout ) {\n\tvar narrays;\n\tvar nfcns;\n\tvar fcn;\n\n\tif ( isFunction( fcns ) ) {\n\t\tfcn = fcns;\n\t} else if ( !isFunctionArray( fcns ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be either a function or an array of functions. Value: `%s`.', fcns ) );\n\t}\n\tif ( !isCollection( types ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an array-like object. Value: `%s`.', types ) );\n\t}\n\tif ( !isCollection( data ) && data !== null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an array-like object or null. Value: `%s`.', data ) );\n\t}\n\tif ( !isPositiveInteger( nargs ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Fourth argument must be a positive integer. Value: `%s`.', nargs ) );\n\t}\n\tif ( !isNonNegativeInteger( nin ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Fifth argument must be a nonnegative integer. Value: `%s`.', nin ) );\n\t}\n\tif ( !isNonNegativeInteger( nout ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Sixth argument must be a nonnegative integer. Value: `%s`.', nout ) );\n\t}\n\tnarrays = nin + nout;\n\tif ( narrays === 0 ) {\n\t\tthrow new Error( 'invalid arguments. Interface must accept at least one input and/or output ndarray. Based on the provided arguments, `nin+nout` equals `0`.' );\n\t}\n\tif ( nargs !== narrays ) {\n\t\tthrow new Error( 'invalid arguments. Fourth argument does not equal the number of input and output ndarrays.' );\n\t}\n\tif ( fcn ) {\n\t\tnfcns = types.length / narrays;\n\t\tif ( !isInteger( nfcns ) ) {\n\t\t\tthrow new Error( 'invalid argument. Unexpected number of types. A type must be specified for each input and output ndarray for each provided ndarray function.' );\n\t\t}\n\t} else {\n\t\tnfcns = fcns.length;\n\t\tif ( types.length !== nfcns*narrays ) {\n\t\t\tthrow new Error( 'invalid argument. Unexpected number of types. A type must be specified for each input and output ndarray for each provided ndarray function.' );\n\t\t}\n\t}\n\tif ( data && data.length !== nfcns ) {\n\t\tthrow new Error( 'invalid argument. The third argument must have the same number of elements as the first argument.' );\n\t}\n\ttypes = types2enums( types );\n\treturn dispatcher;\n\n\t/**\n\t* ndarray function interface which performs multiple dispatch.\n\t*\n\t* @private\n\t* @param {ndarrayLike} x - ndarray\n\t* @param {...ndarrayLike} args - ndarray arguments\n\t* @throws {Error} insufficient arguments\n\t* @throws {Error} too many arguments\n\t* @throws {TypeError} input array arguments must be ndarray-like objects\n\t* @throws {TypeError} output array arguments must be ndarray-like objects\n\t* @throws {TypeError} unable to resolve an ndarray function supporting the provided ndarray argument data types\n\t* @returns {(ndarrayLike|Array|void)} destination array(s)\n\t*/\n\tfunction dispatcher() {\n\t\tvar arrays;\n\t\tvar dtypes;\n\t\tvar argc;\n\t\tvar idx;\n\t\tvar v;\n\t\tvar f;\n\t\tvar i;\n\n\t\targc = arguments.length;\n\t\tif ( argc !== nargs ) {\n\t\t\tif ( argc < nargs ) {\n\t\t\t\tthrow new Error( 'invalid invocation. Insufficient arguments.' );\n\t\t\t}\n\t\t\tthrow new Error( 'invalid invocation. Too many arguments.' );\n\t\t}\n\t\tarrays = [];\n\t\tdtypes = [];\n\t\tfor ( i = 0; i < nargs; i++ ) {\n\t\t\tv = arguments[ i ];\n\t\t\tif ( !isndarrayLike( v ) ) {\n\t\t\t\tif ( i < nin ) {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Input array must be an ndarray-like object. Value: `%s`.', v ) );\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Output array must be an ndarray-like object. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\tarrays.push( v );\n\t\t\tdtypes.push( resolveEnum( getDType( v ) ) );\n\t\t}\n\t\t// Resolve the ndarray function satisfying the input array types:\n\t\tidx = indexOfTypes( nfcns, narrays, types, narrays, 1, 0, dtypes, 1, 0 ); // eslint-disable-line max-len\n\n\t\t// Check whether we were able to successfully resolve an ndarray function:\n\t\tif ( idx < 0 ) {\n\t\t\tthrow new TypeError( 'invalid arguments. Unable to resolve an ndarray function supporting the provided array argument data types.' );\n\t\t}\n\t\t// Retrieve the ndarray function:\n\t\tif ( fcn ) {\n\t\t\tf = fcn;\n\t\t} else {\n\t\t\tf = fcns[ idx ];\n\t\t}\n\t\t// Evaluate the ndarray function:\n\t\tif ( data ) {\n\t\t\tf( arrays, data[ idx ] );\n\t\t} else {\n\t\t\tf( arrays );\n\t\t}\n\t\tif ( nout === 1 ) {\n\t\t\treturn arrays[ narrays-1 ];\n\t\t}\n\t\tif ( nout === 0 ) {\n\t\t\treturn;\n\t\t}\n\t\treturn arrays.slice( nin );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = dispatch;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create an ndarray function interface which performs multiple dispatch.\n*\n* @module @stdlib/ndarray/dispatch\n*\n* @example\n* var dispatch = require( '@stdlib/ndarray/dispatch' );\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n* var unary = require( '@stdlib/ndarray/base/unary' );\n* var abs = require( '@stdlib/math/base/special/abs' );\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var types = [\n* 'float64', 'float64'\n* ];\n*\n* var data = [\n* abs\n* ];\n*\n* var absolute = dispatch( unary, types, data, 2, 1, 1 );\n*\n* // ...\n*\n* var xbuf = new Float64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0 ] );\n* var ybuf = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] );\n*\n* var x = ndarray( 'float64', xbuf, [ 5 ], [ 1 ], 0, 'row-major' );\n* var y = ndarray( 'float64', ybuf, [ 5 ], [ 1 ], 0, 'row-major' );\n*\n* absolute( x, y );\n* // ybuf => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isPlainObject = require( '@stdlib/assert/is-plain-object' );\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar isArrayLike = require( '@stdlib/assert/is-array-like' );\nvar shape2strides = require( './../../base/shape2strides' );\nvar strides2offset = require( './../../base/strides2offset' );\nvar emptyArray = require( '@stdlib/array/empty' );\nvar allocUnsafe = require( '@stdlib/buffer/alloc-unsafe' );\nvar numel = require( './../../base/numel' );\nvar ndarray = require( './../../ctor' );\nvar defaults = require( './../../defaults' );\nvar format = require( '@stdlib/string/format' );\n\n\n// VARIABLES //\n\nvar DTYPE = defaults.get( 'dtypes.default' );\nvar ORDER = defaults.get( 'order' );\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized ndarray having a specified shape and data type.\n*\n* @param {(NonNegativeIntegerArray|NonNegativeInteger)} shape - array shape\n* @param {Options} [options] - options\n* @param {string} [options.dtype='float64'] - data type\n* @param {string} [options.order='row-major'] - array order\n* @param {string} [options.mode=\"throw\"] - specifies how to handle indices which exceed array dimensions\n* @param {StringArray} [options.submode=[\"throw\"]] - specifies how to handle subscripts which exceed array dimensions on a per dimension basis\n* @throws {TypeError} first argument must be either a nonnegative integer or an array of nonnegative integers\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} `dtype` option must be a recognized data type\n* @throws {TypeError} `order` option must be a recognized array order\n* @throws {TypeError} must provide valid options\n* @returns {ndarray} ndarray\n*\n* @example\n* var arr = empty( [ 2, 2 ] );\n* // returns \n*\n* var sh = arr.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = arr.dtype;\n* // returns 'float64'\n*/\nfunction empty( shape ) {\n\tvar options;\n\tvar dtype;\n\tvar order;\n\tvar ndims;\n\tvar opts;\n\tvar buf;\n\tvar len;\n\tvar st;\n\tvar sh;\n\n\topts = {};\n\tif ( arguments.length > 1 ) {\n\t\toptions = arguments[ 1 ];\n\t\tif ( !isPlainObject( options ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t\t}\n\t\tif ( hasOwnProp( options, 'dtype' ) ) {\n\t\t\tdtype = options.dtype;\n\t\t} else {\n\t\t\tdtype = DTYPE;\n\t\t}\n\t\tif ( hasOwnProp( options, 'order' ) ) {\n\t\t\torder = options.order;\n\t\t} else {\n\t\t\torder = ORDER;\n\t\t}\n\t\tif ( hasOwnProp( options, 'mode' ) ) {\n\t\t\topts.mode = options.mode;\n\t\t}\n\t\tif ( hasOwnProp( options, 'submode' ) ) {\n\t\t\topts.submode = options.submode;\n\t\t}\n\t} else {\n\t\tdtype = DTYPE;\n\t\torder = ORDER;\n\t}\n\tif ( typeof shape === 'number' ) {\n\t\tsh = [ shape ];\n\t} else if ( isArrayLike( shape ) ) {\n\t\tsh = shape;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be either a nonnegative integer or an array of nonnegative integers. Value: `%s`.', shape ) );\n\t}\n\tndims = sh.length;\n\tif ( ndims > 0 ) {\n\t\tlen = numel( sh );\n\t\tif ( len !== len || len < 0 ) {\n\t\t\t// We should only get here if we've been provided an invalid shape (e.g., an array containing negative integers, etc)...\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be either a nonnegative integer or an array of nonnegative integers. Value: `%s`.', shape ) );\n\t\t}\n\t\tst = shape2strides( sh, order );\n\t} else {\n\t\t// For 0-dimensional arrays, the buffer should contain a single element...\n\t\tlen = 1;\n\t\tst = [ 0 ];\n\t}\n\tif ( dtype === 'binary' ) {\n\t\tbuf = allocUnsafe( len );\n\t} else {\n\t\tbuf = emptyArray( len, dtype );\n\t}\n\treturn new ndarray( dtype, buf, sh, st, strides2offset( sh, st ), order, opts ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = empty;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create an uninitialized ndarray having a specified shape and data type.\n*\n* @module @stdlib/ndarray/empty\n*\n* @example\n* var empty = require( '@stdlib/ndarray/empty' );\n*\n* var arr = empty( [ 2, 2 ], {\n* 'dtype': 'float32'\n* });\n* // returns \n*\n* var sh = arr.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = arr.dtype;\n* // returns 'float32'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );\nvar isPlainObject = require( '@stdlib/assert/is-plain-object' );\nvar isNonNegativeIntegerArray = require( '@stdlib/assert/is-nonnegative-integer-array' ).primitives;\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar shape2strides = require( './../../base/shape2strides' );\nvar strides2offset = require( './../../base/strides2offset' );\nvar numel = require( './../../base/numel' );\nvar getDType = require( './../../dtype' );\nvar getShape = require( './../../shape' );\nvar getOrder = require( './../../order' );\nvar ndarray = require( './../../ctor' );\nvar emptyArray = require( '@stdlib/array/empty' );\nvar allocUnsafe = require( '@stdlib/buffer/alloc-unsafe' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized ndarray having the same shape and data type as a provided ndarray.\n*\n* @param {ndarray} x - input array\n* @param {Options} [options] - function options\n* @param {string} [options.dtype] - output array data type (overrides the input array's inferred data type)\n* @param {string} [options.order] - specifies whether the output array should be 'row-major' (C-style) or 'column-major' (Fortran-style) (overrides the input array's inferred order)\n* @param {(NonNegativeIntegerArray|NonNegativeInteger)} [options.shape] - output array shape (overrides the input array's inferred shape)\n* @param {string} [options.mode=\"throw\"] - specifies how to handle indices which exceed array dimensions\n* @param {StringArray} [options.submode=[\"throw\"]] - specifies how to handle subscripts which exceed array dimensions on a per dimension basis\n* @throws {TypeError} first argument must have a recognized data type\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} `dtype` option must be a supported ndarray data type\n* @throws {TypeError} `order` option must be a supported order\n* @throws {TypeError} `shape` option must be either a nonnegative integer or an array of nonnegative integers\n* @throws {TypeError} must provide valid options\n* @returns {ndarray} ndarray\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var x = zeros( [ 2, 2 ] );\n* // returns \n*\n* var y = emptyLike( x );\n* // returns \n*\n* var sh = y.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = y.dtype;\n* // returns 'float64'\n*/\nfunction emptyLike( x ) {\n\tvar options;\n\tvar dtype;\n\tvar order;\n\tvar ndims;\n\tvar opts;\n\tvar buf;\n\tvar len;\n\tvar st;\n\tvar sh;\n\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ndarray-like object. Value: `%s`.', x ) );\n\t}\n\topts = {};\n\tif ( arguments.length > 1 ) {\n\t\toptions = arguments[ 1 ];\n\t\tif ( !isPlainObject( options ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t\t}\n\t\tif ( hasOwnProp( options, 'dtype' ) ) {\n\t\t\tdtype = options.dtype;\n\t\t} else {\n\t\t\tdtype = getDType( x );\n\t\t}\n\t\tif ( hasOwnProp( options, 'shape' ) ) {\n\t\t\tsh = options.shape;\n\t\t\tif ( typeof sh === 'number' ) {\n\t\t\t\tsh = [ sh ];\n\t\t\t}\n\t\t\tif ( !isNonNegativeIntegerArray( sh ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a nonnegative integer or an array of nonnegative integers. Option: `%s`.', 'shape', sh ) );\n\t\t\t}\n\t\t} else {\n\t\t\tsh = getShape( x );\n\t\t}\n\t\tif ( hasOwnProp( options, 'order' ) ) {\n\t\t\torder = options.order;\n\t\t} else {\n\t\t\torder = getOrder( x );\n\t\t}\n\t\tif ( hasOwnProp( options, 'mode' ) ) {\n\t\t\topts.mode = options.mode;\n\t\t}\n\t\tif ( hasOwnProp( options, 'submode' ) ) {\n\t\t\topts.submode = options.submode;\n\t\t}\n\t} else {\n\t\tdtype = getDType( x );\n\t\tsh = getShape( x );\n\t\torder = getOrder( x );\n\t}\n\tndims = sh.length;\n\tif ( ndims > 0 ) {\n\t\tlen = numel( sh );\n\t\tst = shape2strides( sh, order );\n\t} else {\n\t\t// For 0-dimensional arrays, the buffer should contain a single element...\n\t\tlen = 1;\n\t\tst = [ 0 ];\n\t}\n\tif ( dtype === 'binary' ) {\n\t\tbuf = allocUnsafe( len );\n\t} else {\n\t\tbuf = emptyArray( len, dtype );\n\t}\n\treturn new ndarray( dtype, buf, sh, st, strides2offset( sh, st ), order, opts ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = emptyLike;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create an uninitialized ndarray having the same shape and data type as a provided ndarray.\n*\n* @module @stdlib/ndarray/empty-like\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var emptyLike = require( '@stdlib/ndarray/empty-like' );\n*\n* var x = zeros( [ 2, 2 ] );\n* // returns \n*\n* var y = emptyLike( x );\n* // returns \n*\n* var sh = y.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = y.dtype;\n* // returns 'float64'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Regular expression for testing whether a string is an integer string.\n*\n* @private\n* @name RE_INTEGER\n* @type {RegExp}\n*\n* @example\n* var bool = RE_INTEGER.test( '10' );\n* // returns true\n*\n* @example\n* var bool = RE_INTEGER.test( '-1' );\n* // returns true\n*\n* @example\n* var bool = RE_INTEGER.test( '0:10:2' );\n* // returns false\n*/\nvar RE_INTEGER = /^-?[0-9]+$/;\n\n\n// EXPORTS //\n\nmodule.exports = RE_INTEGER;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Regular expression for testing whether a string is a subsequence string.\n*\n* @private\n* @name RE_SUBSEQ\n* @type {RegExp}\n*\n* @example\n* var bool = RE_SUBSEQ.test( '0:10:2' );\n* // returns true\n*\n* @example\n* var bool = RE_SUBSEQ.test( '0' );\n* // returns false\n*\n* @example\n* var bool = RE_SUBSEQ.test( 'Slice(0,10,2)' );\n* // returns false\n*/\nvar RE_SUBSEQ = /:/;\n\n\n// EXPORTS //\n\nmodule.exports = RE_SUBSEQ;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar trim = require( '@stdlib/string/base/trim' );\nvar replace = require( '@stdlib/string/base/replace' );\nvar MultiSlice = require( '@stdlib/slice/multi' );\nvar str2multislice = require( '@stdlib/slice/base/str2multislice' );\nvar seq2multislice = require( '@stdlib/slice/base/seq2multislice' );\nvar str2slice = require( '@stdlib/slice/base/str2slice' );\nvar format = require( '@stdlib/string/format' );\nvar RE_INTEGER = require( './re_integer.js' );\nvar RE_SUBSEQ = require( './re_subseq.js' );\n\n\n// MAIN //\n\n/**\n* Converts a zero-dimensional ndarray indexing expression to a slice.\n*\n* @private\n* @param {Object} target - target object\n* @param {string} property - property name\n* @param {boolean} strict - boolean indicating whether to enforce strict bounds checking\n* @throws {Error} invalid slice operation\n* @throws {RangeError} number of slice dimensions must match the number of array dimensions\n* @returns {MultiSlice} multi-slice object\n*/\nfunction prop2slice( target, property ) {\n\tvar shape;\n\tvar prop;\n\tvar ch;\n\tvar s;\n\n\tprop = trim( property );\n\n\t// Retrieve the first character in order to to detect how a slice operation was specified:\n\tch = prop[ 0 ];\n\n\t// Case: slice\n\tif ( ch === 'S' ) {\n\t\t// Convert the string to a slice object:\n\t\ts = str2slice( property );\n\t\tif ( s === null ) {\n\t\t\tthrow new Error( format( 'invalid operation. Unsupported slice operation. Value: `%s`.', property ) );\n\t\t}\n\t\t// Create a multi-slice:\n\t\ts = new MultiSlice( s );\n\t}\n\t// Case: multi-slice\n\telse if ( ch === 'M' ) {\n\t\t// Convert the string to a slice object:\n\t\ts = str2multislice( prop );\n\t\tif ( s === null ) {\n\t\t\tthrow new Error( format( 'invalid operation. Unsupported slice operation. Value: `%s`.', property ) );\n\t\t}\n\t}\n\t// Case: integer\n\telse if ( RE_INTEGER.test( prop ) ) {\n\t\t// Convert the string to a numeric value:\n\t\ts = parseInt( prop, 10 );\n\n\t\t// Create a multi-slice:\n\t\ts = new MultiSlice( s );\n\t}\n\t// Case: subsequence string (e.g., ':10,1,::-1,:,-5,2::3')\n\telse if ( RE_SUBSEQ.test( prop ) ) {\n\t\tshape = target.shape;\n\t\ts = seq2multislice( prop, shape, true );\n\t\tif ( s.code ) {\n\t\t\tif ( s.code === 'ERR_SLICE_INVALID_INCREMENT' ) {\n\t\t\t\tthrow new Error( format( 'invalid operation. A subsequence increment must be a non-zero integer. Value: `%s`.', property ) );\n\t\t\t}\n\t\t\tif ( s.code === 'ERR_SLICE_INVALID_ELLIPSIS' ) {\n\t\t\t\tthrow new Error( format( 'invalid operation. A subsequence may only include a single ellipsis. Value: `%s`.', property ) );\n\t\t\t}\n\t\t\tif ( s.code === 'ERR_SLICE_INVALID_SUBSEQUENCE' ) {\n\t\t\t\tthrow new Error( format( 'invalid operation. Unsupported slice operation. Value: `%s`.', property ) );\n\t\t\t}\n\t\t\t// s.code === 'ERR_SLICE_TOO_MANY_DIMENSIONS'\n\t\t\tthrow new RangeError( format( 'invalid operation. Number of slice dimensions does not match the number of array dimensions. Array shape: (%s). Slice dimensions: %u.', shape.join( ',' ), replace( prop, /\\.\\.\\.,/, '' ).split( ',' ).length ) );\n\t\t}\n\t}\n\t// Case: empty string or ellipsis\n\telse if ( prop.length === 0 || prop === '...' ) {\n\t\ts = new MultiSlice();\n\t}\n\t// Case: non-empty string\n\telse {\n\t\tthrow new Error( format( 'invalid operation. Unsupported slice operation. Value: `%s`.', property ) );\n\t}\n\treturn s;\n}\n\n\n// EXPORTS //\n\nmodule.exports = prop2slice;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar trim = require( '@stdlib/string/base/trim' );\nvar replace = require( '@stdlib/string/base/replace' );\nvar MultiSlice = require( '@stdlib/slice/multi' );\nvar str2multislice = require( '@stdlib/slice/base/str2multislice' );\nvar seq2multislice = require( '@stdlib/slice/base/seq2multislice' );\nvar str2slice = require( '@stdlib/slice/base/str2slice' );\nvar format = require( '@stdlib/string/format' );\nvar RE_INTEGER = require( './re_integer.js' );\n\n\n// MAIN //\n\n/**\n* Converts a one-dimensional ndarray indexing expression to a slice.\n*\n* @private\n* @param {Object} target - target object\n* @param {string} property - property name\n* @param {boolean} strict - boolean indicating whether to enforce strict bounds checking\n* @throws {Error} invalid slice operation\n* @throws {RangeError} number of slice dimensions must match the number of array dimensions\n* @returns {MultiSlice} multi-slice object\n*/\nfunction prop2slice( target, property, strict ) {\n\tvar shape;\n\tvar prop;\n\tvar ch;\n\tvar s;\n\n\tprop = trim( property );\n\n\t// Retrieve the first character in order to to detect how a slice operation was specified:\n\tch = prop[ 0 ];\n\n\t// Case: slice\n\tif ( ch === 'S' ) {\n\t\t// Convert the string to a slice object:\n\t\ts = str2slice( property );\n\t\tif ( s === null ) {\n\t\t\tthrow new Error( format( 'invalid operation. Unsupported slice operation. Value: `%s`.', property ) );\n\t\t}\n\t\t// Create a multi-slice:\n\t\ts = new MultiSlice( s );\n\t}\n\t// Case: multi-slice\n\telse if ( ch === 'M' ) {\n\t\t// Convert the string to a slice object:\n\t\ts = str2multislice( prop );\n\t\tif ( s === null ) {\n\t\t\tthrow new Error( format( 'invalid operation. Unsupported slice operation. Value: `%s`.', property ) );\n\t\t}\n\t}\n\t// Case: integer\n\telse if ( RE_INTEGER.test( prop ) ) {\n\t\t// Convert the string to a numeric value:\n\t\ts = parseInt( prop, 10 );\n\n\t\t// Create a multi-slice:\n\t\ts = new MultiSlice( s );\n\t}\n\t// Case: subsequence string\n\telse if ( prop.length > 0 ) {\n\t\tshape = target.shape;\n\t\ts = seq2multislice( prop, shape, true );\n\t\tif ( s.code ) {\n\t\t\tif ( s.code === 'ERR_SLICE_INVALID_INCREMENT' ) {\n\t\t\t\tthrow new Error( format( 'invalid operation. A subsequence increment must be a non-zero integer. Value: `%s`.', property ) );\n\t\t\t}\n\t\t\tif ( s.code === 'ERR_SLICE_INVALID_ELLIPSIS' ) {\n\t\t\t\tthrow new Error( format( 'invalid operation. A subsequence may only include a single ellipsis. Value: `%s`.', property ) );\n\t\t\t}\n\t\t\tif ( s.code === 'ERR_SLICE_INVALID_SUBSEQUENCE' ) {\n\t\t\t\tthrow new Error( format( 'invalid operation. Unsupported slice operation. Value: `%s`.', property ) );\n\t\t\t}\n\t\t\tif ( s.code === 'ERR_SLICE_TOO_MANY_DIMENSIONS' ) {\n\t\t\t\tthrow new RangeError( format( 'invalid operation. Number of slice dimensions does not match the number of array dimensions. Array shape: (%s). Slice dimensions: %u.', target.shape.join( ',' ), replace( prop, /\\.\\.\\.,/, '' ).split( ',' ).length ) );\n\t\t\t}\n\t\t\t// NOTE: the following error check must come last due to fall-through when in non-strict mode...\n\t\t\tif ( s.code === 'ERR_SLICE_OUT_OF_BOUNDS' ) {\n\t\t\t\tif ( strict ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid operation. Slice exceeds array bounds. Array shape: (%s).', shape.join( ',' ) ) );\n\t\t\t\t}\n\t\t\t\t// Repeat parsing, this time allowing for out-of-bounds slices:\n\t\t\t\ts = seq2multislice( prop, shape, false );\n\t\t\t}\n\t\t}\n\t}\n\t// Case: empty string\n\telse {\n\t\tthrow new RangeError( format( 'invalid operation. Number of slice dimensions does not match the number of array dimensions. Array shape: (%s). Slice dimensions: %u.', target.shape.join( ',' ), 0 ) );\n\t}\n\treturn s;\n}\n\n\n// EXPORTS //\n\nmodule.exports = prop2slice;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar trim = require( '@stdlib/string/base/trim' );\nvar str2multislice = require( '@stdlib/slice/base/str2multislice' );\nvar seq2multislice = require( '@stdlib/slice/base/seq2multislice' );\nvar sargs2multislice = require( '@stdlib/slice/base/sargs2multislice' );\nvar format = require( '@stdlib/string/format' );\nvar RE_SUBSEQ = require( './re_subseq.js' );\n\n\n// MAIN //\n\n/**\n* Converts an n-dimensional ndarray indexing expression to a slice.\n*\n* @private\n* @param {Object} target - target object\n* @param {string} property - property name\n* @param {boolean} strict - boolean indicating whether to enforce strict bounds checking\n* @throws {Error} invalid slice operation\n* @throws {RangeError} number of slice dimensions must match the number of array dimensions\n* @returns {MultiSlice} multi-slice object\n*/\nfunction prop2slice( target, property, strict ) {\n\tvar shape;\n\tvar prop;\n\tvar ch;\n\tvar s;\n\n\tprop = trim( property );\n\n\t// Retrieve the first character in order to to detect how a slice operation was specified:\n\tch = prop[ 0 ];\n\n\t// Case: multi-slice (e.g., 'MultiSlice(Slice(0,10,2),null,2,Slice(10,5,-1))')\n\tif ( ch === 'M' ) {\n\t\ts = str2multislice( prop );\n\t\tif ( s === null ) {\n\t\t\tthrow new Error( format( 'invalid operation. Unsupported slice operation. Value: `%s`.', property ) );\n\t\t}\n\t}\n\t// Case: subsequence string (e.g., '...' or ':10,1,::-1,:,-5,2::3')\n\telse if ( RE_SUBSEQ.test( prop ) || prop === '...' ) {\n\t\tshape = target.shape;\n\t\ts = seq2multislice( prop, shape, true );\n\t\tif ( s.code ) {\n\t\t\tif ( s.code === 'ERR_SLICE_INVALID_INCREMENT' ) {\n\t\t\t\tthrow new Error( format( 'invalid operation. A subsequence increment must be a non-zero integer. Value: `%s`.', property ) );\n\t\t\t}\n\t\t\tif ( s.code === 'ERR_SLICE_INVALID_ELLIPSIS' ) {\n\t\t\t\tthrow new Error( format( 'invalid operation. A subsequence may only include a single ellipsis. Value: `%s`.', property ) );\n\t\t\t}\n\t\t\tif ( s.code === 'ERR_SLICE_INVALID_SUBSEQUENCE' ) {\n\t\t\t\tthrow new Error( format( 'invalid operation. Unsupported slice operation. Value: `%s`.', property ) );\n\t\t\t}\n\t\t\t// NOTE: the following error check must come last due to fall-through when in non-strict mode...\n\t\t\tif ( s.code === 'ERR_SLICE_OUT_OF_BOUNDS' ) {\n\t\t\t\tif ( strict ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid operation. Slice exceeds array bounds. Array shape: (%s).', shape.join( ',' ) ) );\n\t\t\t\t}\n\t\t\t\t// Repeat parsing, this time allowing for out-of-bounds slices:\n\t\t\t\ts = seq2multislice( prop, shape, false );\n\t\t\t}\n\t\t}\n\t}\n\t// Case: array syntax (e.g., [ Slice(0,10,1), null, Slice(4,null,-1) ]) or Slice or integer or arbitrary string (where the latter three are not valid for >2d arrays)\n\telse {\n\t\ts = sargs2multislice( prop );\n\t\tif ( s === null ) {\n\t\t\tthrow new Error( format( 'invalid operation. Unsupported slice operation. Value: `%s`.', property ) );\n\t\t}\n\t}\n\treturn s;\n}\n\n\n// EXPORTS //\n\nmodule.exports = prop2slice;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar propertiesIn = require( '@stdlib/utils/properties-in' );\nvar contains = require( '@stdlib/array/base/assert/contains' ).factory;\nvar ndarray = require( './../../ctor' );\nvar defaults = require( './../../defaults' );\n\n\n// MAIN //\n\n/**\n* Tests whether a property name exists on the parent prototype.\n*\n* @private\n* @name hasProperty\n* @type {Function}\n* @param {(string|symbol)} name - property name\n* @returns {boolean} boolean indicating whether the property exists on the parent prototype\n*\n* @example\n* var bool = hasProperty( 'get' );\n* // returns true\n*\n* bool = hasProperty( 'foo' );\n* // returns false\n*/\nvar hasProperty = contains( propertiesIn( new ndarray( 'generic', [ 0 ], [], [ 0 ], 0, defaults.get( 'order' ) ) ) );\n\n\n// EXPORTS //\n\nmodule.exports = hasProperty;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isFunction = require( '@stdlib/assert/is-function' );\n\n\n// MAIN //\n\n/**\n* Returns the property value associated with a specified property.\n*\n* @private\n* @param {Object} target - target object\n* @param {(string|symbol)} property - property\n* @param {Object} receiver - the proxy object or an object inheriting from the proxy\n* @returns {*} result\n*/\nfunction getValue( target, property, receiver ) {\n\tvar value = target[ property ];\n\tif ( isFunction( value ) ) {\n\t\treturn wrapper;\n\t}\n\treturn value;\n\n\t/**\n\t* Method wrapper.\n\t*\n\t* @private\n\t* @returns {*} results\n\t*/\n\tfunction wrapper() {\n\t\tvar args;\n\t\tvar i;\n\n\t\targs = [];\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs.push( arguments[ i ] );\n\t\t}\n\t\treturn value.apply( ( this === receiver ) ? target : this, args ); // eslint-disable-line no-invalid-this\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = getValue;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar replace = require( '@stdlib/string/base/replace' );\n\n\n// MAIN //\n\n/**\n* Returns an updated error message for trapped errors.\n*\n* @private\n* @param {string} msg - error message\n* @returns {string} updated message\n*/\nfunction errMessage( msg ) {\n\treturn replace( msg, /^invalid argument/, 'invalid operation' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = errMessage;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isRangeError = require( '@stdlib/assert/is-range-error' );\nvar isTypeError = require( '@stdlib/assert/is-type-error' );\nvar isSyntaxError = require( '@stdlib/assert/is-syntax-error' );\n\n\n// MAIN //\n\n/**\n* Returns the error constructor for a provided error object.\n*\n* @private\n* @param {Error} err - error object\n* @returns {Function} error constructor\n*/\nfunction errConstructor( err ) {\n\tif ( isRangeError( err ) ) {\n\t\treturn RangeError;\n\t}\n\tif ( isTypeError( err ) ) {\n\t\treturn TypeError;\n\t}\n\tif ( isSyntaxError( err ) ) {\n\t\treturn SyntaxError;\n\t}\n\treturn Error;\n}\n\n\n// EXPORTS //\n\nmodule.exports = errConstructor;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar slice = require( './../../base/slice' );\nvar errMessage = require( './error_message.js' );\nvar errConstructor = require( './error_constructor.js' );\n\n\n// MAIN //\n\n/**\n* Returns an ndarray view.\n*\n* @private\n* @param {Object} target - target object\n* @param {string} property - property name\n* @param {Object} receiver - the proxy object or an object inheriting from the proxy\n* @param {Function} prop2slice - function for converting an indexing expression to a slice\n* @throws {Error} invalid slice operation\n* @throws {RangeError} number of slice dimensions must match the number of array dimensions\n* @returns {FancyArray} result\n*/\nfunction getSlice( target, property, receiver, prop2slice ) { // eslint-disable-line stdlib/jsdoc-require-throws-tags\n\tvar strict;\n\tvar E;\n\tvar s;\n\n\tstrict = false; // TODO: support strict mode\n\ts = prop2slice( target, property, strict );\n\ttry {\n\t\treturn slice( receiver, s, strict, false );\n\t} catch ( err ) {\n\t\tE = errConstructor( err );\n\t\tthrow new E( errMessage( err.message ) );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = getSlice;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar hasProperty = require( './has_property.js' );\nvar getValue = require( './get_value.js' );\nvar getSlice = require( './get_slice.js' );\n\n\n// MAIN //\n\n/**\n* Returns a trap for retrieving property values.\n*\n* @private\n* @param {Function} prop2slice - function for converting an indexing expression to a slice\n* @returns {Function} handler\n*/\nfunction factory( prop2slice ) {\n\treturn get;\n\n\t/**\n\t* Trap for retrieving property values.\n\t*\n\t* @private\n\t* @param {Object} target - target object\n\t* @param {(string|symbol)} property - property name\n\t* @param {Object} receiver - the proxy object or an object inheriting from the proxy\n\t* @throws {Error} invalid slice operation\n\t* @throws {RangeError} number of slice dimensions must match the number of array dimensions\n\t* @returns {*} result\n\t*/\n\tfunction get( target, property, receiver ) {\n\t\tif ( hasProperty( property ) ) {\n\t\t\treturn getValue( target, property, receiver );\n\t\t}\n\t\treturn getSlice( target, property, receiver, prop2slice );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = factory;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Sets the value associated with a specified property.\n*\n* @private\n* @param {Object} target - target object\n* @param {string} property - property\n* @param {*} value - new value\n* @param {Object} receiver - the proxy object or an object inheriting from the proxy\n* @returns {boolean} boolean indicating whether assignment succeeded\n*/\nfunction setValue( target, property, value ) {\n\ttarget[ property ] = value;\n\treturn true;\n}\n\n\n// EXPORTS //\n\nmodule.exports = setValue;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isInteger = require( '@stdlib/math/base/assert/is-integer' );\nvar isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' );\nvar isComplexLike = require( '@stdlib/assert/is-complex-like' );\nvar PINF = require( '@stdlib/constants/float64/pinf' );\nvar NINF = require( '@stdlib/constants/float64/ninf' );\nvar FLOAT32_SMALLEST_SUBNORMAL = require( '@stdlib/constants/float32/smallest-subnormal' ); // eslint-disable-line id-length\nvar FLOAT32_MAX_SAFE_INTEGER = require( '@stdlib/constants/float32/max-safe-integer' );\nvar FLOAT32_MIN_SAFE_INTEGER = require( '@stdlib/constants/float32/min-safe-integer' );\nvar INT8_MIN = require( '@stdlib/constants/int8/min' );\nvar INT16_MIN = require( '@stdlib/constants/int16/min' );\nvar INT32_MIN = require( '@stdlib/constants/int32/min' );\nvar UINT8_MAX = require( '@stdlib/constants/uint8/max' );\nvar UINT16_MAX = require( '@stdlib/constants/uint16/max' );\nvar UINT32_MAX = require( '@stdlib/constants/uint32/max' );\n\n\n// FUNCTIONS //\n\n/**\n* Returns the minimum floating-point ndarray data type of the closest \"kind\" necessary for storing a provided scalar.\n*\n* @private\n* @param {number} value - real value\n* @returns {string} ndarray data type\n*/\nfunction minFloatDataType( value ) {\n\tif ( value !== value || value === PINF || value === NINF ) {\n\t\treturn 'float32';\n\t}\n\tif ( isInteger( value ) ) {\n\t\tif ( value >= FLOAT32_MIN_SAFE_INTEGER && value <= FLOAT32_MAX_SAFE_INTEGER ) { // eslint-disable-line max-len\n\t\t\treturn 'float32';\n\t\t}\n\t\treturn 'float64';\n\t}\n\t// Assume that if we are provided a tiny value, we don't want to underflow to zero by storing as `float32`...\n\tif (\n\t\tvalue > -FLOAT32_SMALLEST_SUBNORMAL &&\n\t\tvalue < FLOAT32_SMALLEST_SUBNORMAL\n\t) {\n\t\treturn 'float64';\n\t}\n\t// Any number which reaches this point is less than the maximum single-precision floating-point number, as floating-point format supports a limited number of decimals (e.g., (1.0+EPS)*10**15 => 1000000000000000.2, which is less than ~3.4e38)...\n\treturn 'float32';\n}\n\n\n// MAIN //\n\n/**\n* Returns the minimum ndarray data type of the closest \"kind\" necessary for storing a provided scalar value.\n*\n* @param {*} value - scalar value\n* @returns {string} ndarray data type\n*\n* @example\n* var dt = minDataType( 3.141592653589793 );\n* // returns 'float32'\n*\n* @example\n* var dt = minDataType( 3 );\n* // returns 'uint8'\n*/\nfunction minDataType( value ) {\n\tif ( typeof value !== 'number' ) {\n\t\tif ( isComplexLike( value ) ) {\n\t\t\tif ( minFloatDataType( value.re ) === 'float64' || minFloatDataType( value.im ) === 'float64' ) {\n\t\t\t\treturn 'complex128';\n\t\t\t}\n\t\t\treturn 'complex64';\n\t\t}\n\t\treturn 'generic';\n\t}\n\tif ( value !== value || value === PINF || value === NINF ) {\n\t\treturn 'float32';\n\t}\n\tif ( isInteger( value ) ) {\n\t\tif ( value === 0 && isNegativeZero( value ) ) {\n\t\t\treturn 'float32';\n\t\t}\n\t\tif ( value < 0 ) {\n\t\t\tif ( value >= INT8_MIN ) {\n\t\t\t\treturn 'int8';\n\t\t\t}\n\t\t\tif ( value >= INT16_MIN ) {\n\t\t\t\treturn 'int16';\n\t\t\t}\n\t\t\tif ( value >= INT32_MIN ) {\n\t\t\t\treturn 'int32';\n\t\t\t}\n\t\t\treturn 'float64';\n\t\t}\n\t\tif ( value <= UINT8_MAX ) {\n\t\t\treturn 'uint8';\n\t\t}\n\t\tif ( value <= UINT16_MAX ) {\n\t\t\treturn 'uint16';\n\t\t}\n\t\tif ( value <= UINT32_MAX ) {\n\t\t\treturn 'uint32';\n\t\t}\n\t\treturn 'float64';\n\t}\n\t// Assume that if we are provided a tiny value, we don't want to underflow to zero by storing as `float32`...\n\tif (\n\t\tvalue > -FLOAT32_SMALLEST_SUBNORMAL &&\n\t\tvalue < FLOAT32_SMALLEST_SUBNORMAL\n\t) {\n\t\treturn 'float64';\n\t}\n\t// Any number which reaches this point is less than the maximum single-precision floating-point number, given that floating-point format supports a limited number of decimals (e.g., (1.0+EPS)*10**15 => 1000000000000000.2, which is less than ~3.4e38)...\n\treturn 'float32';\n}\n\n\n// EXPORTS //\n\nmodule.exports = minDataType;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine the minimum ndarray data type of the closest \"kind\" necessary for storing a provided scalar value.\n*\n* @module @stdlib/ndarray/min-dtype\n*\n* @example\n* var minDataType = require( '@stdlib/ndarray/min-dtype' );\n*\n* var dt = minDataType( 3.141592653589793 );\n* // returns 'float32'\n*\n* dt = minDataType( 3 );\n* // returns 'uint8'\n*/\n\n// MODULES //\n\nvar minDataType = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = minDataType;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar isPlainObject = require( '@stdlib/assert/is-plain-object' );\nvar isNumber = require( '@stdlib/assert/is-number' ).isPrimitive;\nvar isComplexLike = require( '@stdlib/assert/is-complex-like' );\nvar isAccessorArray = require( '@stdlib/array/base/assert/is-accessor-array' );\nvar accessorSetter = require( '@stdlib/array/base/accessor-setter' );\nvar setter = require( '@stdlib/array/base/setter' );\nvar buffer = require( './../../base/buffer' );\nvar ndarray = require( './../../ctor' );\nvar defaults = require( './../../defaults' );\nvar format = require( '@stdlib/string/format' );\n\n\n// VARIABLES //\n\nvar ORDER = defaults.get( 'order' );\n\n\n// MAIN //\n\n/**\n* Returns a zero-dimensional ndarray containing a provided scalar value.\n*\n* ## Notes\n*\n* - If a `dtype` option is not provided and `value`\n*\n* - is a `number`, the default data type is `'float64'`.\n* - is a complex number object, the default data type is `'complex128'`.\n* - is any other value type, the default data type is `'generic'`.\n*\n* @param {*} value - scalar value\n* @param {Options} [options] - function options\n* @param {string} [options.dtype] - output array data type\n* @param {string} [options.order=\"row-major\"] - memory layout (either row-major or column-major)\n* @param {boolean} [options.readonly=false] - boolean indicating whether an array should be read-only\n* @throws {TypeError} second argument must be an object\n* @throws {TypeError} `dtype` option must be a recognized data type\n* @returns {ndarray} ndarray\n*\n* @example\n* var x = scalar2ndarray( 1.0 );\n* // returns \n*\n* var sh = x.shape;\n* // returns []\n*\n* var dt = x.dtype;\n* // returns 'float64'\n*\n* var v = x.get();\n* // returns 1.0\n*\n* @example\n* var x = scalar2ndarray( 1.0, {\n* 'dtype': 'float32'\n* });\n* // returns \n*\n* var sh = x.shape;\n* // returns []\n*\n* var dt = x.dtype;\n* // returns 'float32'\n*\n* var v = x.get();\n* // returns 1.0\n*/\nfunction scalar2ndarray( value ) {\n\tvar options;\n\tvar opts;\n\tvar buf;\n\tvar flg;\n\tvar set;\n\tvar dt;\n\tvar v;\n\n\topts = {\n\t\t'dtype': '',\n\t\t'order': ORDER,\n\t\t'readonly': false\n\t};\n\tif ( arguments.length > 1 ) {\n\t\toptions = arguments[ 1 ];\n\t\tif ( !isPlainObject( options ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t\t}\n\t\tif ( hasOwnProp( options, 'dtype' ) ) {\n\t\t\topts.dtype = options.dtype;\n\t\t}\n\t\tif ( hasOwnProp( options, 'order' ) ) {\n\t\t\topts.order = options.order;\n\t\t}\n\t\tif ( hasOwnProp( options, 'readonly' ) ) {\n\t\t\topts.readonly = options.readonly;\n\t\t}\n\t}\n\tflg = isNumber( value );\n\tif ( opts.dtype === '' ) {\n\t\tif ( flg ) {\n\t\t\tdt = 'float64';\n\t\t} else if ( isComplexLike( value ) ) {\n\t\t\tdt = 'complex128';\n\t\t} else {\n\t\t\tdt = 'generic';\n\t\t}\n\t} else {\n\t\tdt = opts.dtype;\n\t}\n\tbuf = buffer( dt, 1 );\n\tif ( buf === null ) {\n\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a recognized data type. Option: `%s`.', 'dtype', dt ) );\n\t}\n\tif ( /^complex/.test( dt ) && flg ) {\n\t\tv = [ value, 0.0 ]; // note: we're assuming that the ComplexXXArray setter accepts an array of interleaved real and imaginary components\n\t} else {\n\t\tv = value;\n\t}\n\tif ( isAccessorArray( buf ) ) {\n\t\tset = accessorSetter( dt );\n\t} else {\n\t\tset = setter( dt );\n\t}\n\tset( buf, 0, v );\n\treturn new ndarray( dt, buf, [], [ 0 ], 0, opts.order, opts );\n}\n\n\n// EXPORTS //\n\nmodule.exports = scalar2ndarray;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a scalar value to a zero-dimensional ndarray.\n*\n* @module @stdlib/ndarray/from-scalar\n*\n* @example\n* var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' );\n*\n* var x = scalar2ndarray( 1.0 );\n* // returns \n*\n* var sh = x.shape;\n* // returns []\n*\n* var dt = x.dtype;\n* // returns 'float64'\n*\n* var v = x.get();\n* // returns 1.0\n*\n* @example\n* var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' );\n*\n* var x = scalar2ndarray( 1.0, {\n* 'dtype': 'float32'\n* });\n* // returns \n*\n* var sh = x.shape;\n* // returns []\n*\n* var dt = x.dtype;\n* // returns 'float32'\n*\n* var v = x.get();\n* // returns 1.0\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar sliceAssign = require( './../../base/slice-assign' );\nvar isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );\nvar isNumber = require( '@stdlib/assert/is-number' ).isPrimitive;\nvar isInteger = require( '@stdlib/assert/is-integer' ).isPrimitive;\nvar isComplexLike = require( '@stdlib/assert/is-complex-like' );\nvar isComplexDataType = require( './../../base/assert/is-complex-floating-point-data-type' );\nvar isFloatingDataType = require( './../../base/assert/is-floating-point-data-type' );\nvar isUnsignedIntegerDataType = require( './../../base/assert/is-unsigned-integer-data-type' );\nvar isSignedIntegerDataType = require( './../../base/assert/is-signed-integer-data-type' );\nvar isSafeCast = require( './../../base/assert/is-safe-data-type-cast' );\nvar INT8_MAX = require( '@stdlib/constants/int8/max' );\nvar INT16_MAX = require( '@stdlib/constants/int16/max' );\nvar INT32_MAX = require( '@stdlib/constants/int32/max' );\nvar minDataType = require( './../../min-dtype' );\nvar complexDataType = require( '@stdlib/complex/dtype' );\nvar scalar2ndarray = require( './../../from-scalar' );\nvar format = require( '@stdlib/string/format' );\nvar errMessage = require( './error_message.js' );\nvar errConstructor = require( './error_constructor.js' );\n\n\n// FUNCTIONS //\n\n/**\n* Returns an options object for creating an ndarray from a scalar value.\n*\n* @private\n* @param {string} dtype - output array data type\n* @returns {Object} options\n*/\nfunction options( dtype ) {\n\treturn {\n\t\t'dtype': dtype\n\t};\n}\n\n\n// MAIN //\n\n/**\n* Sets element values belonging to the ndarray view specified by an indexing expression.\n*\n* @private\n* @param {Object} target - target object\n* @param {string} property - indexing expression\n* @param {*} value - new value\n* @param {Object} receiver - the proxy object or an object inheriting from the proxy\n* @param {Function} prop2slice - function for converting an indexing expression to a slice\n* @throws {Error} invalid slice operation\n* @throws {RangeError} number of slice dimensions must match the number of array dimensions\n* @throws {Error} assigned value must be broadcast compatible with target array view\n* @throws {TypeError} assigned value cannot be safely cast to the target array data type\n* @throws {TypeError} target array must have a supported data type\n* @returns {boolean} boolean indicating whether assignment succeeded\n*/\nfunction setSlice( target, property, value, receiver, prop2slice ) { // eslint-disable-line stdlib/jsdoc-require-throws-tags\n\tvar strict;\n\tvar vdt;\n\tvar dt;\n\tvar E;\n\tvar s;\n\n\tif ( !isndarrayLike( value ) ) {\n\t\tdt = target.dtype;\n\n\t\t// If the target array data type is \"generic\", we can just go ahead and \"cast\" to the target array data type...\n\t\tif ( dt === 'generic' ) {\n\t\t\tvalue = scalar2ndarray( value, options( dt ) );\n\t\t}\n\t\t// If the input value is real-valued number, we need to inspect the value to determine whether we can safely cast the value to the target array data type...\n\t\telse if ( isNumber( value ) ) {\n\t\t\t// If the target array has a floating-point data type, we can just go ahead and cast the input scalar to the target array data type...\n\t\t\tif ( isFloatingDataType( dt ) ) {\n\t\t\t\tvalue = scalar2ndarray( value, options( dt ) );\n\t\t\t}\n\t\t\t// If the target array has an unsigned integer data type, then the assigned value must be a compatible nonnegative integer value...\n\t\t\telse if ( isUnsignedIntegerDataType( dt ) ) {\n\t\t\t\tvdt = minDataType( value );\n\t\t\t\tif ( isSafeCast( vdt, dt ) ) {\n\t\t\t\t\tvalue = scalar2ndarray( value, options( dt ) );\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].', vdt, dt ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If the target array has a signed integer data type, then the assigned value must be a compatible integer value...\n\t\t\telse if ( isSignedIntegerDataType( dt ) ) {\n\t\t\t\tif ( !isInteger( value ) ) {\n\t\t\t\t\tthrow new TypeError( format( 'invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].', minDataType( value ), dt ) );\n\t\t\t\t}\n\t\t\t\t// Manually resolve the minimum data type of the closest \"kind\" necessary for storing a scalar value, as `minDataType()` defaults to unsigned integer data types when a scalar value is greater than or equal to zero...\n\t\t\t\tif ( value < 0 ) {\n\t\t\t\t\tvdt = minDataType( value );\n\t\t\t\t} else if ( value <= INT8_MAX ) { // TODO: consider moving this logic to `@stdlib/ndarray/base/min-signed-intger-dtype` where the interface can assume that `value` is integer-valued\n\t\t\t\t\tvdt = 'int8';\n\t\t\t\t} else if ( value <= INT16_MAX ) {\n\t\t\t\t\tvdt = 'int16';\n\t\t\t\t} else if ( value <= INT32_MAX ) {\n\t\t\t\t\tvdt = 'int32';\n\t\t\t\t} else {\n\t\t\t\t\tvdt = 'float64';\n\t\t\t\t}\n\t\t\t\tif ( isSafeCast( vdt, dt ) ) {\n\t\t\t\t\tvalue = scalar2ndarray( value, options( dt ) );\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].', vdt, dt ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If the target array has \"binary\" data type, then the assigned value must be a compatible nonnegative integer value...\n\t\t\telse if ( dt === 'binary' ) {\n\t\t\t\tvdt = minDataType( value );\n\t\t\t\tif ( vdt === 'uint8' ) {\n\t\t\t\t\tvalue = scalar2ndarray( value, options( dt ) );\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].', vdt, dt ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If we reach this point, we must be dealing with an unexpected target array data type...\n\t\t\telse {\n\t\t\t\t// Raise an exception in order to flag that, in order to perform assignment, we need to add explicit support for additional data types:\n\t\t\t\tthrow new TypeError( format( 'invalid operation. Unsupported target array data type. Data type: `%s`.', dt ) );\n\t\t\t}\n\t\t}\n\t\t// If the target array is not \"generic\" and the input value is a complex number, then the target array data type must also have a complex number data type...\n\t\telse if ( isComplexLike( value ) ) {\n\t\t\tif ( !isComplexDataType( dt ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].', complexDataType( value ), dt ) );\n\t\t\t}\n\t\t\tvalue = scalar2ndarray( value, options( dt ) );\n\t\t}\n\t\t// If the target array is not \"generic\" and the input value is neither a real- or complex-valued number, raise an exception in order to flag that, in order to perform assignment, we need to add explicit support for additional data types...\n\t\telse {\n\t\t\tthrow new TypeError( format( 'invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].', typeof value, dt ) );\n\t\t}\n\t}\n\tstrict = false; // TODO: support strict mode\n\ts = prop2slice( target, property, strict );\n\ttry {\n\t\tsliceAssign( value, receiver, s, strict );\n\t\treturn true;\n\t} catch ( err ) {\n\t\tE = errConstructor( err );\n\t\tthrow new E( errMessage( err.message ) );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = setSlice;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar hasProperty = require( './has_property.js' );\nvar setValue = require( './set_value.js' );\nvar setSlice = require( './set_slice.js' );\n\n\n// MAIN //\n\n/**\n* Returns a trap for setting property values.\n*\n* @private\n* @param {Function} prop2slice - function for converting an indexing expression to a slice\n* @returns {Function} handler\n*/\nfunction factory( prop2slice ) {\n\treturn set;\n\n\t/**\n\t* Trap for setting property values.\n\t*\n\t* @private\n\t* @param {Object} target - target object\n\t* @param {(string|symbol)} property - property name\n\t* @param {*} value - new value\n\t* @param {Object} receiver - the proxy object or an object inheriting from the proxy\n\t* @throws {Error} invalid slice operation\n\t* @throws {RangeError} number of slice dimensions must match the number of array dimensions\n\t* @throws {Error} assigned value must be broadcast compatible with output array view\n\t* @throws {TypeError} assigned value cannot be safely cast to the output array data type\n\t* @returns {boolean} boolean indicating whether assignment succeeded\n\t*/\n\tfunction set( target, property, value, receiver ) {\n\t\tif ( hasProperty( property ) ) {\n\t\t\treturn setValue( target, property, value );\n\t\t}\n\t\treturn setSlice( target, property, value, receiver, prop2slice );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = factory;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-len */\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar parent = require( './../../ctor' ); // eslint-disable-line stdlib/no-redeclare\nvar inherit = require( '@stdlib/utils/inherit' );\nvar Proxy = require( '@stdlib/proxy/ctor' );\nvar prop2slice0d = require( './prop2slice.0d.js' );\nvar prop2slice1d = require( './prop2slice.1d.js' );\nvar prop2slicend = require( './prop2slice.nd.js' );\nvar get = require( './get.js' );\nvar set = require( './set.js' );\n\n\n// VARIABLES //\n\nvar get0d = get( prop2slice0d );\nvar set0d = set( prop2slice0d );\nvar get1d = get( prop2slice1d );\nvar set1d = set( prop2slice1d );\nvar getnd = get( prop2slicend );\nvar setnd = set( prop2slicend );\n\n\n// MAIN //\n\n/**\n* Fancy ndarray constructor.\n*\n* @constructor\n* @param {string} dtype - data type\n* @param {Collection} buffer - data buffer\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - array strides\n* @param {NonNegativeInteger} offset - index offset\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {Options} [options] - function options\n* @param {string} [options.mode=\"throw\"] - specifies how to handle indices which exceed array dimensions\n* @param {StringArray} [options.submode=[\"throw\"]] - specifies how to handle subscripts which exceed array dimensions on a per dimension basis\n* @param {boolean} [options.readonly=false] - boolean indicating whether an array should be read-only\n* @throws {TypeError} `dtype` argument must be a supported ndarray data type\n* @throws {TypeError} `buffer` argument must be an array-like object, typed-array-like, or a Buffer\n* @throws {TypeError} `buffer` argument `get` and `set` properties must be functions\n* @throws {TypeError} `shape` argument must be an array-like object containing nonnegative integers\n* @throws {Error} `shape` argument length must equal the number of dimensions\n* @throws {TypeError} `strides` argument must be an array-like object containing integers\n* @throws {Error} `strides` argument length must equal the number of dimensions (except for zero-dimensional arrays; in which case, the `strides` argument length must be equal to `1`)\n* @throws {Error} for zero-dimensional ndarrays, the `strides` argument must contain a single element equal to `0`\n* @throws {TypeError} `offset` argument must be a nonnegative integer\n* @throws {TypeError} `order` argument must be a supported ndarray order\n* @throws {Error} `buffer` argument must be compatible with specified meta data\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {RangeError} too many dimensions\n* @returns {FancyArray} FancyArray instance\n*\n* @example\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var out = new FancyArray( 'generic', buffer, shape, strides, offset, 'row-major' );\n* // returns \n*/\nfunction FancyArray( dtype, buffer, shape, strides, offset, order, options ) {\n\tvar handlers;\n\tvar nargs;\n\tvar ndims;\n\n\tnargs = arguments.length;\n\tif ( !( this instanceof FancyArray ) ) {\n\t\tif ( nargs < 7 ) {\n\t\t\treturn new FancyArray( dtype, buffer, shape, strides, offset, order );\n\t\t}\n\t\treturn new FancyArray( dtype, buffer, shape, strides, offset, order, options );\n\t}\n\t// Call the parent constructor:\n\tparent.call( this, dtype, buffer, shape, strides, offset, order, ( nargs < 7 ) ? {} : options );\n\n\tif ( Proxy ) { // NOTE: cannot use `@stdlib/assert/has-proxy-support` here, as that API uses code evaluation and might violate CSPs\n\t\tndims = shape.length;\n\t\thandlers = {};\n\t\tif ( ndims === 0 ) {\n\t\t\thandlers.get = get0d;\n\t\t\thandlers.set = set0d;\n\t\t} else if ( ndims === 1 ) {\n\t\t\thandlers.get = get1d;\n\t\t\thandlers.set = set1d;\n\t\t} else {\n\t\t\thandlers.get = getnd;\n\t\t\thandlers.set = setnd;\n\t\t}\n\t\treturn new Proxy( this, handlers );\n\t}\n\t// TODO: replace with `@stdlib/console/warn` (or equivalent once available)\n\tconsole.warn( 'WARNING: Proxy objects are not supported in the current environment. Some `FancyArray` functionality may not be available.' ); // eslint-disable-line no-console\n\treturn this;\n}\n\n// Inherit from the parent constructor:\ninherit( FancyArray, parent );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof FancyArray\n* @type {string}\n* @default 'ndarray'\n*\n* @example\n* var str = FancyArray.name;\n* // returns 'ndarray'\n*/\nsetReadOnly( FancyArray, 'name', 'ndarray' );\n\n\n// EXPORTS //\n\nmodule.exports = FancyArray;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Fancy array constructor.\n*\n* @module @stdlib/ndarray/fancy\n*\n* @example\n* var FancyArray = require( '@stdlib/ndarray/fancy' );\n*\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var out = new FancyArray( 'generic', buffer, shape, strides, offset, 'row-major' );\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "{\n\t\"mode\": \"throw\",\n\t\"order\": \"row-major\"\n}\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isObject = require( '@stdlib/assert/is-plain-object' );\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar isOrder = require( './../../base/assert/is-order' );\nvar isIndexMode = require( './../../base/assert/is-index-mode' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Validates function options.\n*\n* @private\n* @param {Object} opts - destination object\n* @param {Options} options - function options\n* @param {string} [options.mode] - specifies how to handle a linear index which exceeds array dimensions\n* @param {string} [options.order] - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @returns {(Error|null)} null or an error object\n*\n* @example\n* var opts = {};\n* var options = {\n* 'mode': 'throw',\n* 'order': 'column-major'\n* };\n* var err = validate( opts, options );\n* if ( err ) {\n* throw err;\n* }\n*/\nfunction validate( opts, options ) {\n\tif ( !isObject( options ) ) {\n\t\treturn new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t}\n\tif ( hasOwnProp( options, 'mode' ) ) {\n\t\topts.mode = options.mode;\n\t\tif ( !isIndexMode( opts.mode ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a supported/recognized mode. Option: `%s`.', 'mode', opts.mode ) );\n\t\t}\n\t}\n\tif ( hasOwnProp( options, 'order' ) ) {\n\t\topts.order = options.order;\n\t\tif ( !isOrder( opts.order ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a supported/recognized order. Option: `%s`.', 'order', opts.order ) );\n\t\t}\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = validate;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isNonNegativeIntegerArray = require( '@stdlib/assert/is-nonnegative-integer-array' ).primitives;\nvar isInteger = require( '@stdlib/assert/is-integer' ).isPrimitive;\nvar shape2strides = require( './../../base/shape2strides' );\nvar getSubscripts = require( './../../base/ind2sub' );\nvar format = require( '@stdlib/string/format' );\nvar defaults = require( './defaults.json' );\nvar validate = require( './validate.js' );\n\n\n// MAIN //\n\n/**\n* Converts a linear index to an array of subscripts.\n*\n* ## Notes\n*\n* - The function accepts the following \"modes\":\n*\n* - `throw`: throws an error when a linear index exceeds array dimensions.\n* - `wrap`: wrap around a linear index exceeding array dimensions using modulo arithmetic.\n* - `clamp`: set a linear index exceeding array dimensions to either `0` (minimum linear index) or the maximum linear index.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {integer} idx - linear index\n* @param {Options} [options] - function options\n* @param {string} [options.mode=\"throw\"] - specifies how to handle a linear index which exceeds array dimensions\n* @param {string} [options.order=\"row-major\"] - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @throws {TypeError} shape argument must be an array-like object containing nonnegative integers\n* @throws {TypeError} linear index argument must be integer valued\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {RangeError} must provide a linear index which does not exceed array dimensions\n* @returns {NonNegativeIntegerArray} subscripts\n*\n* @example\n* var s = ind2sub( [ 3, 3, 3 ], 17 );\n* // returns [ 1, 2, 2 ]\n*/\nfunction ind2sub( shape, idx, options ) {\n\tvar opts;\n\tvar err;\n\n\topts = {};\n\topts.mode = defaults.mode;\n\topts.order = defaults.order;\n\tif ( arguments.length > 2 ) {\n\t\terr = validate( opts, options );\n\t\tif ( err ) {\n\t\t\tthrow err;\n\t\t}\n\t}\n\tif ( !isNonNegativeIntegerArray( shape ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Shape argument must be an array-like object containing nonnegative integers. Value: `%s`.', shape ) );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Linear index must be integer valued. Value: `%s`.', idx ) );\n\t}\n\t// Note: strides are positive, so offset is always zero\n\treturn getSubscripts( shape, shape2strides( shape, opts.order ), 0, opts.order, idx, opts.mode ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = ind2sub;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isNonNegativeIntegerArray = require( '@stdlib/assert/is-nonnegative-integer-array' ).primitives;\nvar isInteger = require( '@stdlib/assert/is-integer' ).isPrimitive;\nvar shape2strides = require( './../../base/shape2strides' );\nvar getSubscripts = require( './../../base/ind2sub' ).assign;\nvar format = require( '@stdlib/string/format' );\nvar defaults = require( './defaults.json' );\nvar validate = require( './validate.js' );\n\n\n// MAIN //\n\n/**\n* Converts a linear index to an array of subscripts and assigns results to a provided output array.\n*\n* ## Notes\n*\n* - The function accepts the following \"modes\":\n*\n* - `throw`: throws an error when a linear index exceeds array dimensions.\n* - `wrap`: wrap around a linear index exceeding array dimensions using modulo arithmetic.\n* - `clamp`: set a linear index exceeding array dimensions to either `0` (minimum linear index) or the maximum linear index.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {integer} idx - linear index\n* @param {Options} [options] - function options\n* @param {string} [options.mode=\"throw\"] - specifies how to handle a linear index which exceeds array dimensions\n* @param {string} [options.order=\"row-major\"] - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {(Array|TypedArray|Object)} out - output array\n* @throws {TypeError} output argument must be either an array, typed array, or an object\n* @throws {TypeError} shape argument must be an array-like object containing nonnegative integers\n* @throws {TypeError} linear index argument must be integer valued\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {RangeError} must provide a linear index which does not exceed array dimensions\n* @returns {NonNegativeIntegerArray} subscripts\n*\n* @example\n* var shape = [ 3, 3, 3 ];\n* var out = [ 0, 0, 0 ];\n*\n* var s = ind2sub( shape, 17, out );\n* // returns [ 1, 2, 2 ]\n*\n* var bool = ( s === out );\n* // returns true\n*/\nfunction ind2sub( shape, idx, options, out ) {\n\tvar opts;\n\tvar dest;\n\tvar err;\n\n\topts = {};\n\topts.mode = defaults.mode;\n\topts.order = defaults.order;\n\tif ( arguments.length === 4 ) {\n\t\terr = validate( opts, arguments[ 2 ] );\n\t\tif ( err ) {\n\t\t\tthrow err;\n\t\t}\n\t\tif ( typeof out !== 'object' || out === null ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Output argument must be either an array, typed array, or object. Value: `%s`.', out ) );\n\t\t}\n\t\tdest = out;\n\t} else {\n\t\tdest = options;\n\t\tif ( typeof dest !== 'object' || dest === null ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Output argument must be either an array, typed array, or object. Value: `%s`.', dest ) );\n\t\t}\n\t}\n\tif ( !isNonNegativeIntegerArray( shape ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Shape argument must be an array-like object containing nonnegative integers. Value: `%s`.', shape ) );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Linear index must be integer valued. Value: `%s`.', idx ) );\n\t}\n\t// Note: strides are positive, so offset is always zero\n\treturn getSubscripts( shape, shape2strides( shape, opts.order ), 0, opts.order, idx, opts.mode, dest ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = ind2sub;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a linear index to an array of subscripts.\n*\n* @module @stdlib/ndarray/ind2sub\n*\n* @example\n* var ind2sub = require( '@stdlib/ndarray/ind2sub' );\n*\n* var s = ind2sub( [ 3, 3, 3 ], 17 );\n* // returns [ 1, 2, 2 ]\n*\n* @example\n* var ind2sub = require( '@stdlib/ndarray/ind2sub' );\n*\n* var shape = [ 3, 3, 3 ];\n* var out = [ 0, 0, 0 ];\n*\n* var s = ind2sub.assign( shape, 17, out );\n* // returns [ 1, 2, 2 ]\n*\n* var bool = ( s === out );\n* // returns true\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar assign = require( './assign.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar isPlainObject = require( '@stdlib/assert/is-plain-object' );\nvar isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;\nvar isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );\nvar isReadOnly = require( './../../../base/assert/is-read-only' );\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar iteratorSymbol = require( '@stdlib/symbol/iterator' );\nvar zeros = require( '@stdlib/array/base/zeros' );\nvar getShape = require( './../../../shape' );\nvar numel = require( './../../../base/numel' );\nvar slice = require( './../../../base/slice' );\nvar nextCartesianIndex = require( './../../../base/next-cartesian-index' ).assign;\nvar MultiSlice = require( '@stdlib/slice/multi' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns an iterator which iterates over each column in a matrix (or stack of matrices).\n*\n* @param {ndarray} x - input value\n* @param {Options} [options] - function options\n* @param {boolean} [options.readonly=true] - boolean indicating whether returned views should be read-only\n* @throws {TypeError} first argument must be an ndarray\n* @throws {TypeError} first argument must have at least two dimensions\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {Error} cannot write to a read-only array\n* @returns {Iterator} iterator\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n*\n* var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] );\n* // returns \n*\n* var iter = nditerColumns( x );\n*\n* var v = iter.next().value;\n* // returns \n*\n* var arr = ndarray2array( v );\n* // returns [ 1, 3 ]\n*\n* v = iter.next().value;\n* // returns \n*\n* arr = ndarray2array( v );\n* // returns [ 2, 4 ]\n*\n* v = iter.next().value;\n* // returns \n*\n* arr = ndarray2array( v );\n* // returns [ 5, 7 ]\n*\n* // ...\n*/\nfunction nditerColumns( x ) {\n\tvar options;\n\tvar shape;\n\tvar ndims;\n\tvar opts;\n\tvar iter;\n\tvar FLG;\n\tvar idx;\n\tvar dim;\n\tvar S0;\n\tvar N;\n\tvar i;\n\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ndarray. Value: `%s`.', x ) );\n\t}\n\topts = {\n\t\t'writable': false\n\t};\n\tif ( arguments.length > 1 ) {\n\t\toptions = arguments[ 1 ];\n\t\tif ( !isPlainObject( options ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t\t}\n\t\tif ( hasOwnProp( options, 'readonly' ) ) {\n\t\t\tif ( !isBoolean( options.readonly ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'readonly', options.readonly ) );\n\t\t\t}\n\t\t\topts.writable = !options.readonly;\n\t\t\tif ( opts.writable && isReadOnly( x ) ) {\n\t\t\t\tthrow new Error( format( 'invalid option. Cannot write to read-only array.' ) );\n\t\t\t}\n\t\t}\n\t}\n\t// Retrieve input array meta data:\n\tshape = getShape( x );\n\tndims = shape.length;\n\n\t// Ensure that the input array has sufficient dimensions...\n\tif ( ndims < 2 ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an ndarray having at least two dimensions.' );\n\t}\n\t// Check whether the input array is empty...\n\tN = numel( shape );\n\tif ( N === 0 ) {\n\t\tFLG = true;\n\t}\n\t// Compute the number of columns across all stacks of matrices:\n\tN /= shape[ ndims-2 ];\n\tdim = ndims - 1;\n\tS0 = shape[ dim ];\n\n\t// Initialize a counter:\n\ti = -1;\n\n\t// Initialize an index array for generating slices:\n\tidx = zeros( ndims );\n\n\t// Set the second-to-last element to `null` to indicate that we want a full \"slice\" for the second-to-last dimension:\n\tidx[ ndims-2 ] = null;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\t// If an environment supports `Symbol.iterator`, make the iterator iterable:\n\tif ( iteratorSymbol ) {\n\t\tsetReadOnly( iter, iteratorSymbol, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar s;\n\t\tvar j;\n\t\ti += 1;\n\t\tif ( FLG || i >= N ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\t// Create a multi-slice for the current view:\n\t\ts = MultiSlice.apply( null, idx );\n\n\t\t// Update the index array:\n\t\tj = ( idx[ dim ] + 1 ) % S0;\n\t\tidx[ dim ] = j;\n\t\tif ( j === 0 ) {\n\t\t\t// If we've iterated over all the columns in the current matrix, move on to the next matrix in the stack:\n\t\t\tidx = nextCartesianIndex( shape, 'row-major', idx, dim-2, idx );\n\t\t}\n\t\t// Return the next column slice:\n\t\treturn {\n\t\t\t'value': slice( x, s, true, opts.writable ),\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn nditerColumns( x, opts );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nditerColumns;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create an iterator which iterates over each column in a matrix (or stack of matrices).\n*\n* @module @stdlib/ndarray/iter/columns\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n* var nditerColumns = require( '@stdlib/ndarray/iter/columns' );\n*\n* var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] );\n* // returns \n*\n* var iter = nditerColumns( x );\n*\n* var v = iter.next().value;\n* // returns \n*\n* var arr = ndarray2array( v );\n* // returns [ 1, 3 ]\n*\n* v = iter.next().value;\n* // returns \n*\n* arr = ndarray2array( v );\n* // returns [ 2, 4 ]\n*\n* v = iter.next().value;\n* // returns \n*\n* arr = ndarray2array( v );\n* // returns [ 5, 7 ]\n*\n* // ...\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar isPlainObject = require( '@stdlib/assert/is-plain-object' );\nvar isOrder = require( './../../../base/assert/is-order' );\nvar isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar iteratorSymbol = require( '@stdlib/symbol/iterator' );\nvar zeros = require( '@stdlib/array/base/zeros' );\nvar getShape = require( './../../../shape' );\nvar numel = require( './../../../base/numel' );\nvar nextCartesianIndex = require( './../../../base/next-cartesian-index' ).assign;\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns an iterator which returns `[index, value]` pairs for each element in a provided ndarray.\n*\n* @param {ndarray} x - input array\n* @param {Options} [options] - function options\n* @param {boolean} [options.order='row-major'] - index iteration order\n* @throws {TypeError} first argument must be an ndarray\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @returns {Iterator} iterator\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] );\n* // returns \n*\n* var iter = nditerEntries( x );\n*\n* var v = iter.next().value;\n* // returns [ [ 0, 0, 0 ], 1 ]\n*\n* v = iter.next().value;\n* // returns [ [ 0, 0, 1 ], 2 ]\n*\n* v = iter.next().value;\n* // returns [ [ 0, 1, 0 ], 3 ]\n*\n* // ...\n*/\nfunction nditerEntries( x ) {\n\tvar options;\n\tvar shape;\n\tvar ndims;\n\tvar opts;\n\tvar iter;\n\tvar FLG;\n\tvar idx;\n\tvar dim;\n\tvar N;\n\tvar i;\n\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ndarray. Value: `%s`.', x ) );\n\t}\n\topts = {\n\t\t'order': x.order\n\t};\n\tif ( arguments.length > 1 ) {\n\t\toptions = arguments[ 1 ];\n\t\tif ( !isPlainObject( options ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t\t}\n\t\tif ( hasOwnProp( options, 'order' ) ) {\n\t\t\tif ( !isOrder( options.order ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a recognized order. Option: `%s`.', 'order', options.order ) );\n\t\t\t}\n\t\t\topts.order = options.order;\n\t\t}\n\t}\n\t// Retrieve input array meta data:\n\tshape = getShape( x );\n\tndims = shape.length;\n\n\t// Check whether the input array is empty...\n\tN = numel( shape );\n\tif ( N === 0 ) {\n\t\tFLG = true;\n\t}\n\t// Resolve the dimension in which indices iterate fastest:\n\tif ( opts.order === 'row-major' ) {\n\t\tdim = ndims - 1;\n\t} else {\n\t\tdim = 0;\n\t}\n\t// Initialize a counter:\n\ti = -1;\n\n\t// Initialize an index array:\n\tidx = zeros( ndims );\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\t// If an environment supports `Symbol.iterator`, make the iterator iterable:\n\tif ( iteratorSymbol ) {\n\t\tsetReadOnly( iter, iteratorSymbol, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\ti += 1;\n\t\tif ( FLG || i >= N ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tif ( i > 0 ) {\n\t\t\tidx = nextCartesianIndex( shape, opts.order, idx, dim, idx );\n\t\t}\n\t\t// Return the next set of indices:\n\t\treturn {\n\t\t\t'value': [ idx.slice(), x.get.apply( x, idx ) ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn nditerEntries( x, opts );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nditerEntries;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create an iterator which returns `[index, value]` pairs for each element in a provided ndarray.\n*\n* @module @stdlib/ndarray/iter/entries\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var nditerEntries = require( '@stdlib/ndarray/iter/entries' );\n*\n* var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] );\n* // returns \n*\n* var iter = nditerEntries( x.shape );\n*\n* var v = iter.next().value;\n* // returns [ [ 0, 0, 0 ], 1 ]\n*\n* v = iter.next().value;\n* // returns [ [ 0, 0, 1 ], 2 ]\n*\n* v = iter.next().value;\n* // returns [ [ 0, 1, 0 ], 3 ]\n*\n* // ...\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar isPlainObject = require( '@stdlib/assert/is-plain-object' );\nvar isOrder = require( './../../../base/assert/is-order' );\nvar isCollection = require( '@stdlib/assert/is-collection' );\nvar isNonNegativeInteger = require( '@stdlib/assert/is-nonnegative-integer' ).isPrimitive;\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar iteratorSymbol = require( '@stdlib/symbol/iterator' );\nvar zeros = require( '@stdlib/array/base/zeros' );\nvar numel = require( './../../../base/numel' );\nvar nextCartesianIndex = require( './../../../base/next-cartesian-index' ).assign;\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns an iterator which returns indices for use in indexing into an ndarray having a specified shape.\n*\n* @param {NonNegativeIntegerArray} shape - input shape\n* @param {Options} [options] - function options\n* @param {boolean} [options.order='row-major'] - index iteration order\n* @throws {TypeError} first argument must be an array containing nonnegative integers\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @returns {Iterator} iterator\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] );\n* // returns \n*\n* var iter = nditerIndices( x.shape );\n*\n* var v = iter.next().value;\n* // returns [ 0, 0, 0 ]\n*\n* v = iter.next().value;\n* // returns [ 0, 0, 1 ]\n*\n* v = iter.next().value;\n* // returns [ 0, 1, 0 ]\n*\n* // ...\n*/\nfunction nditerIndices( shape ) {\n\tvar options;\n\tvar ndims;\n\tvar opts;\n\tvar iter;\n\tvar FLG;\n\tvar idx;\n\tvar dim;\n\tvar sh;\n\tvar N;\n\tvar i;\n\n\tif ( !isCollection( shape ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array of nonnegative integers. Value: `%s`.', shape ) );\n\t}\n\topts = {\n\t\t'order': 'row-major'\n\t};\n\tif ( arguments.length > 1 ) {\n\t\toptions = arguments[ 1 ];\n\t\tif ( !isPlainObject( options ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t\t}\n\t\tif ( hasOwnProp( options, 'order' ) ) {\n\t\t\tif ( !isOrder( options.order ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a recognized order. Option: `%s`.', 'order', options.order ) );\n\t\t\t}\n\t\t\topts.order = options.order;\n\t\t}\n\t}\n\t// Retrieve the number of dimensions:\n\tndims = shape.length;\n\n\t// Copy the input shape:\n\tsh = [];\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tif ( !isNonNegativeInteger( shape[ i ] ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array of nonnegative integers. Value: `%s`.', shape ) );\n\t\t}\n\t\tsh.push( shape[ i ] );\n\t}\n\t// Check whether the input array is empty...\n\tN = numel( sh );\n\tif ( N === 0 ) {\n\t\tFLG = true;\n\t}\n\t// Resolve the dimension in which indices iterate fastest:\n\tif ( opts.order === 'row-major' ) {\n\t\tdim = ndims - 1;\n\t} else {\n\t\tdim = 0;\n\t}\n\t// Initialize a counter:\n\ti = -1;\n\n\t// Initialize an index array:\n\tidx = zeros( ndims );\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\t// If an environment supports `Symbol.iterator`, make the iterator iterable:\n\tif ( iteratorSymbol ) {\n\t\tsetReadOnly( iter, iteratorSymbol, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\ti += 1;\n\t\tif ( FLG || i >= N ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tif ( i > 0 ) {\n\t\t\tidx = nextCartesianIndex( shape, opts.order, idx, dim, idx );\n\t\t}\n\t\t// Return the next set of indices:\n\t\treturn {\n\t\t\t'value': idx.slice(),\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn nditerIndices( sh, opts );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nditerIndices;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create an iterator which returns indices for use in indexing into an ndarray having a specified shape.\n*\n* @module @stdlib/ndarray/iter/indices\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var nditerIndices = require( '@stdlib/ndarray/iter/indices' );\n*\n* var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] );\n* // returns \n*\n* var iter = nditerIndices( x.shape );\n*\n* var v = iter.next().value;\n* // returns [ 0, 0, 0 ]\n*\n* v = iter.next().value;\n* // returns [ 0, 0, 1 ]\n*\n* v = iter.next().value;\n* // returns [ 0, 1, 0 ]\n*\n* // ...\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar isPlainObject = require( '@stdlib/assert/is-plain-object' );\nvar isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;\nvar isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );\nvar isReadOnly = require( './../../../base/assert/is-read-only' );\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar iteratorSymbol = require( '@stdlib/symbol/iterator' );\nvar zeros = require( '@stdlib/array/base/zeros' );\nvar getShape = require( './../../../shape' );\nvar numel = require( './../../../base/numel' );\nvar slice = require( './../../../base/slice' );\nvar nextCartesianIndex = require( './../../../base/next-cartesian-index' ).assign;\nvar MultiSlice = require( '@stdlib/slice/multi' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns an iterator which iterates over each row in a matrix (or stack of matrices).\n*\n* @param {ndarray} x - input value\n* @param {Options} [options] - function options\n* @param {boolean} [options.readonly=true] - boolean indicating whether returned views should be read-only\n* @throws {TypeError} first argument must be an ndarray\n* @throws {TypeError} first argument must have at least two dimensions\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {Error} cannot write to a read-only array\n* @returns {Iterator} iterator\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n*\n* var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] );\n* // returns \n*\n* var iter = nditerRows( x );\n*\n* var v = iter.next().value;\n* // returns \n*\n* var arr = ndarray2array( v );\n* // returns [ 1, 2 ]\n*\n* v = iter.next().value;\n* // returns \n*\n* arr = ndarray2array( v );\n* // returns [ 3, 4 ]\n*\n* v = iter.next().value;\n* // returns \n*\n* arr = ndarray2array( v );\n* // returns [ 5, 6 ]\n*\n* // ...\n*/\nfunction nditerRows( x ) {\n\tvar options;\n\tvar shape;\n\tvar ndims;\n\tvar opts;\n\tvar iter;\n\tvar FLG;\n\tvar idx;\n\tvar dim;\n\tvar S1;\n\tvar N;\n\tvar i;\n\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ndarray. Value: `%s`.', x ) );\n\t}\n\topts = {\n\t\t'writable': false\n\t};\n\tif ( arguments.length > 1 ) {\n\t\toptions = arguments[ 1 ];\n\t\tif ( !isPlainObject( options ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t\t}\n\t\tif ( hasOwnProp( options, 'readonly' ) ) {\n\t\t\tif ( !isBoolean( options.readonly ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'readonly', options.readonly ) );\n\t\t\t}\n\t\t\topts.writable = !options.readonly;\n\t\t\tif ( opts.writable && isReadOnly( x ) ) {\n\t\t\t\tthrow new Error( format( 'invalid option. Cannot write to read-only array.' ) );\n\t\t\t}\n\t\t}\n\t}\n\t// Retrieve input array meta data:\n\tshape = getShape( x );\n\tndims = shape.length;\n\n\t// Ensure that the input array has sufficient dimensions...\n\tif ( ndims < 2 ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an ndarray having at least two dimensions.' );\n\t}\n\t// Check whether the input array is empty...\n\tN = numel( shape );\n\tif ( N === 0 ) {\n\t\tFLG = true;\n\t}\n\t// Compute the number of rows across all stacks of matrices:\n\tN /= shape[ ndims-1 ];\n\tdim = ndims - 2;\n\tS1 = shape[ dim ];\n\n\t// Initialize a counter:\n\ti = -1;\n\n\t// Initialize an index array for generating slices:\n\tidx = zeros( ndims );\n\n\t// Set the last element to `null` to indicate that we want a full \"slice\" for the last dimension:\n\tidx[ ndims-1 ] = null;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\t// If an environment supports `Symbol.iterator`, make the iterator iterable:\n\tif ( iteratorSymbol ) {\n\t\tsetReadOnly( iter, iteratorSymbol, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar s;\n\t\tvar j;\n\t\ti += 1;\n\t\tif ( FLG || i >= N ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\t// Create a multi-slice for the current view:\n\t\ts = MultiSlice.apply( null, idx );\n\n\t\t// Update the index array:\n\t\tj = ( idx[ dim ] + 1 ) % S1;\n\t\tidx[ dim ] = j;\n\t\tif ( j === 0 ) {\n\t\t\t// If we've iterated over all the rows in the current matrix, move on to the next matrix in the stack:\n\t\t\tidx = nextCartesianIndex( shape, 'row-major', idx, dim-1, idx );\n\t\t}\n\t\t// Return the next row slice:\n\t\treturn {\n\t\t\t'value': slice( x, s, true, opts.writable ),\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn nditerRows( x, opts );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nditerRows;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create an iterator which iterates over each row in a matrix (or stack of matrices).\n*\n* @module @stdlib/ndarray/iter/rows\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n* var nditerRows = require( '@stdlib/ndarray/iter/rows' );\n*\n* var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] );\n* // returns \n*\n* var iter = nditerRows( x );\n*\n* var v = iter.next().value;\n* // returns \n*\n* var arr = ndarray2array( v );\n* // returns [ 1, 2 ]\n*\n* v = iter.next().value;\n* // returns \n*\n* arr = ndarray2array( v );\n* // returns [ 3, 4 ]\n*\n* v = iter.next().value;\n* // returns \n*\n* arr = ndarray2array( v );\n* // returns [ 5, 6 ]\n*\n* // ...\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );\nvar toArray = require( './../../base/to-array' );\nvar getStrides = require( './../../strides' );\nvar getOffset = require( './../../offset' );\nvar getShape = require( './../../shape' );\nvar getOrder = require( './../../order' );\nvar getData = require( './../../data-buffer' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Converts an ndarray to a generic array (which may include nested arrays).\n*\n* @param {ndarrayLike} x - input ndarray\n* @throws {TypeError} must provide an ndarray\n* @returns {(EmptyArray|Array|Array)} array (which may include nested arrays)\n*\n* @example\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n*\n* var buffer = [ 1, 2, 3, 4 ];\n* var shape = [ 2, 2 ];\n* var order = 'row-major';\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var arr = ndarray( 'generic', buffer, shape, strides, offset, order );\n*\n* var out = ndarray2array( arr );\n* // returns [ [ 1, 2 ], [ 3, 4 ] ]\n*/\nfunction ndarray2array( x ) {\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\treturn toArray( getData( x ), getShape( x ), getStrides( x ), getOffset( x ), getOrder( x ) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = ndarray2array;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert an ndarray to a generic array (which may include nested arrays).\n*\n* @module @stdlib/ndarray/to-array\n*\n* @example\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n*\n* var buffer = [ 1, 2, 3, 4 ];\n* var shape = [ 2, 2 ];\n* var order = 'row-major';\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var arr = ndarray( 'generic', buffer, shape, strides, offset, order );\n* // returns \n*\n* var out = ndarray2array( arr );\n* // returns [ [ 1, 2 ], [ 3, 4 ] ]\n*/\n\n// MODULES //\n\nvar ndarray2array = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = ndarray2array;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar isFunction = require( '@stdlib/assert/is-function' );\nvar isIteratorLike = require( '@stdlib/assert/is-iterator-like' );\nvar iteratorSymbol = require( '@stdlib/symbol/iterator' );\nvar ndarray2array = require( './../../../to-array' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns an iterator which converts each iterated ndarray to a generic array.\n*\n* @param {Iterator} iterator - input iterator\n* @throws {TypeError} must provide an iterator protocol-compliant object\n* @returns {Iterator} iterator\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n* var nditerRows = require( '@stdlib/ndarray/iter/rows' );\n*\n* var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] );\n* // returns \n*\n* var iter = nditer2arrayEach( nditerRows( x ) );\n*\n* var v = iter.next().value;\n* // returns [ 1, 2 ]\n*\n* v = iter.next().value;\n* // returns [ 3, 4 ]\n*\n* v = iter.next().value;\n* // returns [ 5, 6 ]\n*\n* // ...\n*/\nfunction nditer2arrayEach( iterator ) {\n\tvar iter;\n\tvar FLG;\n\n\tif ( !isIteratorLike( iterator ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an iterator protocol-compliant object. Value: `%s`.', iterator ) );\n\t}\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\t// If an environment supports `Symbol.iterator` and a provided iterator is iterable, make the iterator iterable:\n\tif ( iteratorSymbol && isFunction( iterator[ iteratorSymbol ] ) ) {\n\t\tsetReadOnly( iter, iteratorSymbol, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar v;\n\t\tif ( FLG ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tv = iterator.next();\n\t\tif ( v.done ) {\n\t\t\tFLG = true;\n\t\t\treturn v;\n\t\t}\n\t\treturn {\n\t\t\t'value': ndarray2array( v.value ),\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn nditer2arrayEach( iterator[ iteratorSymbol ]() );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nditer2arrayEach;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create an iterator which converts each iterated ndarray to a generic array.\n*\n* @module @stdlib/ndarray/iter/to-array-each\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n* var nditerRows = require( '@stdlib/ndarray/iter/rows' );\n* var nditer2arrayEach = require( '@stdlib/ndarray/iter/to-array-each' );\n*\n* var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] );\n* // returns \n*\n* var iter = nditer2arrayEach( nditerRows( x ) );\n*\n* var v = iter.next().value;\n* // returns [ 1, 2 ]\n*\n* v = iter.next().value;\n* // returns [ 3, 4 ]\n*\n* v = iter.next().value;\n* // returns [ 5, 6 ]\n*\n* // ...\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar isPlainObject = require( '@stdlib/assert/is-plain-object' );\nvar isOrder = require( './../../../base/assert/is-order' );\nvar isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar iteratorSymbol = require( '@stdlib/symbol/iterator' );\nvar zeros = require( '@stdlib/array/base/zeros' );\nvar getShape = require( './../../../shape' );\nvar numel = require( './../../../base/numel' );\nvar nextCartesianIndex = require( './../../../base/next-cartesian-index' ).assign;\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns an iterator which returns individual elements from a provided ndarray.\n*\n* @param {ndarray} x - input array\n* @param {Options} [options] - function options\n* @param {boolean} [options.order='row-major'] - index iteration order\n* @throws {TypeError} first argument must be an ndarray\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @returns {Iterator} iterator\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] );\n* // returns \n*\n* var iter = nditerValues( x );\n*\n* var v = iter.next().value;\n* // returns 1\n*\n* v = iter.next().value;\n* // returns 2\n*\n* v = iter.next().value;\n* // returns 3\n*\n* // ...\n*/\nfunction nditerValues( x ) {\n\tvar options;\n\tvar shape;\n\tvar ndims;\n\tvar opts;\n\tvar iter;\n\tvar FLG;\n\tvar idx;\n\tvar dim;\n\tvar N;\n\tvar i;\n\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ndarray. Value: `%s`.', x ) );\n\t}\n\topts = {\n\t\t'order': x.order\n\t};\n\tif ( arguments.length > 1 ) {\n\t\toptions = arguments[ 1 ];\n\t\tif ( !isPlainObject( options ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t\t}\n\t\tif ( hasOwnProp( options, 'order' ) ) {\n\t\t\tif ( !isOrder( options.order ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a recognized order. Option: `%s`.', 'order', options.order ) );\n\t\t\t}\n\t\t\topts.order = options.order;\n\t\t}\n\t}\n\t// Retrieve input array meta data:\n\tshape = getShape( x );\n\tndims = shape.length;\n\n\t// Check whether the input array is empty...\n\tN = numel( shape );\n\tif ( N === 0 ) {\n\t\tFLG = true;\n\t}\n\t// Resolve the dimension in which indices iterate fastest:\n\tif ( opts.order === 'row-major' ) {\n\t\tdim = ndims - 1;\n\t} else {\n\t\tdim = 0;\n\t}\n\t// Initialize a counter:\n\ti = -1;\n\n\t// Initialize an index array:\n\tidx = zeros( ndims );\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\t// If an environment supports `Symbol.iterator`, make the iterator iterable:\n\tif ( iteratorSymbol ) {\n\t\tsetReadOnly( iter, iteratorSymbol, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\ti += 1;\n\t\tif ( FLG || i >= N ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tif ( i > 0 ) {\n\t\t\tidx = nextCartesianIndex( shape, opts.order, idx, dim, idx );\n\t\t}\n\t\t// Return the next set of indices:\n\t\treturn {\n\t\t\t'value': x.get.apply( x, idx ),\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn nditerValues( x, opts );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nditerValues;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create an iterator which returns individual elements from a provided ndarray.\n*\n* @module @stdlib/ndarray/iter/values\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var nditerValues = require( '@stdlib/ndarray/iter/values' );\n*\n* var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] );\n* // returns \n*\n* var iter = nditerValues( x.shape );\n*\n* var v = iter.next().value;\n* // returns 1\n*\n* v = iter.next().value;\n* // returns 2\n*\n* v = iter.next().value;\n* // returns 3\n*\n* // ...\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nsetReadOnly( ns, 'nditerColumns', require( './../../iter/columns' ) );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nsetReadOnly( ns, 'nditerEntries', require( './../../iter/entries' ) );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nsetReadOnly( ns, 'nditerIndices', require( './../../iter/indices' ) );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nsetReadOnly( ns, 'nditerRows', require( './../../iter/rows' ) );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nsetReadOnly( ns, 'nditer2arrayEach', require( './../../iter/to-array-each' ) );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nsetReadOnly( ns, 'nditerValues', require( './../../iter/values' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );\nvar isCollection = require( '@stdlib/assert/is-collection' );\nvar isNonNegativeInteger = require( '@stdlib/assert/is-nonnegative-integer' ).isPrimitive;\nvar broadcast = require( './../../broadcast-array' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Broadcasts an ndarray to a specified shape if and only if the specified shape differs from the provided ndarray's shape.\n*\n* ## Notes\n*\n* - If a provided ndarray has the same shape as the specified shape, the function returns the provided ndarray.\n* - If a provided ndarray has a different (broadcast compatible) shape than the specified shape, the function returns a new **read-only** ndarray view of the provided ndarray's data. The view is typically **not** contiguous. As more than one element of a returned view may refer to the same memory location, writing to the input ndarray may affect multiple elements. If you need to write to the input ndarray, copy the input ndarray before broadcasting.\n*\n* @param {ndarray} x - input array\n* @param {NonNegativeIntegerArray} shape - desired shape\n* @throws {TypeError} first argument must be an ndarray\n* @throws {TypeError} second argument must be an array of nonnegative integers\n* @throws {Error} input array cannot have more dimensions than the desired shape\n* @throws {Error} input array dimension sizes must be `1` or equal to the corresponding dimension in the provided shape\n* @throws {Error} input array and desired shape must be broadcast compatible\n* @returns {ndarray} broadcasted array\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var shx = x.shape;\n* // returns [ 2, 2 ]\n*\n* var y = maybeBroadcastArray( x, [ 3, 2, 2 ] );\n* // returns \n*\n* var shy = y.shape;\n* // returns [ 3, 2, 2 ]\n*\n* var v = y.get( 0, 0, 0 );\n* // returns 1\n*\n* v = y.get( 0, 0, 1 );\n* // returns 2\n*\n* v = y.get( 1, 0, 0 );\n* // returns 1\n*\n* v = y.get( 1, 1, 0 );\n* // returns 3\n*\n* v = y.get( 2, 0, 0 );\n* // returns 1\n*\n* v = y.get( 2, 1, 1 );\n* // returns 4\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var y = maybeBroadcastArray( x, [ 3, 2 ] );\n* // throws \n*/\nfunction maybeBroadcastArray( x, shape ) {\n\tvar sh;\n\tvar N;\n\tvar d;\n\tvar i;\n\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ndarray. Value: `%s`.', x ) );\n\t}\n\tif ( !isCollection( shape ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an array of nonnegative integers. Value: `%s`.', shape ) );\n\t}\n\tN = shape.length;\n\tsh = x.shape;\n\n\t// Check whether we need to broadcast the input array...\n\tif ( sh.length === N ) {\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\td = shape[ i ];\n\t\t\tif ( !isNonNegativeInteger( d ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an array of nonnegative integers. Value: `%s`.', '[' + shape.join( ',' ) + ']' ) );\n\t\t\t}\n\t\t\t// Check whether dimensions match...\n\t\t\tif ( sh[ i ] !== d ) {\n\t\t\t\t// We found a mismatched dimension; delegate to `broadcast` to ensure that the input array is broadcast compatible with the desired array shape...\n\t\t\t\treturn broadcast( x, shape );\n\t\t\t}\n\t\t}\n\t\treturn x;\n\t}\n\t// If we are provided an array having a different rank (i.e., number of dimensions) than the desired shape, assume we need to broadcast, delegating to `broadcast` to ensure that the input array is broadcast compatible with the desired array shape...\n\treturn broadcast( x, shape );\n}\n\n\n// EXPORTS //\n\nmodule.exports = maybeBroadcastArray;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Broadcast an ndarray to a specified shape if and only if the specified shape differs from the provided ndarray's shape.\n*\n* @module @stdlib/ndarray/maybe-broadcast-array\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var maybeBroadcastArray = require( '@stdlib/ndarray/maybe-broadcast-array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var shx = x.shape;\n* // returns [ 2, 2 ]\n*\n* var y = maybeBroadcastArray( x, [ 3, 2, 2 ] );\n* // returns \n*\n* var shy = y.shape;\n* // returns [ 3, 2, 2 ]\n*\n* var v = y.get( 0, 0, 0 );\n* // returns 1\n*\n* v = y.get( 0, 0, 1 );\n* // returns 2\n*\n* v = y.get( 1, 0, 0 );\n* // returns 1\n*\n* v = y.get( 1, 1, 0 );\n* // returns 3\n*\n* v = y.get( 2, 0, 0 );\n* // returns 1\n*\n* v = y.get( 2, 1, 1 );\n* // returns 4\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "{\n\t\"float64\": -1,\n\t\"float32\": \"float64\",\n\t\"int32\": -1,\n\t\"int16\": \"int32\",\n\t\"int8\": \"int16\",\n\t\"uint32\": -1,\n\t\"uint16\": \"uint32\",\n\t\"uint8\": \"uint16\",\n\t\"uint8c\": \"uint16\",\n\t\"complex64\": \"complex128\",\n\t\"complex128\": -1,\n\t\"generic\": -1,\n\t\"binary\": -1\n}\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar objectKeys = require( '@stdlib/utils/keys' );\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar resolveStr = require( './../../base/dtype-resolve-str' );\nvar NEXT_DTYPES = require( './next_dtypes.json' );\n\n\n// FUNCTIONS //\n\n/**\n* Generates a table.\n*\n* @private\n* @returns {Object} table\n*/\nfunction generateTable() {\n\tvar dtypes;\n\tvar ntypes;\n\tvar out;\n\tvar i;\n\n\tout = {};\n\tdtypes = objectKeys( NEXT_DTYPES );\n\tntypes = dtypes.length;\n\tfor ( i = 0; i < ntypes; i++ ) {\n\t\tout[ dtypes[i] ] = NEXT_DTYPES[ dtypes[i] ];\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Returns the next larger ndarray data type of the same kind.\n*\n* @param {*} [dtype] - ndarray data type value\n* @returns {(Object|string|integer|null)} next larger data type(s) or null\n*\n* @example\n* var dt = nextDataType( 'float32' );\n* // returns 'float64'\n*/\nfunction nextDataType( dtype ) {\n\tif ( arguments.length === 0 ) {\n\t\treturn generateTable();\n\t}\n\tdtype = resolveStr( dtype );\n\tif ( hasOwnProp( NEXT_DTYPES, dtype ) ) {\n\t\treturn NEXT_DTYPES[ dtype ];\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = nextDataType;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the next larger ndarray data type of the same kind.\n*\n* @module @stdlib/ndarray/next-dtype\n*\n* @example\n* var nextDataType = require( '@stdlib/ndarray/next-dtype' );\n*\n* var dt = nextDataType( 'float32' );\n* // returns 'float64'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isNonNegativeInteger = require( '@stdlib/assert/is-nonnegative-integer' ).isPrimitive;\nvar isCollection = require( '@stdlib/assert/is-collection' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns the number of elements in an ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @throws {TypeError} must provide an ndarray\n* @returns {NonNegativeInteger} number of elements\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var n = numel( zeros( [ 3, 3, 3 ] ) );\n* // returns 27\n*/\nfunction numel( x ) {\n\tvar ndims;\n\tvar sh;\n\tvar n;\n\tvar d;\n\tvar i;\n\n\t// Note: we intentionally avoid rigorous ndarray checks to minimize performance impacts. This obviously means that non-ndarray-like objects (e.g., vanilla arrays) can sneak through, but this is likely all right for the purposes of this function...\n\tif ( typeof x !== 'object' || x === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\tn = x.length;\n\tif ( isNonNegativeInteger( n ) ) {\n\t\treturn n;\n\t}\n\tsh = x.shape;\n\tif ( !isCollection( sh ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\tndims = sh.length;\n\tif ( ndims === 0 ) {\n\t\t// Note: for minimal \"ndarray-like objects\", this will erroneously return zero when `x` is a zero-dimensional ndarray. This is part of the rationale for having a `length` property on actual ndarrays. As we don't can't know whether a provided ndarray-like is actually zero-dimensional without knowing/inspecting implementation details, we return zero here...\n\t\treturn 0;\n\t}\n\tn = 1;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\td = sh[ i ];\n\t\tif ( !isNonNegativeInteger( d ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t\t}\n\t\tn *= d;\n\t}\n\treturn n;\n}\n\n\n// EXPORTS //\n\nmodule.exports = numel;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the number of elements in an ndarray.\n*\n* @module @stdlib/ndarray/numel\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var numel = require( '@stdlib/ndarray/numel' );\n*\n* var n = numel( zeros( [ 3, 3, 3 ] ) );\n* // returns 27\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "{\n\t\"float64\": {\n\t\t\"float64\": \"float64\",\n\t\t\"float32\": \"float64\",\n\t\t\"int32\": \"float64\",\n\t\t\"int16\": \"float64\",\n\t\t\"int8\": \"float64\",\n\t\t\"uint32\": \"float64\",\n\t\t\"uint16\": \"float64\",\n\t\t\"uint8\": \"float64\",\n\t\t\"uint8c\": \"float64\",\n\t\t\"complex64\": \"complex128\",\n\t\t\"complex128\": \"complex128\",\n\t\t\"binary\": -1,\n\t\t\"generic\": \"generic\"\n\t},\n\t\"float32\": {\n\t\t\"float64\": \"float64\",\n\t\t\"float32\": \"float32\",\n\t\t\"int32\": \"float64\",\n\t\t\"int16\": \"float32\",\n\t\t\"int8\": \"float32\",\n\t\t\"uint32\": \"float64\",\n\t\t\"uint16\": \"float32\",\n\t\t\"uint8\": \"float32\",\n\t\t\"uint8c\": \"float32\",\n\t\t\"complex64\": \"complex64\",\n\t\t\"complex128\": \"complex128\",\n\t\t\"binary\": -1,\n\t\t\"generic\": \"generic\"\n\t},\n\t\"int32\": {\n\t\t\"float64\": \"float64\",\n\t\t\"float32\": \"float64\",\n\t\t\"int32\": \"int32\",\n\t\t\"int16\": \"int32\",\n\t\t\"int8\": \"int32\",\n\t\t\"uint32\": \"float64\",\n\t\t\"uint16\": \"int32\",\n\t\t\"uint8\": \"int32\",\n\t\t\"uint8c\": \"int32\",\n\t\t\"complex64\": \"complex128\",\n\t\t\"complex128\": \"complex128\",\n\t\t\"binary\": -1,\n\t\t\"generic\": \"generic\"\n\t},\n\t\"int16\": {\n\t\t\"float64\": \"float64\",\n\t\t\"float32\": \"float32\",\n\t\t\"int32\": \"int32\",\n\t\t\"int16\": \"int16\",\n\t\t\"int8\": \"int16\",\n\t\t\"uint32\": \"float64\",\n\t\t\"uint16\": \"int32\",\n\t\t\"uint8\": \"int16\",\n\t\t\"uint8c\": \"int16\",\n\t\t\"complex64\": \"complex64\",\n\t\t\"complex128\": \"complex128\",\n\t\t\"binary\": -1,\n\t\t\"generic\": \"generic\"\n\t},\n\t\"int8\": {\n\t\t\"float64\": \"float64\",\n\t\t\"float32\": \"float32\",\n\t\t\"int32\": \"int32\",\n\t\t\"int16\": \"int16\",\n\t\t\"int8\": \"int8\",\n\t\t\"uint32\": \"float64\",\n\t\t\"uint16\": \"int32\",\n\t\t\"uint8\": \"int16\",\n\t\t\"uint8c\": \"int16\",\n\t\t\"complex64\": \"complex64\",\n\t\t\"complex128\": \"complex128\",\n\t\t\"binary\": -1,\n\t\t\"generic\": \"generic\"\n\t},\n\t\"uint32\": {\n\t\t\"float64\": \"float64\",\n\t\t\"float32\": \"float64\",\n\t\t\"int32\": \"float64\",\n\t\t\"int16\": \"float64\",\n\t\t\"int8\": \"float64\",\n\t\t\"uint32\": \"uint32\",\n\t\t\"uint16\": \"uint32\",\n\t\t\"uint8\": \"uint32\",\n\t\t\"uint8c\": \"uint32\",\n\t\t\"complex64\": \"complex128\",\n\t\t\"complex128\": \"complex128\",\n\t\t\"binary\": -1,\n\t\t\"generic\": \"generic\"\n\t},\n\t\"uint16\": {\n\t\t\"float64\": \"float64\",\n\t\t\"float32\": \"float32\",\n\t\t\"int32\": \"int32\",\n\t\t\"int16\": \"int32\",\n\t\t\"int8\": \"int32\",\n\t\t\"uint32\": \"uint32\",\n\t\t\"uint16\": \"uint16\",\n\t\t\"uint8\": \"uint16\",\n\t\t\"uint8c\": \"uint16\",\n\t\t\"complex64\": \"complex64\",\n\t\t\"complex128\": \"complex128\",\n\t\t\"binary\": -1,\n\t\t\"generic\": \"generic\"\n\t},\n\t\"uint8\": {\n\t\t\"float64\": \"float64\",\n\t\t\"float32\": \"float32\",\n\t\t\"int32\": \"int32\",\n\t\t\"int16\": \"int16\",\n\t\t\"int8\": \"int16\",\n\t\t\"uint32\": \"uint32\",\n\t\t\"uint16\": \"uint16\",\n\t\t\"uint8\": \"uint8\",\n\t\t\"uint8c\": \"uint8\",\n\t\t\"complex64\": \"complex64\",\n\t\t\"complex128\": \"complex128\",\n\t\t\"binary\": -1,\n\t\t\"generic\": \"generic\"\n\t},\n\t\"uint8c\": {\n\t\t\"float64\": \"float64\",\n\t\t\"float32\": \"float32\",\n\t\t\"int32\": \"int32\",\n\t\t\"int16\": \"int16\",\n\t\t\"int8\": \"int16\",\n\t\t\"uint32\": \"uint32\",\n\t\t\"uint16\": \"uint16\",\n\t\t\"uint8\": \"uint8\",\n\t\t\"uint8c\": \"uint8c\",\n\t\t\"complex64\": \"complex64\",\n\t\t\"complex128\": \"complex128\",\n\t\t\"binary\": -1,\n\t\t\"generic\": \"generic\"\n\t},\n\t\"complex128\": {\n\t\t\"float64\": \"complex128\",\n\t\t\"float32\": \"complex128\",\n\t\t\"int32\": \"complex128\",\n\t\t\"int16\": \"complex128\",\n\t\t\"int8\": \"complex128\",\n\t\t\"uint32\": \"complex128\",\n\t\t\"uint16\": \"complex128\",\n\t\t\"uint8\": \"complex128\",\n\t\t\"uint8c\": \"complex128\",\n\t\t\"complex64\": \"complex128\",\n\t\t\"complex128\": \"complex128\",\n\t\t\"binary\": -1,\n\t\t\"generic\": \"generic\"\n\t},\n\t\"complex64\": {\n\t\t\"float64\": \"complex128\",\n\t\t\"float32\": \"complex64\",\n\t\t\"int32\": \"complex128\",\n\t\t\"int16\": \"complex64\",\n\t\t\"int8\": \"complex64\",\n\t\t\"uint32\": \"complex128\",\n\t\t\"uint16\": \"complex64\",\n\t\t\"uint8\": \"complex64\",\n\t\t\"uint8c\": \"complex64\",\n\t\t\"complex64\": \"complex64\",\n\t\t\"complex128\": \"complex128\",\n\t\t\"binary\": -1,\n\t\t\"generic\": \"generic\"\n\t},\n\t\"generic\": {\n\t\t\"float64\": \"generic\",\n\t\t\"float32\": \"generic\",\n\t\t\"int32\": \"generic\",\n\t\t\"int16\": \"generic\",\n\t\t\"int8\": \"generic\",\n\t\t\"uint32\": \"generic\",\n\t\t\"uint16\": \"generic\",\n\t\t\"uint8\": \"generic\",\n\t\t\"uint8c\": \"generic\",\n\t\t\"complex64\": \"generic\",\n\t\t\"complex128\": \"generic\",\n\t\t\"binary\": -1,\n\t\t\"generic\": \"generic\"\n\t},\n\t\"binary\": {\n\t\t\"float64\": -1,\n\t\t\"float32\": -1,\n\t\t\"int32\": -1,\n\t\t\"int16\": -1,\n\t\t\"int8\": -1,\n\t\t\"uint32\": -1,\n\t\t\"uint16\": -1,\n\t\t\"uint8\": -1,\n\t\t\"uint8c\": -1,\n\t\t\"complex64\": -1,\n\t\t\"complex128\": -1,\n\t\t\"binary\": \"binary\",\n\t\t\"generic\": -1\n\t}\n}\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar objectKeys = require( '@stdlib/utils/keys' );\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar resolve = require( './../../base/dtype-resolve-str' );\nvar PROMOTION_RULES = require( './promotion_rules.json' );\n\n\n// FUNCTIONS //\n\n/**\n* Generates a full table of promotion rules.\n*\n* @private\n* @returns {Object} table\n*/\nfunction generateFullTable() {\n\tvar dtypes;\n\tvar ntypes;\n\tvar out;\n\tvar tmp;\n\tvar dt1;\n\tvar dt2;\n\tvar o;\n\tvar j;\n\tvar i;\n\n\tout = {};\n\tdtypes = objectKeys( PROMOTION_RULES );\n\tntypes = dtypes.length;\n\tfor ( i = 0; i < ntypes; i++ ) {\n\t\tdt1 = dtypes[ i ];\n\t\to = PROMOTION_RULES[ dt1 ];\n\t\ttmp = {};\n\t\tfor ( j = 0; j < ntypes; j++ ) {\n\t\t\tdt2 = dtypes[ j ];\n\t\t\ttmp[ dt2 ] = o[ dt2 ];\n\t\t}\n\t\tout[ dt1 ] = tmp;\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Returns the ndarray data type with the smallest size and closest \"kind\" to which ndarray data types can be safely cast.\n*\n* @param {*} [dtype1] - ndarray data type value\n* @param {*} [dtype2] - ndarray data type value\n* @returns {(Object|integer|string|null)} promotion rule(s) or null\n*\n* @example\n* var table = promotionRules();\n* // returns {...}\n*\n* @example\n* var dt = promotionRules( 'float32', 'uint32' );\n* // returns 'float64'\n*\n* @example\n* var dt = promotionRules( 'binary', 'generic' );\n* // returns -1\n*\n* @example\n* var dt = promotionRules( 'float32', 'foo' );\n* // returns null\n*/\nfunction promotionRules( dtype1, dtype2 ) {\n\tvar o;\n\tif ( arguments.length === 0 ) {\n\t\treturn generateFullTable();\n\t}\n\tdtype1 = resolve( dtype1 );\n\tif ( hasOwnProp( PROMOTION_RULES, dtype1 ) ) {\n\t\to = PROMOTION_RULES[ dtype1 ];\n\t\tdtype2 = resolve( dtype2 );\n\t\tif ( hasOwnProp( o, dtype2 ) ) {\n\t\t\treturn o[ dtype2 ];\n\t\t}\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = promotionRules;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the ndarray data type with the smallest size and closest \"kind\" to which ndarray data types can be safely cast.\n*\n* @module @stdlib/ndarray/promotion-rules\n*\n* @example\n* var promotionRules = require( '@stdlib/ndarray/promotion-rules' );\n*\n* var table = promotionRules();\n* // returns {...}\n*\n* var dt = promotionRules( 'float32', 'uint32' );\n* // returns 'float64'\n*\n* dt = promotionRules( 'binary', 'generic' );\n* // returns -1\n*\n* dt = promotionRules( 'float32', 'foo' );\n* // returns null\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );\nvar isMultiSlice = require( '@stdlib/assert/is-multi-slice' );\nvar isArrayLikeObject = require( '@stdlib/assert/is-array-like-object' );\nvar isPlainObject = require( '@stdlib/assert/is-plain-object' );\nvar isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar MultiSlice = require( '@stdlib/slice/multi' );\nvar base = require( './../../base/slice' );\nvar getShape = require( './../../shape' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns a read-only view of an input ndarray.\n*\n* @param {ndarray} x - input array\n* @param {...*} s - slice arguments\n* @param {Options} [options] - options\n* @param {boolean} [options.strict] - boolean indicating whether to enforce strict bounds checking\n* @throws {TypeError} first argument must be an ndarray\n* @throws {TypeError} must provide valid slice arguments\n* @throws {Error} insufficient arguments\n* @throws {Error} too many arguments\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {RangeError} number of slice dimensions must match the number of array dimensions\n* @throws {RangeError} slice exceeds array bounds\n* @returns {ndarray} ndarray view\n*\n* @example\n* var Slice = require( '@stdlib/slice/ctor' );\n* var MultiSlice = require( '@stdlib/slice/multi' );\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n*\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n* // returns \n*\n* var sh = x.shape;\n* // returns [ 3, 2 ]\n*\n* var arr = ndarray2array( x );\n* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]\n*\n* var s = new MultiSlice( new Slice( null, null, -2 ), new Slice( null, null, -1 ) );\n* // returns \n*\n* var y = slice( x, s );\n* // returns \n*\n* sh = y.shape;\n* // returns [ 2, 2 ]\n*\n* arr = ndarray2array( y );\n* // returns [ [ 6.0, 5.0 ], [ 2.0, 1.0 ] ]\n*/\nfunction slice( x, s ) {\n\tvar options;\n\tvar nargs;\n\tvar opts;\n\tvar args;\n\tvar sh;\n\tvar S;\n\tvar i;\n\n\topts = {\n\t\t'strict': true\n\t};\n\tnargs = arguments.length;\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ndarray. Value: `%s`.', x ) );\n\t}\n\tif ( isPlainObject( arguments[ nargs-1 ] ) ) {\n\t\tnargs -= 1;\n\t\toptions = arguments[ nargs ];\n\t\tif ( hasOwnProp( options, 'strict' ) ) {\n\t\t\tif ( !isBoolean( options.strict ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'strict', options.strict ) );\n\t\t\t}\n\t\t\topts.strict = options.strict;\n\t\t}\n\t\tsh = getShape( x );\n\t\tif ( nargs === 1 && sh.length > 0 ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Number of slice dimensions does not match the number of array dimensions. Array shape: (%s). Slice dimensions: %u.', sh.join( ',' ), 0 ) );\n\t\t}\n\t}\n\tif ( isMultiSlice( s ) ) {\n\t\tS = s;\n\t\tif ( nargs > 2 ) {\n\t\t\tthrow new Error( 'invalid invocation. Too many arguments.' );\n\t\t}\n\t} else {\n\t\tif ( isArrayLikeObject( s ) ) {\n\t\t\targs = s;\n\t\t\tif ( nargs > 2 ) {\n\t\t\t\tthrow new Error( 'invalid invocation. Too many arguments.' );\n\t\t\t}\n\t\t} else {\n\t\t\targs = [];\n\t\t\tfor ( i = 1; i < nargs; i++ ) {\n\t\t\t\targs.push( arguments[ i ] );\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tS = MultiSlice.apply( null, args );\n\t\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\t\t// Search for the first offending value...\n\t\t\tfor ( i = 0; i < args.length; i++ ) {\n\t\t\t\ttry {\n\t\t\t\t\tnew MultiSlice( args[ i ] ); // eslint-disable-line no-new\n\t\t\t\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Slice arguments must be either a Slice, integer, null, or undefined. Value: `%s`.', String( args[ i ] ) ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn base( x, S, opts.strict, false );\n}\n\n\n// EXPORTS //\n\nmodule.exports = slice;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a read-only view of an input ndarray.\n*\n* @module @stdlib/ndarray/slice\n*\n* @example\n* var Slice = require( '@stdlib/slice/ctor' );\n* var MultiSlice = require( '@stdlib/slice/multi' );\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n* var slice = require( '@stdlib/ndarray/slice' );\n*\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n* // returns \n*\n* var sh = x.shape;\n* // returns [ 3, 2 ]\n*\n* var arr = ndarray2array( x );\n* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]\n*\n* var s = new MultiSlice( new Slice( null, null, -2 ), new Slice( null, null, -1 ) );\n* // returns \n*\n* var y = slice( x, s );\n* // returns \n*\n* sh = y.shape;\n* // returns [ 2, 2 ]\n*\n* arr = ndarray2array( y );\n* // returns [ [ 6.0, 5.0 ], [ 2.0, 1.0 ] ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );\nvar isMultiSlice = require( '@stdlib/assert/is-multi-slice' );\nvar isArrayLikeObject = require( '@stdlib/assert/is-array-like-object' );\nvar isPlainObject = require( '@stdlib/assert/is-plain-object' );\nvar isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;\nvar isReadOnly = require( './../../base/assert/is-read-only' );\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar MultiSlice = require( '@stdlib/slice/multi' );\nvar base = require( './../../base/slice-assign' );\nvar getShape = require( './../../shape' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Assigns element values from a broadcasted input ndarray to corresponding elements in an output ndarray view.\n*\n* @param {ndarray} x - input array\n* @param {ndarray} y - output array\n* @param {...*} s - slice arguments\n* @param {Options} [options] - options\n* @param {boolean} [options.strict] - boolean indicating whether to enforce strict bounds checking\n* @throws {TypeError} first argument must be an ndarray\n* @throws {TypeError} second argument must be an ndarray\n* @throws {TypeError} must provide valid slice arguments\n* @throws {Error} insufficient arguments\n* @throws {Error} too many arguments\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {RangeError} number of slice dimensions must match the number of output array dimensions\n* @throws {RangeError} slice exceeds array bounds\n* @throws {Error} input array must be broadcast compatible with an output array view\n* @throws {TypeError} input array cannot be safely cast to the output array data type\n* @throws {Error} cannot write to a read-only ndarray\n* @returns {ndarray} output array\n*\n* @example\n* var Slice = require( '@stdlib/slice/ctor' );\n* var MultiSlice = require( '@stdlib/slice/multi' );\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n* var ndzeros = require( '@stdlib/ndarray/zeros' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n*\n* // Define an input array:\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n* // returns \n*\n* var sh = x.shape;\n* // returns [ 3, 2 ]\n*\n* var arr = ndarray2array( x );\n* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]\n*\n* // Define an output array:\n* var y = ndzeros( [ 2, 3, 2 ], {\n* 'dtype': x.dtype\n* });\n*\n* // Create a slice:\n* var s0 = null;\n* var s1 = new Slice( null, null, -1 );\n* var s2 = new Slice( null, null, -1 );\n* var s = new MultiSlice( s0, s1, s2 );\n* // returns \n*\n* // Perform assignment:\n* var out = sliceAssign( x, y, s );\n* // returns \n*\n* var bool = ( out === y );\n* // returns true\n*\n* arr = ndarray2array( y );\n* // returns [ [ [ 6.0, 5.0 ], [ 4.0, 3.0 ], [ 2.0, 1.0 ] ], [ [ 6.0, 5.0 ], [ 4.0, 3.0 ], [ 2.0, 1.0 ] ] ]\n*/\nfunction sliceAssign( x, y, s ) {\n\tvar options;\n\tvar nargs;\n\tvar opts;\n\tvar args;\n\tvar sh;\n\tvar S;\n\tvar i;\n\n\topts = {\n\t\t'strict': true\n\t};\n\tnargs = arguments.length;\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ndarray. Value: `%s`.', x ) );\n\t}\n\tif ( !isndarrayLike( y ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an ndarray. Value: `%s`.', y ) );\n\t}\n\tif ( isReadOnly( y ) ) {\n\t\tthrow new Error( 'invalid argument. Cannot write to a read-only array.' );\n\t}\n\tif ( isPlainObject( arguments[ nargs-1 ] ) ) {\n\t\tnargs -= 1;\n\t\toptions = arguments[ nargs ];\n\t\tif ( hasOwnProp( options, 'strict' ) ) {\n\t\t\tif ( !isBoolean( options.strict ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'strict', options.strict ) );\n\t\t\t}\n\t\t\topts.strict = options.strict;\n\t\t}\n\t\tsh = getShape( y );\n\t\tif ( nargs === 2 && sh.length > 0 ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Number of slice dimensions does not match the number of array dimensions. Array shape: (%s). Slice dimensions: %u.', sh.join( ',' ), 0 ) );\n\t\t}\n\t}\n\tif ( isMultiSlice( s ) ) {\n\t\tS = s;\n\t\tif ( nargs > 3 ) {\n\t\t\tthrow new Error( 'invalid invocation. Too many arguments.' );\n\t\t}\n\t} else {\n\t\tif ( isArrayLikeObject( s ) ) {\n\t\t\targs = s;\n\t\t\tif ( nargs > 3 ) {\n\t\t\t\tthrow new Error( 'invalid invocation. Too many arguments.' );\n\t\t\t}\n\t\t} else {\n\t\t\targs = [];\n\t\t\tfor ( i = 2; i < nargs; i++ ) {\n\t\t\t\targs.push( arguments[ i ] );\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tS = MultiSlice.apply( null, args );\n\t\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\t\t// Search for the first offending value...\n\t\t\tfor ( i = 0; i < args.length; i++ ) {\n\t\t\t\ttry {\n\t\t\t\t\tnew MultiSlice( args[ i ] ); // eslint-disable-line no-new\n\t\t\t\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Slice arguments must be either a Slice, integer, null, or undefined. Value: `%s`.', String( args[ i ] ) ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn base( x, y, S, opts.strict );\n}\n\n\n// EXPORTS //\n\nmodule.exports = sliceAssign;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Assign element values from a broadcasted input ndarray to corresponding elements in an output ndarray view.\n*\n* @module @stdlib/ndarray/slice-assign\n*\n* @example\n* var Slice = require( '@stdlib/slice/ctor' );\n* var MultiSlice = require( '@stdlib/slice/multi' );\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n* var ndzeros = require( '@stdlib/ndarray/zeros' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n* var sliceAssign = require( '@stdlib/ndarray/slice-assign' );\n*\n* // Define an input array:\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n* // returns \n*\n* var sh = x.shape;\n* // returns [ 3, 2 ]\n*\n* var arr = ndarray2array( x );\n* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]\n*\n* // Define an output array:\n* var y = ndzeros( [ 2, 3, 2 ], {\n* 'dtype': x.dtype\n* });\n*\n* // Create a slice:\n* var s0 = null;\n* var s1 = new Slice( null, null, -1 );\n* var s2 = new Slice( null, null, -1 );\n* var s = new MultiSlice( s0, s1, s2 );\n* // returns \n*\n* // Perform assignment:\n* var out = sliceAssign( x, y, s );\n* // returns \n*\n* var bool = ( out === y );\n* // returns true\n*\n* arr = ndarray2array( y );\n* // returns [ [ [ 6.0, 5.0 ], [ 4.0, 3.0 ], [ 2.0, 1.0 ] ], [ [ 6.0, 5.0 ], [ 4.0, 3.0 ], [ 2.0, 1.0 ] ] ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "{\n\t\"mode\": [ \"throw\" ],\n\t\"order\": \"row-major\"\n}\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isObject = require( '@stdlib/assert/is-plain-object' );\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar isArray = require( '@stdlib/assert/is-array' );\nvar isOrder = require( './../../base/assert/is-order' );\nvar isIndexMode = require( './../../base/assert/is-index-mode' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Validates function options.\n*\n* @private\n* @param {Object} opts - destination object\n* @param {Options} options - function options\n* @param {(StringArray|string)} [options.mode] - specifies how to handle subscripts which exceed array dimensions\n* @param {string} [options.order] - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @returns {(Error|null)} null or an error object\n*\n* @example\n* var opts = {};\n* var options = {\n* 'mode': 'throw',\n* 'order': 'column-major'\n* };\n* var err = validate( opts, options );\n* if ( err ) {\n* throw err;\n* }\n*/\nfunction validate( opts, options ) {\n\tvar i;\n\tif ( !isObject( options ) ) {\n\t\treturn new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t}\n\tif ( hasOwnProp( options, 'mode' ) ) {\n\t\topts.mode = options.mode;\n\t\tif ( !isArray( opts.mode ) ) {\n\t\t\topts.mode = [ opts.mode ];\n\t\t} else if ( opts.mode.length === 0 ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option cannot be an empty array.', 'mode' ) );\n\t\t}\n\t\tfor ( i = 0; i < opts.mode.length; i++ ) {\n\t\t\tif ( !isIndexMode( opts.mode[ i ] ) ) {\n\t\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a supported/recognized mode. Option: `%s`.', 'mode', opts.mode[ i ] ) );\n\t\t\t}\n\t\t}\n\t}\n\tif ( hasOwnProp( options, 'order' ) ) {\n\t\topts.order = options.order;\n\t\tif ( !isOrder( opts.order ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a supported/recognized order. Option: `%s`.', 'order', opts.order ) );\n\t\t}\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = validate;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isNonNegativeIntegerArray = require( '@stdlib/assert/is-nonnegative-integer-array' ).primitives;\nvar isInteger = require( '@stdlib/assert/is-integer' ).isPrimitive;\nvar shape2strides = require( './../../base/shape2strides' );\nvar getIndex = require( './../../base/sub2ind' );\nvar format = require( '@stdlib/string/format' );\nvar defaults = require( './defaults.json' );\nvar validate = require( './validate.js' );\n\n\n// MAIN //\n\n/**\n* Converts subscripts to a linear index.\n*\n* ## Notes\n*\n* - The function accepts the following \"modes\":\n*\n* - `throw`: throws an error when a subscript exceeds array dimensions.\n* - `wrap`: wrap around subscripts exceeding array dimensions using modulo arithmetic.\n* - `clamp`: set subscripts exceeding array dimensions to either `0` (minimum index) or the maximum index along a particular dimension.\n*\n* - If provided fewer modes than dimensions, the function recycles modes using modulo arithmetic.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {...integer} i - subscripts\n* @param {Options} [options] - function options\n* @param {(StringArray|string)} [options.mode=[\"throw\"]] - specifies how to handle subscripts which exceed array dimensions\n* @param {string} [options.order=\"row-major\"] - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @throws {TypeError} first argument must be an array-like object containing nonnegative integers\n* @throws {TypeError} subscripts must be integer valued\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {RangeError} must provide subscripts which do not exceed array dimensions\n* @throws {RangeError} number of subscripts much match the number of dimensions\n* @returns {NonNegativeInteger} linear index\n*\n* @example\n* var i = sub2ind( [ 3, 3, 3 ], 1, 2, 2 );\n* // returns 17\n*/\nfunction sub2ind() {\n\tvar options;\n\tvar shape;\n\tvar ndims;\n\tvar args;\n\tvar opts;\n\tvar err;\n\tvar len;\n\tvar i;\n\tvar j;\n\n\tshape = arguments[ 0 ];\n\tif ( !isNonNegativeIntegerArray( shape ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object containing nonnegative integers. Value: `%s`.', shape ) );\n\t}\n\tlen = arguments.length;\n\tndims = shape.length;\n\n\topts = {};\n\topts.mode = defaults.mode.slice();\n\topts.order = defaults.order;\n\n\tif ( len > ndims+1 ) {\n\t\tj = len - 1;\n\t\toptions = arguments[ j ];\n\t\terr = validate( opts, options );\n\t\tif ( err ) {\n\t\t\tthrow err;\n\t\t}\n\t} else {\n\t\tj = len;\n\t}\n\ti = 1;\n\tif ( j-i !== ndims ) {\n\t\tthrow new RangeError( format( 'invalid argument. Number of provided subscripts must match the number of dimensions. ndims: `%u`. Number of subscripts: `%u`.', ndims, j-i ) );\n\t}\n\targs = new Array( ndims+4 );\n\targs[ 0 ] = shape;\n\targs[ 1 ] = shape2strides( shape, opts.order );\n\targs[ 2 ] = 0; // strides are positive, so offset is always zero\n\tfor ( ; i < j; i++ ) {\n\t\tif ( !isInteger( arguments[ i ] ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Subscripts must be integer valued. Argument: `%u`. Value: `%s`.', i, arguments[ i ] ) );\n\t\t}\n\t\targs[ i+2 ] = arguments[ i ];\n\t}\n\targs[ i+2 ] = opts.mode; // i+2 == args.length-1\n\treturn getIndex.apply( null, args );\n}\n\n\n// EXPORTS //\n\nmodule.exports = sub2ind;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert subscripts to a linear index.\n*\n* @module @stdlib/ndarray/sub2ind\n*\n* @example\n* var sub2ind = require( '@stdlib/ndarray/sub2ind' );\n*\n* var i = sub2ind( [ 3, 3, 3 ], 1, 2, 2 );\n* // returns 17\n*/\n\n// MODULES //\n\nvar sub2ind = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = sub2ind;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isPlainObject = require( '@stdlib/assert/is-plain-object' );\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar isArrayLike = require( '@stdlib/assert/is-array-like' );\nvar shape2strides = require( './../../base/shape2strides' );\nvar strides2offset = require( './../../base/strides2offset' );\nvar buffer = require( './../../base/buffer' );\nvar numel = require( './../../base/numel' );\nvar ndarray = require( './../../ctor' );\nvar defaults = require( './../../defaults' );\nvar format = require( '@stdlib/string/format' );\n\n\n// VARIABLES //\n\nvar DTYPE = defaults.get( 'dtypes.default' );\nvar ORDER = defaults.get( 'order' );\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled ndarray having a specified shape and data type.\n*\n* @param {(NonNegativeIntegerArray|NonNegativeInteger)} shape - array shape\n* @param {Options} [options] - options\n* @param {string} [options.dtype='float64'] - data type\n* @param {string} [options.order='row-major'] - array order\n* @param {string} [options.mode=\"throw\"] - specifies how to handle indices which exceed array dimensions\n* @param {StringArray} [options.submode=[\"throw\"]] - specifies how to handle subscripts which exceed array dimensions on a per dimension basis\n* @param {boolean} [options.readonly=false] - boolean indicating whether an array should be read-only\n* @throws {TypeError} first argument must be either a nonnegative integer or an array of nonnegative integers\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} `dtype` option must be a recognized data type\n* @throws {TypeError} `order` option must be a recognized array order\n* @throws {TypeError} must provide valid options\n* @returns {ndarray} ndarray\n*\n* @example\n* var arr = zeros( [ 2, 2 ] );\n* // returns \n*\n* var sh = arr.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = arr.dtype;\n* // returns 'float64'\n*/\nfunction zeros( shape ) {\n\tvar options;\n\tvar dtype;\n\tvar order;\n\tvar ndims;\n\tvar opts;\n\tvar buf;\n\tvar len;\n\tvar st;\n\tvar sh;\n\n\topts = {};\n\tif ( arguments.length > 1 ) {\n\t\toptions = arguments[ 1 ];\n\t\tif ( !isPlainObject( options ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t\t}\n\t\tif ( hasOwnProp( options, 'dtype' ) ) {\n\t\t\tdtype = options.dtype;\n\t\t} else {\n\t\t\tdtype = DTYPE;\n\t\t}\n\t\tif ( hasOwnProp( options, 'order' ) ) {\n\t\t\torder = options.order;\n\t\t} else {\n\t\t\torder = ORDER;\n\t\t}\n\t\tif ( hasOwnProp( options, 'mode' ) ) {\n\t\t\topts.mode = options.mode;\n\t\t}\n\t\tif ( hasOwnProp( options, 'submode' ) ) {\n\t\t\topts.submode = options.submode;\n\t\t}\n\t\tif ( hasOwnProp( options, 'readonly' ) ) {\n\t\t\topts.readonly = options.readonly;\n\t\t}\n\t} else {\n\t\tdtype = DTYPE;\n\t\torder = ORDER;\n\t}\n\tif ( typeof shape === 'number' ) {\n\t\tsh = [ shape ];\n\t} else if ( isArrayLike( shape ) ) {\n\t\tsh = shape;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be either a nonnegative integer or an array of nonnegative integers. Value: `%s`.', shape ) );\n\t}\n\tndims = sh.length;\n\tif ( ndims > 0 ) {\n\t\tlen = numel( sh );\n\t\tif ( len !== len || len < 0 ) {\n\t\t\t// We should only get here if we've been provided an invalid shape (e.g., an array containing negative integers, etc)...\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be either a nonnegative integer or an array of nonnegative integers. Value: `%s`.', shape ) );\n\t\t}\n\t\tst = shape2strides( sh, order );\n\t} else {\n\t\t// For 0-dimensional arrays, the buffer should contain a single element...\n\t\tlen = 1;\n\t\tst = [ 0 ];\n\t}\n\tbuf = buffer( dtype, len );\n\tif ( buf === null ) {\n\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a recognized data type. Option: `%s`.', 'dtype', dtype ) );\n\t}\n\treturn new ndarray( dtype, buf, sh, st, strides2offset( sh, st ), order, opts ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = zeros;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create a zero-filled ndarray having a specified shape and data type.\n*\n* @module @stdlib/ndarray/zeros\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var arr = zeros( [ 2, 2 ], {\n* 'dtype': 'float32'\n* });\n* // returns \n*\n* var sh = arr.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = arr.dtype;\n* // returns 'float32'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );\nvar isPlainObject = require( '@stdlib/assert/is-plain-object' );\nvar isNonNegativeIntegerArray = require( '@stdlib/assert/is-nonnegative-integer-array' ).primitives;\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar shape2strides = require( './../../base/shape2strides' );\nvar strides2offset = require( './../../base/strides2offset' );\nvar buffer = require( './../../base/buffer' );\nvar numel = require( './../../base/numel' );\nvar getDType = require( './../../dtype' );\nvar getShape = require( './../../shape' );\nvar getOrder = require( './../../order' );\nvar ndarray = require( './../../ctor' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled ndarray having the same shape and data type as a provided ndarray.\n*\n* @param {ndarray} x - input array\n* @param {Options} [options] - function options\n* @param {string} [options.dtype] - output array data type (overrides the input array's inferred data type)\n* @param {string} [options.order] - specifies whether the output array should be 'row-major' (C-style) or 'column-major' (Fortran-style) (overrides the input array's inferred order)\n* @param {(NonNegativeIntegerArray|NonNegativeInteger)} [options.shape] - output array shape (overrides the input array's inferred shape)\n* @param {string} [options.mode=\"throw\"] - specifies how to handle indices which exceed array dimensions\n* @param {StringArray} [options.submode=[\"throw\"]] - specifies how to handle subscripts which exceed array dimensions on a per dimension basis\n* @param {boolean} [options.readonly=false] - boolean indicating whether an array should be read-only\n* @throws {TypeError} first argument must have a recognized data type\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} `dtype` option must be a supported ndarray data type\n* @throws {TypeError} `order` option must be a supported order\n* @throws {TypeError} `shape` option must be either a nonnegative integer or an array of nonnegative integers\n* @throws {TypeError} must provide valid options\n* @returns {ndarray} ndarray\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var x = zeros( [ 2, 2 ] );\n* // returns \n*\n* var y = zerosLike( x );\n* // returns \n*\n* var sh = y.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = y.dtype;\n* // returns 'float64'\n*/\nfunction zerosLike( x ) {\n\tvar options;\n\tvar dtype;\n\tvar order;\n\tvar ndims;\n\tvar opts;\n\tvar buf;\n\tvar len;\n\tvar st;\n\tvar sh;\n\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ndarray-like object. Value: `%s`.', x ) );\n\t}\n\topts = {};\n\tif ( arguments.length > 1 ) {\n\t\toptions = arguments[ 1 ];\n\t\tif ( !isPlainObject( options ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t\t}\n\t\tif ( hasOwnProp( options, 'dtype' ) ) {\n\t\t\tdtype = options.dtype;\n\t\t} else {\n\t\t\tdtype = getDType( x );\n\t\t}\n\t\tif ( hasOwnProp( options, 'shape' ) ) {\n\t\t\tsh = options.shape;\n\t\t\tif ( typeof sh === 'number' ) {\n\t\t\t\tsh = [ sh ];\n\t\t\t}\n\t\t\tif ( !isNonNegativeIntegerArray( sh ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a nonnegative integer or an array of nonnegative integers. Option: `%s`.', 'shape', sh ) );\n\t\t\t}\n\t\t} else {\n\t\t\tsh = getShape( x );\n\t\t}\n\t\tif ( hasOwnProp( options, 'order' ) ) {\n\t\t\torder = options.order;\n\t\t} else {\n\t\t\torder = getOrder( x );\n\t\t}\n\t\tif ( hasOwnProp( options, 'mode' ) ) {\n\t\t\topts.mode = options.mode;\n\t\t}\n\t\tif ( hasOwnProp( options, 'submode' ) ) {\n\t\t\topts.submode = options.submode;\n\t\t}\n\t\tif ( hasOwnProp( options, 'readonly' ) ) {\n\t\t\topts.readonly = options.readonly;\n\t\t}\n\t} else {\n\t\tdtype = getDType( x );\n\t\tsh = getShape( x );\n\t\torder = getOrder( x );\n\t}\n\tndims = sh.length;\n\tif ( ndims > 0 ) {\n\t\tlen = numel( sh );\n\t\tst = shape2strides( sh, order );\n\t} else {\n\t\t// For 0-dimensional arrays, the buffer should contain a single element...\n\t\tlen = 1;\n\t\tst = [ 0 ];\n\t}\n\tbuf = buffer( dtype, len );\n\tif ( buf === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must have a recognized data type. Value: `%s`.', dtype ) );\n\t}\n\treturn new ndarray( dtype, buf, sh, st, strides2offset( sh, st ), order, opts ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = zerosLike;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create a zero-filled ndarray having the same shape and data type as a provided ndarray.\n*\n* @module @stdlib/ndarray/zeros-like\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var zerosLike = require( '@stdlib/ndarray/zeros-like' );\n*\n* var x = zeros( [ 2, 2 ] );\n* // returns \n*\n* var y = zerosLike( x );\n* // returns \n*\n* var sh = y.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = y.dtype;\n* // returns 'float64'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/array}\n*/\nsetReadOnly( ns, 'array', require( './../array' ) );\n\n/**\n* @name base\n* @memberof ns\n* @readonly\n* @type {Namespace}\n* @see {@link module:@stdlib/ndarray/base}\n*/\nsetReadOnly( ns, 'base', require( './../base' ) );\n\n/**\n* @name broadcastArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/broadcast-array}\n*/\nsetReadOnly( ns, 'broadcastArray', require( './../broadcast-array' ) );\n\n/**\n* @name ndarrayCastingModes\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/casting-modes}\n*/\nsetReadOnly( ns, 'ndarrayCastingModes', require( './../casting-modes' ) );\n\n/**\n* @name ndarray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/ctor}\n*/\nsetReadOnly( ns, 'ndarray', require( './../ctor' ) );\n\n/**\n* @name ndarrayDataBuffer\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/data-buffer}\n*/\nsetReadOnly( ns, 'ndarrayDataBuffer', require( './../data-buffer' ) );\n\n/**\n* @name defaults\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/defaults}\n*/\nsetReadOnly( ns, 'defaults', require( './../defaults' ) );\n\n/**\n* @name dispatch\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/dispatch}\n*/\nsetReadOnly( ns, 'dispatch', require( './../dispatch' ) );\n\n/**\n* @name ndarrayDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/dtype}\n*/\nsetReadOnly( ns, 'ndarrayDataType', require( './../dtype' ) );\n\n/**\n* @name ndarrayDataTypes\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/dtypes}\n*/\nsetReadOnly( ns, 'ndarrayDataTypes', require( './../dtypes' ) );\n\n/**\n* @name ndempty\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/empty}\n*/\nsetReadOnly( ns, 'ndempty', require( './../empty' ) );\n\n/**\n* @name ndemptyLike\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/empty-like}\n*/\nsetReadOnly( ns, 'ndemptyLike', require( './../empty-like' ) );\n\n/**\n* @name FancyArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/fancy}\n*/\nsetReadOnly( ns, 'FancyArray', require( './../fancy' ) );\n\n/**\n* @name scalar2ndarray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/from-scalar}\n*/\nsetReadOnly( ns, 'scalar2ndarray', require( './../from-scalar' ) );\n\n/**\n* @name ind2sub\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/ind2sub}\n*/\nsetReadOnly( ns, 'ind2sub', require( './../ind2sub' ) );\n\n/**\n* @name ndarrayIndexModes\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/index-modes}\n*/\nsetReadOnly( ns, 'ndarrayIndexModes', require( './../index-modes' ) );\n\n/**\n* @name iter\n* @memberof ns\n* @readonly\n* @type {Namespace}\n* @see {@link module:@stdlib/ndarray/iter}\n*/\nsetReadOnly( ns, 'iter', require( './../iter' ) );\n\n/**\n* @name maybeBroadcastArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/maybe-broadcast-array}\n*/\nsetReadOnly( ns, 'maybeBroadcastArray', require( './../maybe-broadcast-array' ) );\n\n/**\n* @name ndarrayMinDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/min-dtype}\n*/\nsetReadOnly( ns, 'ndarrayMinDataType', require( './../min-dtype' ) );\n\n/**\n* @name ndims\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/ndims}\n*/\nsetReadOnly( ns, 'ndims', require( './../ndims' ) );\n\n/**\n* @name ndarrayNextDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/next-dtype}\n*/\nsetReadOnly( ns, 'ndarrayNextDataType', require( './../next-dtype' ) );\n\n/**\n* @name numel\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/numel}\n*/\nsetReadOnly( ns, 'numel', require( './../numel' ) );\n\n/**\n* @name ndarrayOffset\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/offset}\n*/\nsetReadOnly( ns, 'ndarrayOffset', require( './../offset' ) );\n\n/**\n* @name ndarrayOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/order}\n*/\nsetReadOnly( ns, 'ndarrayOrder', require( './../order' ) );\n\n/**\n* @name ndarrayOrders\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/orders}\n*/\nsetReadOnly( ns, 'ndarrayOrders', require( './../orders' ) );\n\n/**\n* @name ndarrayOutputDataTypePolicies\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/output-dtype-policies}\n*/\nsetReadOnly( ns, 'ndarrayOutputDataTypePolicies', require( './../output-dtype-policies' ) );\n\n/**\n* @name ndarrayPromotionRules\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/promotion-rules}\n*/\nsetReadOnly( ns, 'ndarrayPromotionRules', require( './../promotion-rules' ) );\n\n/**\n* @name ndarraySafeCasts\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/safe-casts}\n*/\nsetReadOnly( ns, 'ndarraySafeCasts', require( './../safe-casts' ) );\n\n/**\n* @name ndarraySameKindCasts\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/same-kind-casts}\n*/\nsetReadOnly( ns, 'ndarraySameKindCasts', require( './../same-kind-casts' ) );\n\n/**\n* @name ndarrayShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/shape}\n*/\nsetReadOnly( ns, 'ndarrayShape', require( './../shape' ) );\n\n/**\n* @name ndslice\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/slice}\n*/\nsetReadOnly( ns, 'ndslice', require( './../slice' ) );\n\n/**\n* @name ndsliceAssign\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/slice-assign}\n*/\nsetReadOnly( ns, 'ndsliceAssign', require( './../slice-assign' ) );\n\n/**\n* @name ndarrayStrides\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/strides}\n*/\nsetReadOnly( ns, 'ndarrayStrides', require( './../strides' ) );\n\n/**\n* @name sub2ind\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/sub2ind}\n*/\nsetReadOnly( ns, 'sub2ind', require( './../sub2ind' ) );\n\n/**\n* @name ndarray2array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/to-array}\n*/\nsetReadOnly( ns, 'ndarray2array', require( './../to-array' ) );\n\n/**\n* @name ndzeros\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/zeros}\n*/\nsetReadOnly( ns, 'ndzeros', require( './../zeros' ) );\n\n/**\n* @name ndzerosLike\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/zeros-like}\n*/\nsetReadOnly( ns, 'ndzerosLike', require( './../zeros-like' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], - "mappings": "uGAAA,IAAAA,GAAAC,EAAA,SAAAC,GAAAC,GAAA,cA6BA,SAASC,GAAUC,EAAQ,CAC1B,IAAIC,EACAC,EACAC,EACAC,EAIJ,IAFAH,EAAQ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AMoD,EAAG,EAAGsB,GAAG,CAAEtB,GAAIC,EAAG,EAAG,CAAE3D,EAAGC,CAAE,CAAE,EAC5D8E,KAAM,QACVtE,EAAKF,EAAMoD,GAAIzD,EAAK6E,EAAE,CAAE,EAEzBrB,IAAMhD,EACNiD,IAAMxC,EACN6D,IAAK,EAENtB,IAAM/C,EACNgD,IAAMvC,CACP,CACAsC,IAAM9C,EACN+C,IAAMtC,CACP,CACAqC,IAAM7C,EACN8C,IAAMrC,CACP,CACAoC,IAAM5C,EACN6C,IAAMpC,CACP,CACAmC,IAAM3C,EACN4C,IAAMnC,CACP,CACAkC,IAAM1C,EACN2C,IAAMlC,CACP,CACAiC,IAAMzC,EACN0C,IAAMjC,CACP,CACAgC,IAAMxC,EACNyC,IAAMhC,CACP,CAUV,CAKA/B,GAAO,QAAUG,KCzYjB,IAAAkF,GAAAC,EAAA,SAAAC,GAAAC,GAAA,cAwBA,IAAIC,GAAY,KACZC,GAAY,KA+FhB,SAASC,GAAiBC,EAAGC,EAAGC,EAAKC,EAAMC,EAAU,CACpD,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GA+BJ,IA1BAF,GAAIxF,GAAWG,EAAE,MAAOA,EAAE,QAASC,EAAE,OAAQ,E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AS5DD,GAAaC,GAAI,mBAAoB,IAAyB,EAS9DD,GAAaC,GAAI,UAAW,IAAwB,EASpDD,GAAaC,GAAI,cAAe,IAA6B,EAS7DD,GAAaC,GAAI,aAAc,IAAwB,EASvDD,GAAaC,GAAI,iBAAkB,IAA8B,EASjED,GAAaC,GAAI,UAAW,IAA0B,EAStDD,GAAaC,GAAI,oBAAqB,IAA8B,EASpED,GAAaC,GAAI,OAAQ,IAAuB,EAShDD,GAAaC,GAAI,sBAAuB,IAAwC,EAShFD,GAAaC,GAAI,qBAAsB,IAA4B,EASnED,GAAaC,GAAI,QAAS,IAAwB,EASlDD,GAAaC,GAAI,sBAAuB,IAA6B,EASrED,GAAaC,GAAI,QAAS,IAAwB,EASlDD,GAAaC,GAAI,gBAAiB,IAAyB,EAS3DD,GAAaC,GAAI,eAAgB,IAAwB,EASzDD,GAAaC,GAAI,gBAAiB,IAAyB,EAS3DD,GAAaC,GAAI,gCAAiC,IAAwC,EAS1FD,GAAaC,GAAI,wBAAyB,IAAkC,EAS5ED,GAAaC,GAAI,mBAAoB,IAA6B,EASlED,GAAaC,GAAI,uBAAwB,IAAkC,EAS3ED,GAAaC,GAAI,eAAgB,IAAwB,EASzDD,GAAaC,GAAI,UAAW,IAAwB,EASpDD,GAAaC,GAAI,gBAAiB,IAA+B,EASjED,GAAaC,GAAI,iBAAkB,IAA0B,EAS7DD,GAAaC,GAAI,UAAW,IAA0B,EAStDD,GAAaC,GAAI,gBAAiB,IAA2B,EAS7DD,GAAaC,GAAI,UAAW,IAAwB,EASpDD,GAAaC,GAAI,cAAe,IAA6B,EAK7D,OAAO,QAAUA", - "names": ["require_main", "__commonJSMin", "exports", "module", "rowmajor", "shape", "ndims", "out", "s", "i", "columnmajor", "shape2strides", "order", "require_assign", "__commonJSMin", "exports", "module", "rowmajor", "shape", "out", "ndims", "s", "i", "columnmajor", "shape2strides", "order", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "assign", "require_main", "__commonJSMin", "exports", "module", "strides2offset", "shape", "strides", "offset", "ndims", "i", "require_lib", "__commonJSMin", "exports", "module", "strides2offset", "require_main", "__commonJSMin", "exports", "module", "abs", "strides2order", "strides", "column", "ndims", "row", "s1", "s2", "i", "require_lib", "__commonJSMin", "exports", "module", "strides2order", "require_main", "__commonJSMin", "exports", "module", "numel", "shape", "ndims", "n", "require_lib", "__commonJSMin", "exports", "module", "main", "require_orders", "__commonJSMin", "exports", "module", "require_main", "__commonJSMin", "exports", "module", "ORDERS", "orders", "require_enum", "__commonJSMin", "exports", "module", "enumerated", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "enumeration", "require_main", "__commonJSMin", "exports", "module", "orders", "ORDERS", "len", "isOrder", "v", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_dtypes", "__commonJSMin", "exports", "module", "require_main", "__commonJSMin", "exports", "module", "DTYPES", "dtypes", "out", "require_enum", "__commonJSMin", "exports", "module", "enumeration", "require_assign", "__commonJSMin", "exports", "module", "setReadOnly", "objectKeys", "assign", "target", "source", "keys", "k", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "enumeration", "assign", "require_main", "__commonJSMin", "exports", "module", "contains", "dtypes", "isDataType", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "minmaxViewBufferIndex", "shape", "strides", "offset", "ndims", "min", "max", "i", "require_assign", "__commonJSMin", "exports", "module", "minmaxViewBufferIndex", "shape", "strides", "offset", "out", "ndims", "min", "max", "s", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "assign", "require_main", "__commonJSMin", "exports", "module", "minmax", "isBufferLengthCompatible", "len", "shape", "strides", "offset", "buf", "require_lib", "__commonJSMin", "exports", "module", "main", "require_bytes_per_element", "__commonJSMin", "exports", "module", "require_main", "__commonJSMin", "exports", "module", "BYTES_PER_ELEMENT", "bytesPerElement", "dtype", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "iterationOrder", "strides", "cnt", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_is_column_major_contiguous", "__commonJSMin", "exports", "module", "isColumnMajorContiguous", "order", "contiguous", "require_is_row_major_contiguous", "__commonJSMin", "exports", "module", "isRowMajorContiguous", "order", "contiguous", "require_is_contiguous", "__commonJSMin", "exports", "module", "minmaxViewBufferIndex", "isContiguous", "len", "shape", "strides", "offset", "iterationOrder", "buf", "require_copy_flags", "__commonJSMin", "exports", "module", "copyFlags", "flags", "require_iget", "__commonJSMin", "exports", "module", "iget", "idx", "strides", "shape", "ndims", "ind", "s", "i", "require_iset", "__commonJSMin", "exports", "module", "iset", "idx", "v", "strides", "shape", "ndims", "ind", "i", "require_set", "__commonJSMin", "exports", "module", "set", "idx", "i", "require_get", "__commonJSMin", "exports", "module", "get", "idx", "i", "require_tojson", "__commonJSMin", "exports", "module", "real", "imag", "toJSON", "out", "len", "v", "require_tostring", "__commonJSMin", "exports", "module", "replace", "real", "imag", "CTORS", "toString", "buffer", "ndims", "ctor", "str", "dt", "v", "i", "require_modes", "__commonJSMin", "exports", "module", "require_main", "__commonJSMin", "exports", "module", "MODES", "modes", "require_enum", "__commonJSMin", "exports", "module", "enumerated", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "modes", "enumeration", "require_meta2dataview", "__commonJSMin", "exports", "module", "IS_LITTLE_ENDIAN", "ArrayBuffer", "DataView", "BigInt", "dtypes", "orders", "modes", "DTYPES", "ORDERS", "MODES", "meta2dataview", "nbytes", "flgs", "len", "dt", "sh", "st", "sm", "v", "m", "o", "s", "N", "M", "i", "require_meta2dataview_polyfill", "__commonJSMin", "exports", "module", "IS_LITTLE_ENDIAN", "ArrayBuffer", "DataView", "Uint8Array", "dtypes", "orders", "modes", "float64ToInt64Bytes", "DTYPES", "ORDERS", "MODES", "meta2dataview", "nbytes", "bytes", "flgs", "len", "dt", "sh", "st", "sm", "v", "m", "o", "s", "N", "M", "i", "require_main", "__commonJSMin", "exports", "module", "hasBigIntSupport", "setReadOnly", "setReadOnlyAccessor", "bytesPerElement", "iterationOrder", "strides2order", "Boolean", "isColumnMajorContiguous", "isRowMajorContiguous", "isContiguous", "copyFlags", "igetValue", "isetValue", "setValue", "getValue", "toJSON", "toString", "meta2dataview", "meta2dataviewPolyfill", "ndarray", "dtype", "buffer", "shape", "strides", "offset", "order", "contiguous", "nbytes", "ord", "len", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "defaults", "require_get", "__commonJSMin", "exports", "module", "defaults", "DEFAULTS", "HASH", "get", "name", "v", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "get", "require_main", "__commonJSMin", "exports", "module", "clampIndex", "idx", "max", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "wrapIndex", "idx", "max", "mp1", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "clampIndex", "wrapIndex", "format", "ind", "idx", "max", "mode", "require_lib", "__commonJSMin", "exports", "module", "main", "require_iget", "__commonJSMin", "exports", "module", "isInteger", "getIndex", "parent", "format", "base", "iget", "idx", "require_iset", "__commonJSMin", "exports", "module", "isInteger", "getIndex", "parent", "format", "base", "iset", "idx", "v", "require_get", "__commonJSMin", "exports", "module", "isInteger", "getIndex", "format", "get", "idx", "ind", "M", "require_set", "__commonJSMin", "exports", "module", "isInteger", "getIndex", "format", "set", "idx", "ind", "M", "require_copy_array", "__commonJSMin", "exports", "module", "copy", "arr", "len", "out", "require_main", "__commonJSMin", "exports", "module", "modes", "MODES", "len", "isIndexMode", "v", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_validate", "__commonJSMin", "exports", "module", "isObject", "hasOwnProp", "isArray", "isIndexMode", "isBoolean", "format", "validate", "opts", "options", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "isCollection", "isNonNegativeIntegerArray", "isNonNegativeInteger", "isIntegerArray", "isFunction", "isOrder", "isDataType", "isBufferLengthCompatible", "numel", "parent", "defaults", "inherit", "format", "iget", "iset", "get", "set", "copy", "validate", "MAX_DIMS", "INDEX_MODE", "READONLY", "ndarray", "dtype", "buffer", "shape", "strides", "offset", "order", "options", "ndims", "opts", "err", "sh", "st", "require_lib", "__commonJSMin", "exports", "module", "main", "require_modes", "__commonJSMin", "exports", "module", "require_main", "__commonJSMin", "exports", "module", "MODES", "modes", "require_enum", "__commonJSMin", "exports", "module", "enumerated", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "modes", "enumeration", "require_main", "__commonJSMin", "exports", "module", "modes", "MODES", "len", "isCastingMode", "v", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "objectInverse", "enumeration", "hash", "enum2str", "dtype", "v", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "enumeration", "ENUM", "str2enum", "dtype", "v", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "enum2str", "str2enum", "resolve", "dtype", "t", "require_lib", "__commonJSMin", "exports", "module", "main", "require_safe_casts", "__commonJSMin", "exports", "module", "require_main", "__commonJSMin", "exports", "module", "objectKeys", "hasOwnProp", "resolve", "SAFE_CASTS", "TABLE", "generateFullTable", "dtypes", "ntypes", "out", "tmp", "dt1", "dt2", "o", "j", "i", "generateTable", "safeCasts", "dtype", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "safeCasts", "TABLE", "isSafeCast", "from", "to", "require_lib", "__commonJSMin", "exports", "module", "main", "require_same_kind_casts", "__commonJSMin", "exports", "module", "require_main", "__commonJSMin", "exports", "module", "objectKeys", "hasOwnProp", "resolve", "SAME_KIND_CASTS", "TABLE", "generateFullTable", "dtypes", "ntypes", "out", "tmp", "dt1", "dt2", "o", "j", "i", "generateTable", "sameKindCasts", "dtype", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "sameKindCasts", "TABLE", "isSameKindCast", "from", "to", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isSafeCast", "isSameKindCast", "isAllowedCast", "from", "to", "casting", "require_lib", "__commonJSMin", "exports", "module", "main", "require_ctors", "__commonJSMin", "exports", "module", "Buffer", "Float64Array", "Float32Array", "Int16Array", "Int32Array", "Int8Array", "Uint16Array", "Uint32Array", "Uint8Array", "Uint8ClampedArray", "Complex64Array", "Complex128Array", "ctors", "require_main", "__commonJSMin", "exports", "module", "table", "ctors", "dtype", "require_lib", "__commonJSMin", "exports", "module", "main", "require_zeros", "__commonJSMin", "exports", "module", "zeros", "v", "i", "require_main", "__commonJSMin", "exports", "module", "bufferCtors", "allocUnsafe", "zeros", "generic", "size", "buf", "i", "binary", "typedarray", "dtype", "ctor", "buffer", "require_lib", "__commonJSMin", "exports", "module", "main", "require_ctor2dtype", "__commonJSMin", "exports", "module", "dtypes", "require_ctors", "__commonJSMin", "exports", "module", "Float64Array", "Float32Array", "Uint32Array", "Int32Array", "Uint16Array", "Int16Array", "Uint8Array", "Uint8ClampedArray", "Int8Array", "Complex64Array", "Complex128Array", "CTORS", "require_dtypes", "__commonJSMin", "exports", "module", "DTYPES", "require_main", "__commonJSMin", "exports", "module", "isBuffer", "isArray", "constructorName", "ctor2dtype", "CTORS", "DTYPES", "NTYPES", "dtype", "value", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isDataType", "format", "dtype", "x", "dt", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isNonNegativeInteger", "isCollection", "format", "shape", "x", "out", "sh", "d", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isInteger", "isCollection", "isOrder", "shape2strides", "format", "strides", "x", "out", "ord", "sh", "st", "d", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isNonNegativeInteger", "isCollection", "strides2offset", "format", "offset", "x", "st", "sh", "n", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isNonNegativeInteger", "isCollection", "format", "ndims", "x", "sh", "n", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isOrder", "strides", "ndims", "strides2order", "format", "ROW_MAJOR", "COLUMN_MAJOR", "order", "x", "st", "o", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isCollection", "format", "data", "x", "out", "require_lib", "__commonJSMin", "exports", "module", "main", "require_is_array_like_object", "__commonJSMin", "exports", "module", "PINF", "isInteger", "isArrayLikeObject", "value", "require_defaults", "__commonJSMin", "exports", "module", "settings", "defaults", "require_cast_buffer", "__commonJSMin", "exports", "module", "bufferCtors", "allocUnsafe", "castBuffer", "buffer", "len", "dtype", "ctor", "out", "i", "require_copy_view", "__commonJSMin", "exports", "module", "bufferCtors", "allocUnsafe", "generic", "arr", "len", "out", "binary", "typed", "dtype", "ctor", "i", "copyView", "require_expand_shape", "__commonJSMin", "exports", "module", "expandShape", "ndims", "shape", "ndmin", "out", "i", "require_expand_strides", "__commonJSMin", "exports", "module", "abs", "expandStrides", "ndims", "shape", "strides", "order", "out", "N", "i", "j", "require_main", "__commonJSMin", "exports", "module", "hasOwnProp", "isObject", "isBoolean", "isArray", "isNonNegativeInteger", "isndarrayLike", "shape2strides", "strides2offset", "strides2order", "numel", "ndarray", "isDataType", "isOrder", "isCastingMode", "isAllowedCast", "createBuffer", "getBufferDType", "getDType", "getShape", "getStrides", "getOffset", "getOrder", "getData", "arrayShape", "flatten", "format", "isArrayLikeObject", "getDefaults", "castBuffer", "copyView", "expandShape", "expandStrides", "defaults", "array", "options", "strides", "buffer", "offset", "order", "dtype", "btype", "shape", "ndims", "nopts", "opts", "osh", "len", "ord", "FLG", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "numel", "isBufferLengthCompatibleShape", "len", "shape", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "abs", "isColumnMajor", "strides", "ndims", "s1", "s2", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "numel", "minmax", "isSingleSegmentCompatible", "shape", "strides", "offset", "len", "buf", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isSingleSegmentCompatible", "iterationOrder", "isColumnMajor", "isColumnMajorContiguous", "shape", "strides", "offset", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "contains", "dtypes", "isComplexFloatingPointDataType", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isSingleSegmentCompatible", "iterationOrder", "isContiguous", "shape", "strides", "offset", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "contains", "dtypes", "isFloatingPointDataType", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "contains", "dtypes", "isIntegerDataType", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "contains", "dtypes", "isNumericDataType", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isReadOnly", "arr", "flags", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "contains", "dtypes", "isRealDataType", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "contains", "dtypes", "isRealFloatingPointDataType", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "abs", "isRowMajor", "strides", "ndims", "s1", "s2", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isSingleSegmentCompatible", "iterationOrder", "isRowMajor", "isRowMajorContiguous", "shape", "strides", "offset", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "contains", "dtypes", "isSignedIntegerDataType", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "contains", "dtypes", "isUnsignedIntegerDataType", "require_lib", "__commonJSMin", "exports", "module", "main", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "ns", "require_sort2ins", "__commonJSMin", "exports", "module", "sort2ins", "x", "y", "avx", "aux", "ix", "iy", "jx", "jy", "vx", "vy", "ux", "i", "require_main", "__commonJSMin", "exports", "module", "zeroTo", "copy", "take", "filled", "strides2order", "sort2ins", "N", "loopOrder", "sh", "sx", "sy", "sz", "idx", "tmp", "max", "len", "arr", "ox", "oy", "oz", "i", "j", "require_lib", "__commonJSMin", "exports", "module", "main", "require_defaults", "__commonJSMin", "exports", "module", "defaults", "require_main", "__commonJSMin", "exports", "module", "bytesPerElement", "defaults", "binaryBlockSize", "dtypeX", "dtypeY", "dtypeZ", "nbx", "nby", "nbz", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "format", "trunc", "abs", "bind2vind", "shape", "strides", "offset", "order", "idx", "mode", "ndims", "len", "ind", "k", "s", "i", "require_lib", "__commonJSMin", "exports", "module", "bind2vind", "require_main", "__commonJSMin", "exports", "module", "copyIndexed", "shape", "x", "copy", "sh", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "shape2strides", "copyIndexed", "ROW_MAJOR", "strides", "x", "copy", "ord", "sh", "st", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "strides2offset", "offset", "x", "st", "sh", "o", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "strides2order", "ROW_MAJOR", "COLUMN_MAJOR", "order", "x", "st", "o", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "dtype", "x", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "data", "x", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "copy", "ndarray", "getShape", "getStrides", "getOffset", "getOrder", "getDType", "getData", "format", "broadcastArray", "arr", "shape", "strides", "dim", "sh", "st", "N", "M", "d", "i", "j", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isAccessorArray", "accessorSetter", "setter", "zeros", "buffer", "ndarray", "format", "broadcastScalar", "value", "dtype", "shape", "order", "buf", "set", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "broadcastShapes", "shapes", "ndims", "out", "dim", "sh", "n1", "n2", "d", "M", "N", "i", "j", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "str2enum", "dtype", "dtypeEnum", "arr", "dt", "require_lib", "__commonJSMin", "exports", "module", "main", "require_table", "__commonJSMin", "exports", "module", "table", "require_main", "__commonJSMin", "exports", "module", "resolve", "table", "TABLE", "dtypeChar", "dtype", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "objectInverse", "dtypeChar", "TABLE", "char2dtype", "ch", "require_lib", "__commonJSMin", "exports", "module", "char2dtype", "require_table", "__commonJSMin", "exports", "module", "table", "require_main", "__commonJSMin", "exports", "module", "resolve", "table", "TABLE", "dtypeDesc", "dtype", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "enum2str", "str2enum", "resolve", "dtype", "t", "require_lib", "__commonJSMin", "exports", "module", "main", "require_table", "__commonJSMin", "exports", "module", "require_main", "__commonJSMin", "exports", "module", "resolve", "TABLE", "dtype2c", "dtype", "require_lib", "__commonJSMin", "exports", "module", "dtype2c", "require_main", "__commonJSMin", "exports", "module", "isArrayLikeObject", "isNonNegativeInteger", "resolve", "format", "dtypes2signatures", "dtypes", "nin", "nout", "len", "out", "tmp", "dt", "N", "M", "i", "m", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "shape2strides", "strides2offset", "ndarray", "numel", "emptyArray", "allocUnsafe", "empty", "dtype", "shape", "order", "ndims", "buf", "len", "st", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "shape2strides", "strides2offset", "numel", "getDType", "getShape", "getOrder", "emptyArray", "allocUnsafe", "emptyLike", "x", "ndims", "len", "buf", "ord", "sh", "st", "dt", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isReadOnly", "getDType", "getShape", "getStrides", "getOffset", "getOrder", "getData", "format", "expandDimensions", "x", "axis", "strides", "shape", "ord", "sh", "st", "N", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isAccessorArray", "accessorSetter", "setter", "buffer", "ndarray", "format", "scalar2ndarray", "value", "dtype", "order", "buf", "set", "require_lib", "__commonJSMin", "exports", "module", "main", "require_assign", "__commonJSMin", "exports", "module", "format", "trunc", "ind2sub", "shape", "strides", "offset", "order", "idx", "mode", "out", "ndims", "len", "k", "s", "i", "require_main", "__commonJSMin", "exports", "module", "getSubscripts", "ind2sub", "shape", "strides", "offset", "order", "idx", "mode", "out", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "assign", "require_main", "__commonJSMin", "exports", "module", "maxViewBufferIndex", "shape", "strides", "offset", "ndims", "idx", "i", "require_lib", "__commonJSMin", "exports", "module", "maxViewBufferIndex", "require_main", "__commonJSMin", "exports", "module", "broadcast", "getShape", "maybeBroadcastArray", "arr", "shape", "sh", "N", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "setReadOnlyAccessor", "dtypes2signatures", "setProps", "meta", "dtypes", "obj", "types", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "minViewBufferIndex", "shape", "strides", "offset", "ndims", "idx", "i", "require_lib", "__commonJSMin", "exports", "module", "minViewBufferIndex", "require_main", "__commonJSMin", "exports", "module", "isAccessorArray", "accessorGetter", "accessorSetter", "getter", "setter", "numel", "getDType", "getShape", "getStrides", "getOffset", "getOrder", "getData", "ndarraylike2object", "x", "xbuf", "bool", "sh", "dt", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "ndims", "x", "n", "require_lib", "__commonJSMin", "exports", "module", "main", "require_assign", "__commonJSMin", "exports", "module", "ROW_MAJOR", "rowmajor", "ndims", "shape", "idx", "dim", "out", "i", "j", "columnmajor", "nextCartesianIndex", "order", "require_main", "__commonJSMin", "exports", "module", "zeros", "assign", "nextCartesianIndex", "shape", "order", "idx", "dim", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "assign", "require_main", "__commonJSMin", "exports", "module", "nonsingletonDimensions", "shape", "cnt", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_sort2ins", "__commonJSMin", "exports", "module", "sort2ins", "x", "y", "avx", "aux", "ix", "iy", "jx", "jy", "vx", "vy", "ux", "i", "require_main", "__commonJSMin", "exports", "module", "zeroTo", "copy", "take", "sort2ins", "loopOrder", "sh", "sx", "idx", "require_lib", "__commonJSMin", "exports", "module", "main", "require_defaults", "__commonJSMin", "exports", "module", "defaults", "require_main", "__commonJSMin", "exports", "module", "bytesPerElement", "defaults", "nullaryBlockSize", "dtypeX", "nbx", "require_lib", "__commonJSMin", "exports", "module", "main", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary2d", "x", "fcn", "bsize", "xbuf", "set", "dx0", "dx1", "ox1", "sh", "s0", "s1", "sx", "ox", "ix", "i0", "i1", "j0", "j1", "o", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary3d", "x", "fcn", "bsize", "xbuf", "set", "dx0", "dx1", "dx2", "ox1", "ox2", "sh", "s0", "s1", "s2", "sx", "ox", "ix", "i0", "i1", "i2", "j0", "j1", "j2", "o", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary4d", "x", "fcn", "bsize", "xbuf", "set", "dx0", "dx1", "dx2", "dx3", "ox1", "ox2", "ox3", "sh", "s0", "s1", "s2", "s3", "sx", "ox", "ix", "i0", "i1", "i2", "i3", "j0", "j1", "j2", "j3", "o", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary5d", "x", "fcn", "bsize", "xbuf", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "ox1", "ox2", "ox3", "ox4", "sh", "s0", "s1", "s2", "s3", "s4", "sx", "ox", "ix", "i0", "i1", "i2", "i3", "i4", "j0", "j1", "j2", "j3", "j4", "o", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary6d", "x", "fcn", "bsize", "xbuf", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "ox1", "ox2", "ox3", "ox4", "ox5", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "sx", "ox", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "j0", "j1", "j2", "j3", "j4", "j5", "o", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary7d", "x", "fcn", "bsize", "xbuf", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "sx", "ox", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "o", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary8d", "x", "fcn", "bsize", "xbuf", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "sx", "ox", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "o", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary9d", "x", "fcn", "bsize", "xbuf", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "ox8", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "sx", "ox", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "j8", "o", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary10d", "x", "fcn", "bsize", "xbuf", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dx9", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "ox8", "ox9", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "sx", "ox", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "i9", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "j8", "j9", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary2d", "x", "fcn", "bsize", "xbuf", "dx0", "dx1", "ox1", "sh", "s0", "s1", "sx", "ox", "ix", "i0", "i1", "j0", "j1", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary3d", "x", "fcn", "bsize", "xbuf", "dx0", "dx1", "dx2", "ox1", "ox2", "sh", "s0", "s1", "s2", "sx", "ox", "ix", "i0", "i1", "i2", "j0", "j1", "j2", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary4d", "x", "fcn", "bsize", "xbuf", "dx0", "dx1", "dx2", "dx3", "ox1", "ox2", "ox3", "sh", "s0", "s1", "s2", "s3", "sx", "ox", "ix", "i0", "i1", "i2", "i3", "j0", "j1", "j2", "j3", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary5d", "x", "fcn", "bsize", "xbuf", "dx0", "dx1", "dx2", "dx3", "dx4", "ox1", "ox2", "ox3", "ox4", "sh", "s0", "s1", "s2", "s3", "s4", "sx", "ox", "ix", "i0", "i1", "i2", "i3", "i4", "j0", "j1", "j2", "j3", "j4", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary6d", "x", "fcn", "bsize", "xbuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "ox1", "ox2", "ox3", "ox4", "ox5", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "sx", "ox", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "j0", "j1", "j2", "j3", "j4", "j5", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary7d", "x", "fcn", "bsize", "xbuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "sx", "ox", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary8d", "x", "fcn", "bsize", "xbuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "sx", "ox", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary9d", "x", "fcn", "bsize", "xbuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "ox8", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "sx", "ox", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "j8", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary10d", "x", "fcn", "bsize", "xbuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dx9", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "ox8", "ox9", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "sx", "ox", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "i9", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "j8", "j9", "o", "require_d_accessors", "__commonJSMin", "exports", "module", "nullary0d", "x", "fcn", "require_d_accessors", "__commonJSMin", "exports", "module", "nullary1d", "x", "fcn", "xbuf", "set", "dx0", "S0", "ix", "i0", "require_d_accessors", "__commonJSMin", "exports", "module", "nullary2d", "x", "fcn", "xbuf", "set", "dx0", "dx1", "sh", "S0", "S1", "sx", "ix", "i0", "i1", "require_d_accessors", "__commonJSMin", "exports", "module", "nullary3d", "x", "fcn", "xbuf", "set", "dx0", "dx1", "dx2", "sh", "S0", "S1", "S2", "sx", "ix", "i0", "i1", "i2", "require_d_accessors", "__commonJSMin", "exports", "module", "nullary4d", "x", "fcn", "xbuf", "set", "dx0", "dx1", "dx2", "dx3", "sh", "S0", "S1", "S2", "S3", "sx", "ix", "i0", "i1", "i2", "i3", "require_d_accessors", "__commonJSMin", "exports", "module", "nullary5d", "x", "fcn", "xbuf", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "sh", "S0", "S1", "S2", "S3", "S4", "sx", "ix", "i0", "i1", "i2", "i3", "i4", "require_d_accessors", "__commonJSMin", "exports", "module", "nullary6d", "x", "fcn", "xbuf", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "sx", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "require_d_accessors", "__commonJSMin", "exports", "module", "nullary7d", "x", "fcn", "xbuf", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "sx", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "require_d_accessors", "__commonJSMin", "exports", "module", "nullary8d", "x", "fcn", "xbuf", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "sx", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "require_d_accessors", "__commonJSMin", "exports", "module", "nullary9d", "x", "fcn", "xbuf", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "sx", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "require_d_accessors", "__commonJSMin", "exports", "module", "nullary10d", "x", "fcn", "xbuf", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dx9", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "S9", "sx", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "i9", "require_main", "__commonJSMin", "exports", "module", "format", "vind2bind", "shape", "strides", "offset", "order", "idx", "mode", "ndims", "len", "ind", "s", "i", "require_lib", "__commonJSMin", "exports", "module", "vind2bind", "require_nd_accessors", "__commonJSMin", "exports", "module", "numel", "vind2bind", "MODE", "nullarynd", "x", "fcn", "xbuf", "ordx", "len", "set", "sh", "sx", "ox", "ix", "i", "require_d", "__commonJSMin", "exports", "module", "nullary0d", "x", "fcn", "require_d", "__commonJSMin", "exports", "module", "nullary1d", "x", "fcn", "xbuf", "dx0", "S0", "ix", "i0", "require_d", "__commonJSMin", "exports", "module", "nullary2d", "x", "fcn", "xbuf", "dx0", "dx1", "sh", "S0", "S1", "sx", "ix", "i0", "i1", "require_d", "__commonJSMin", "exports", "module", "nullary3d", "x", "fcn", "xbuf", "dx0", "dx1", "dx2", "sh", "S0", "S1", "S2", "sx", "ix", "i0", "i1", "i2", "require_d", "__commonJSMin", "exports", "module", "nullary4d", "x", "fcn", "xbuf", "dx0", "dx1", "dx2", "dx3", "sh", "S0", "S1", "S2", "S3", "sx", "ix", "i0", "i1", "i2", "i3", "require_d", "__commonJSMin", "exports", "module", "nullary5d", "x", "fcn", "xbuf", "dx0", "dx1", "dx2", "dx3", "dx4", "sh", "S0", "S1", "S2", "S3", "S4", "sx", "ix", "i0", "i1", "i2", "i3", "i4", "require_d", "__commonJSMin", "exports", "module", "nullary6d", "x", "fcn", "xbuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "sx", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "require_d", "__commonJSMin", "exports", "module", "nullary7d", "x", "fcn", "xbuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "sx", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "require_d", "__commonJSMin", "exports", "module", "nullary8d", "x", "fcn", "xbuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "sx", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "require_d", "__commonJSMin", "exports", "module", "nullary9d", "x", "fcn", "xbuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "sx", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "require_d", "__commonJSMin", "exports", "module", "nullary10d", "x", "fcn", "xbuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dx9", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "S9", "sx", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "i9", "require_nd", "__commonJSMin", "exports", "module", "numel", "vind2bind", "MODE", "nullarynd", "x", "fcn", "xbuf", "ordx", "len", "sh", "sx", "ox", "ix", "i", "require_main", "__commonJSMin", "exports", "module", "iterationOrder", "minmaxViewBufferIndex", "ndarray2object", "blockedaccessornullary2d", "blockedaccessornullary3d", "blockedaccessornullary4d", "blockedaccessornullary5d", "blockedaccessornullary6d", "blockedaccessornullary7d", "blockedaccessornullary8d", "blockedaccessornullary9d", "blockedaccessornullary10d", "blockednullary2d", "blockednullary3d", "blockednullary4d", "blockednullary5d", "blockednullary6d", "blockednullary7d", "blockednullary8d", "blockednullary9d", "blockednullary10d", "accessornullary0d", "accessornullary1d", "accessornullary2d", "accessornullary3d", "accessornullary4d", "accessornullary5d", "accessornullary6d", "accessornullary7d", "accessornullary8d", "accessornullary9d", "accessornullary10d", "accessornullarynd", "nullary0d", "nullary1d", "nullary2d", "nullary3d", "nullary4d", "nullary5d", "nullary6d", "nullary7d", "nullary8d", "nullary9d", "nullary10d", "nullarynd", "NULLARY", "ACCESSOR_NULLARY", "BLOCKED_NULLARY", "BLOCKED_ACCESSOR_NULLARY", "MAX_DIMS", "nullary", "arrays", "fcn", "ndims", "xmmv", "shx", "iox", "len", "sx", "ox", "ns", "x", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_policies", "__commonJSMin", "exports", "module", "require_main", "__commonJSMin", "exports", "module", "POLICIES", "policies", "require_enum", "__commonJSMin", "exports", "module", "enumeration", "require_assign", "__commonJSMin", "exports", "module", "setReadOnly", "objectKeys", "assign", "target", "source", "keys", "k", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "enumeration", "assign", "require_main", "__commonJSMin", "exports", "module", "objectInverse", "enumeration", "hash", "enum2str", "policy", "v", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "enumeration", "ENUM", "str2enum", "policy", "v", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "enum2str", "str2enum", "resolve", "policy", "t", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "enum2str", "str2enum", "resolve", "policy", "t", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isReadOnly", "getDType", "getShape", "getStrides", "getOffset", "getOrder", "getData", "prependSingletonDimensions", "x", "n", "strides", "shape", "sh", "st", "N", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isReadOnly", "getDType", "getShape", "getStrides", "getOffset", "getOrder", "getData", "removeSingletonDimensions", "x", "strides", "shape", "sh", "st", "N", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "IS_LITTLE_ENDIAN", "ArrayBuffer", "DataView", "BigInt", "bytesPerElement", "dtypes", "orders", "modes", "getDType", "getShape", "getStrides", "getOffset", "getOrder", "DTYPES", "ORDERS", "MODES", "serialize", "x", "nbytes", "flgs", "len", "dt", "sh", "st", "sm", "v", "m", "o", "s", "N", "M", "i", "require_polyfill", "__commonJSMin", "exports", "module", "IS_LITTLE_ENDIAN", "float64ToInt64Bytes", "ArrayBuffer", "Uint8Array", "DataView", "bytesPerElement", "dtypes", "orders", "modes", "getDType", "getShape", "getStrides", "getOffset", "getOrder", "DTYPES", "ORDERS", "MODES", "serialize", "x", "nbytes", "bytes", "flgs", "len", "dt", "sh", "st", "sm", "v", "m", "o", "s", "N", "M", "i", "require_lib", "__commonJSMin", "exports", "module", "hasBigIntSupport", "builtin", "polyfill", "main", "require_main", "__commonJSMin", "exports", "module", "singletonDimensions", "shape", "cnt", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_slice_start", "__commonJSMin", "exports", "module", "sliceStart", "slice", "strides", "offset", "data", "idx", "i", "require_slice_strides", "__commonJSMin", "exports", "module", "slice2strides", "slice", "strides", "rdims", "data", "out", "i", "j", "require_empty", "__commonJSMin", "exports", "module", "buffer", "zeros", "empty", "ctor", "dtype", "shape", "order", "readonly", "strides", "ndims", "require_main", "__commonJSMin", "exports", "module", "normalizeMultiSlice", "nonreducedDimensions", "sliceShape", "take", "zeros", "numel", "getDType", "getShape", "getStrides", "getOffset", "getOrder", "getData", "format", "sliceStart", "slice2strides", "empty", "slice", "x", "s", "strict", "writable", "strides", "offset", "dtype", "shape", "order", "sdims", "ndims", "ctor", "sh", "ns", "require_lib", "__commonJSMin", "exports", "module", "main", "require_sort2ins", "__commonJSMin", "exports", "module", "sort2ins", "x", "y", "avx", "aux", "ix", "iy", "jx", "jy", "vx", "vy", "ux", "i", "require_main", "__commonJSMin", "exports", "module", "zeroTo", "copy", "take", "sort2ins", "loopOrder", "sh", "sx", "sy", "idx", "require_lib", "__commonJSMin", "exports", "module", "main", "require_defaults", "__commonJSMin", "exports", "module", "defaults", "require_main", "__commonJSMin", "exports", "module", "bytesPerElement", "defaults", "unaryBlockSize", "dtypeX", "dtypeY", "nbx", "nby", "require_lib", "__commonJSMin", "exports", "module", "main", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary2d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dy0", "dy1", "ox1", "oy1", "sh", "s0", "s1", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "j0", "j1", "o", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary3d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dy0", "dy1", "dy2", "ox1", "ox2", "oy1", "oy2", "sh", "s0", "s1", "s2", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "j0", "j1", "j2", "o", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary4d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dy0", "dy1", "dy2", "dy3", "ox1", "ox2", "ox3", "oy1", "oy2", "oy3", "sh", "s0", "s1", "s2", "s3", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "j0", "j1", "j2", "j3", "o", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary5d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dy0", "dy1", "dy2", "dy3", "dy4", "ox1", "ox2", "ox3", "ox4", "oy1", "oy2", "oy3", "oy4", "sh", "s0", "s1", "s2", "s3", "s4", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "j0", "j1", "j2", "j3", "j4", "o", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary6d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "ox1", "ox2", "ox3", "ox4", "ox5", "oy1", "oy2", "oy3", "oy4", "oy5", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "j0", "j1", "j2", "j3", "j4", "j5", "o", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary7d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "oy1", "oy2", "oy3", "oy4", "oy5", "oy6", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "o", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary8d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "oy1", "oy2", "oy3", "oy4", "oy5", "oy6", "oy7", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "o", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary9d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "dy8", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "ox8", "oy1", "oy2", "oy3", "oy4", "oy5", "oy6", "oy7", "oy8", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "j8", "o", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary10d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dx9", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "dy8", "dy9", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "ox8", "ox9", "oy1", "oy2", "oy3", "oy4", "oy5", "oy6", "oy7", "oy8", "oy9", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "i9", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "j8", "j9", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary2d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dy0", "dy1", "ox1", "oy1", "sh", "s0", "s1", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "j0", "j1", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary3d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dy0", "dy1", "dy2", "ox1", "ox2", "oy1", "oy2", "sh", "s0", "s1", "s2", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "j0", "j1", "j2", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary4d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dy0", "dy1", "dy2", "dy3", "ox1", "ox2", "ox3", "oy1", "oy2", "oy3", "sh", "s0", "s1", "s2", "s3", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "j0", "j1", "j2", "j3", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary5d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dy0", "dy1", "dy2", "dy3", "dy4", "ox1", "ox2", "ox3", "ox4", "oy1", "oy2", "oy3", "oy4", "sh", "s0", "s1", "s2", "s3", "s4", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "j0", "j1", "j2", "j3", "j4", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary6d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "ox1", "ox2", "ox3", "ox4", "ox5", "oy1", "oy2", "oy3", "oy4", "oy5", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "j0", "j1", "j2", "j3", "j4", "j5", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary7d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "oy1", "oy2", "oy3", "oy4", "oy5", "oy6", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary8d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "oy1", "oy2", "oy3", "oy4", "oy5", "oy6", "oy7", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary9d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "dy8", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "ox8", "oy1", "oy2", "oy3", "oy4", "oy5", "oy6", "oy7", "oy8", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "j8", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary10d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dx9", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "dy8", "dy9", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "ox8", "ox9", "oy1", "oy2", "oy3", "oy4", "oy5", "oy6", "oy7", "oy8", "oy9", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "i9", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "j8", "j9", "o", "require_d_accessors", "__commonJSMin", "exports", "module", "unary0d", "x", "y", "fcn", "require_d_accessors", "__commonJSMin", "exports", "module", "unary1d", "x", "y", "fcn", "xbuf", "ybuf", "get", "set", "dx0", "dy0", "S0", "ix", "iy", "i0", "require_d_accessors", "__commonJSMin", "exports", "module", "unary2d", "x", "y", "fcn", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dy0", "dy1", "sh", "S0", "S1", "sx", "sy", "ix", "iy", "i0", "i1", "require_d_accessors", "__commonJSMin", "exports", "module", "unary3d", "x", "y", "fcn", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dy0", "dy1", "dy2", "sh", "S0", "S1", "S2", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "require_d_accessors", "__commonJSMin", "exports", "module", "unary4d", "x", "y", "fcn", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dy0", "dy1", "dy2", "dy3", "sh", "S0", "S1", "S2", "S3", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "require_d_accessors", "__commonJSMin", "exports", "module", "unary5d", "x", "y", "fcn", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dy0", "dy1", "dy2", "dy3", "dy4", "sh", "S0", "S1", "S2", "S3", "S4", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "require_d_accessors", "__commonJSMin", "exports", "module", "unary6d", "x", "y", "fcn", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "require_d_accessors", "__commonJSMin", "exports", "module", "unary7d", "x", "y", "fcn", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "require_d_accessors", "__commonJSMin", "exports", "module", "unary8d", "x", "y", "fcn", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "require_d_accessors", "__commonJSMin", "exports", "module", "unary9d", "x", "y", "fcn", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "dy8", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "require_d_accessors", "__commonJSMin", "exports", "module", "unary10d", "x", "y", "fcn", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dx9", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "dy8", "dy9", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "S9", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "i9", "require_nd_accessors", "__commonJSMin", "exports", "module", "numel", "vind2bind", "MODE", "unarynd", "x", "y", "fcn", "xbuf", "ybuf", "ordx", "ordy", "len", "get", "set", "sh", "sx", "sy", "ox", "oy", "ix", "iy", "i", "require_d", "__commonJSMin", "exports", "module", "unary0d", "x", "y", "fcn", "require_d", "__commonJSMin", "exports", "module", "unary1d", "x", "y", "fcn", "xbuf", "ybuf", "dx0", "dy0", "S0", "ix", "iy", "i0", "require_d", "__commonJSMin", "exports", "module", "unary2d", "x", "y", "fcn", "xbuf", "ybuf", "dx0", "dx1", "dy0", "dy1", "sh", "S0", "S1", "sx", "sy", "ix", "iy", "i0", "i1", "require_d", "__commonJSMin", "exports", "module", "unary3d", "x", "y", "fcn", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dy0", "dy1", "dy2", "sh", "S0", "S1", "S2", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "require_d", "__commonJSMin", "exports", "module", "unary4d", "x", "y", "fcn", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dy0", "dy1", "dy2", "dy3", "sh", "S0", "S1", "S2", "S3", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "require_d", "__commonJSMin", "exports", "module", "unary5d", "x", "y", "fcn", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dy0", "dy1", "dy2", "dy3", "dy4", "sh", "S0", "S1", "S2", "S3", "S4", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "require_d", "__commonJSMin", "exports", "module", "unary6d", "x", "y", "fcn", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "require_d", "__commonJSMin", "exports", "module", "unary7d", "x", "y", "fcn", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "require_d", "__commonJSMin", "exports", "module", "unary8d", "x", "y", "fcn", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "require_d", "__commonJSMin", "exports", "module", "unary9d", "x", "y", "fcn", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "dy8", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "require_d", "__commonJSMin", "exports", "module", "unary10d", "x", "y", "fcn", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dx9", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "dy8", "dy9", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "S9", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "i9", "require_nd", "__commonJSMin", "exports", "module", "numel", "vind2bind", "MODE", "unarynd", "x", "y", "fcn", "xbuf", "ybuf", "ordx", "ordy", "len", "sh", "sx", "sy", "ox", "oy", "ix", "iy", "i", "require_main", "__commonJSMin", "exports", "module", "iterationOrder", "minmaxViewBufferIndex", "ndarray2object", "blockedaccessorunary2d", "blockedaccessorunary3d", "blockedaccessorunary4d", "blockedaccessorunary5d", "blockedaccessorunary6d", "blockedaccessorunary7d", "blockedaccessorunary8d", "blockedaccessorunary9d", "blockedaccessorunary10d", "blockedunary2d", "blockedunary3d", "blockedunary4d", "blockedunary5d", "blockedunary6d", "blockedunary7d", "blockedunary8d", "blockedunary9d", "blockedunary10d", "accessorunary0d", "accessorunary1d", "accessorunary2d", "accessorunary3d", "accessorunary4d", "accessorunary5d", "accessorunary6d", "accessorunary7d", "accessorunary8d", "accessorunary9d", "accessorunary10d", "accessorunarynd", "unary0d", "unary1d", "unary2d", "unary3d", "unary4d", "unary5d", "unary6d", "unary7d", "unary8d", "unary9d", "unary10d", "unarynd", "UNARY", "ACCESSOR_UNARY", "BLOCKED_UNARY", "BLOCKED_ACCESSOR_UNARY", "MAX_DIMS", "unary", "arrays", "fcn", "ndims", "xmmv", "ymmv", "shx", "shy", "iox", "ioy", "len", "sx", "sy", "ox", "oy", "ns", "x", "y", "d", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isSafeCast", "isSameKindCast", "isFloatingPointDataType", "isComplexDataType", "isRealDataType", "broadcast", "unary", "identity", "castReturn", "complexCtors", "slice", "getDType", "getShape", "format", "sliceAssign", "x", "y", "s", "strict", "view", "fcn", "xdt", "ydt", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "MultiSlice", "ndims", "slice", "filled", "format", "sliceDimension", "x", "dim", "s", "strict", "writable", "args", "N", "d", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "format", "sub2ind", "strides", "offset", "nmodes", "shape", "ndims", "modes", "mode", "idx", "m", "s", "j", "i", "require_lib", "__commonJSMin", "exports", "module", "sub2ind", "require_recurse", "__commonJSMin", "exports", "module", "recurse", "obj", "shape", "strides", "offset", "order", "dim", "stride", "item", "out", "n", "i", "require_main", "__commonJSMin", "exports", "module", "arraylike2object", "recurse", "ndarray2array", "buffer", "shape", "strides", "offset", "order", "i", "require_lib", "__commonJSMin", "exports", "module", "ndarray2array", "require_main", "__commonJSMin", "exports", "module", "strides2offset", "getDType", "getShape", "getStrides", "getOrder", "getData", "transpose", "x", "tmp", "sh", "st", "N", "require_lib", "__commonJSMin", "exports", "module", "main", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary2d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dy0", "dy1", "ox1", "oy1", "sh", "s0", "s1", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "j0", "j1", "o", "v", "i", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary3d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dy0", "dy1", "dy2", "ox1", "ox2", "oy1", "oy2", "sh", "s0", "s1", "s2", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "j0", "j1", "j2", "o", "v", "i", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary4d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dy0", "dy1", "dy2", "dy3", "ox1", "ox2", "ox3", "oy1", "oy2", "oy3", "sh", "s0", "s1", "s2", "s3", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "j0", "j1", "j2", "j3", "o", "v", "i", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary5d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dy0", "dy1", "dy2", "dy3", "dy4", "ox1", "ox2", "ox3", "ox4", "oy1", "oy2", "oy3", "oy4", "sh", "s0", "s1", "s2", "s3", "s4", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "j0", "j1", "j2", "j3", "j4", "o", "v", "i", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary6d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "ox1", "ox2", "ox3", "ox4", "ox5", "oy1", "oy2", "oy3", "oy4", "oy5", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "j0", "j1", "j2", "j3", "j4", "j5", "o", "v", "i", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary7d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "oy1", "oy2", "oy3", "oy4", "oy5", "oy6", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "o", "v", "i", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary8d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "oy1", "oy2", "oy3", "oy4", "oy5", "oy6", "oy7", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "o", "v", "i", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary9d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "dy8", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "ox8", "oy1", "oy2", "oy3", "oy4", "oy5", "oy6", "oy7", "oy8", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "j8", "o", "v", "i", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary10d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dx9", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "dy8", "dy9", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "ox8", "ox9", "oy1", "oy2", "oy3", "oy4", "oy5", "oy6", "oy7", "oy8", "oy9", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "i9", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "j8", "j9", "o", "v", "i", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary2d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dy0", "dy1", "ox1", "oy1", "sh", "s0", "s1", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "j0", "j1", "o", "v", "i", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary3d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dy0", "dy1", "dy2", "ox1", "ox2", "oy1", "oy2", "sh", "s0", "s1", "s2", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "j0", "j1", "j2", "o", "v", "i", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary4d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dy0", "dy1", "dy2", "dy3", "ox1", "ox2", "ox3", "oy1", "oy2", "oy3", "sh", "s0", "s1", "s2", "s3", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "j0", "j1", "j2", "j3", "o", "v", "i", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary5d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dy0", "dy1", "dy2", "dy3", "dy4", "ox1", "ox2", "ox3", "ox4", "oy1", "oy2", "oy3", "oy4", "sh", "s0", "s1", "s2", "s3", "s4", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "j0", "j1", "j2", "j3", "j4", "o", "v", "i", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary6d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "ox1", "ox2", "ox3", "ox4", "ox5", "oy1", "oy2", "oy3", "oy4", "oy5", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "j0", "j1", "j2", "j3", "j4", "j5", "o", "v", "i", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary7d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "oy1", "oy2", "oy3", "oy4", "oy5", "oy6", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "o", "v", "i", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary8d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "oy1", "oy2", "oy3", "oy4", "oy5", "oy6", "oy7", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "o", "v", "i", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary9d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "dy8", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "ox8", "oy1", "oy2", "oy3", "oy4", "oy5", "oy6", "oy7", "oy8", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "j8", "o", "v", "i", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary10d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dx9", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "dy8", "dy9", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "ox8", "ox9", "oy1", "oy2", "oy3", "oy4", "oy5", "oy6", "oy7", "oy8", "oy9", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "i9", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "j8", "j9", "o", "v", "i", "require_d_accessors", "__commonJSMin", "exports", "module", "unary0d", "x", "y", "fcn", "clbk", "thisArg", "ox", "oy", "v", "require_d_accessors", "__commonJSMin", "exports", "module", "unary1d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "get", "set", "dx0", "dy0", "S0", "ix", "iy", "i0", "v", "i", "require_d_accessors", "__commonJSMin", "exports", "module", "unary2d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dy0", "dy1", "sh", "S0", "S1", "sx", "sy", "ix", "iy", "i0", "i1", "v", "i", "require_d_accessors", "__commonJSMin", "exports", "module", "unary3d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dy0", "dy1", "dy2", "sh", "S0", "S1", "S2", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "v", "i", "require_d_accessors", "__commonJSMin", "exports", "module", "unary4d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dy0", "dy1", "dy2", "dy3", "sh", "S0", "S1", "S2", "S3", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "v", "i", "require_d_accessors", "__commonJSMin", "exports", "module", "unary5d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dy0", "dy1", "dy2", "dy3", "dy4", "sh", "S0", "S1", "S2", "S3", "S4", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "v", "i", "require_d_accessors", "__commonJSMin", "exports", "module", "unary6d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "v", "i", "require_d_accessors", "__commonJSMin", "exports", "module", "unary7d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "v", "i", "require_d_accessors", "__commonJSMin", "exports", "module", "unary8d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "v", "i", "require_d_accessors", "__commonJSMin", "exports", "module", "unary9d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "dy8", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "v", "i", "require_d_accessors", "__commonJSMin", "exports", "module", "unary10d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dx9", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "dy8", "dy9", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "S9", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "i9", "v", "i", "require_nd_accessors", "__commonJSMin", "exports", "module", "numel", "vind2bind", "MODE", "unarynd", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "ordx", "ordy", "len", "get", "set", "sh", "sx", "sy", "ox", "oy", "ix", "iy", "v", "i", "require_d", "__commonJSMin", "exports", "module", "unary0d", "x", "y", "fcn", "clbk", "thisArg", "ox", "oy", "v", "require_d", "__commonJSMin", "exports", "module", "unary1d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "dx0", "dy0", "S0", "ix", "iy", "i0", "v", "i", "require_d", "__commonJSMin", "exports", "module", "unary2d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "dx0", "dx1", "dy0", "dy1", "sh", "S0", "S1", "sx", "sy", "ix", "iy", "i0", "i1", "v", "i", "require_d", "__commonJSMin", "exports", "module", "unary3d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dy0", "dy1", "dy2", "sh", "S0", "S1", "S2", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "v", "i", "require_d", "__commonJSMin", "exports", "module", "unary4d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dy0", "dy1", "dy2", "dy3", "sh", "S0", "S1", "S2", "S3", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "v", "i", "require_d", "__commonJSMin", "exports", "module", "unary5d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dy0", "dy1", "dy2", "dy3", "dy4", "sh", "S0", "S1", "S2", "S3", "S4", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "v", "i", "require_d", "__commonJSMin", "exports", "module", "unary6d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "v", "i", "require_d", "__commonJSMin", "exports", "module", "unary7d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "v", "i", "require_d", "__commonJSMin", "exports", "module", "unary8d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "v", "i", "require_d", "__commonJSMin", "exports", "module", "unary9d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "dy8", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "v", "i", "require_d", "__commonJSMin", "exports", "module", "unary10d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dx9", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "dy8", "dy9", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "S9", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "i9", "v", "i", "require_nd", "__commonJSMin", "exports", "module", "numel", "vind2bind", "MODE", "unarynd", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "ordx", "ordy", "len", "sh", "sx", "sy", "ox", "oy", "ix", "iy", "v", "i", "require_main", "__commonJSMin", "exports", "module", "iterationOrder", "minmaxViewBufferIndex", "ndarray2object", "blockedaccessorunary2d", "blockedaccessorunary3d", "blockedaccessorunary4d", "blockedaccessorunary5d", "blockedaccessorunary6d", "blockedaccessorunary7d", "blockedaccessorunary8d", "blockedaccessorunary9d", "blockedaccessorunary10d", "blockedunary2d", "blockedunary3d", "blockedunary4d", "blockedunary5d", "blockedunary6d", "blockedunary7d", "blockedunary8d", "blockedunary9d", "blockedunary10d", "accessorunary0d", "accessorunary1d", "accessorunary2d", "accessorunary3d", "accessorunary4d", "accessorunary5d", "accessorunary6d", "accessorunary7d", "accessorunary8d", "accessorunary9d", "accessorunary10d", "accessorunarynd", "unary0d", "unary1d", "unary2d", "unary3d", "unary4d", "unary5d", "unary6d", "unary7d", "unary8d", "unary9d", "unary10d", "unarynd", "UNARY", "ACCESSOR_UNARY", "BLOCKED_UNARY", "BLOCKED_ACCESSOR_UNARY", "MAX_DIMS", "unaryBy", "arrays", "fcn", "clbk", "thisArg", "ndims", "xmmv", "ymmv", "shx", "shy", "iox", "ioy", "len", "sx", "sy", "ox", "oy", "ns", "x", "y", "d", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isFloatingPointDataType", "isRealFloatingPointDataType", "isComplexFloatingPointDataType", "isIntegerDataType", "isSignedIntegerDataType", "isUnsignedIntegerDataType", "isRealDataType", "isNumericDataType", "isDataType", "defaults", "format", "POLICY_TABLE", "DEFAULT_DTYPE", "resolve", "dtype", "policy", "p", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "shape2strides", "strides2offset", "buffer", "format", "ndarray", "numel", "zeros", "dtype", "shape", "order", "ndims", "buf", "len", "st", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "shape2strides", "strides2offset", "buffer", "numel", "getDType", "getShape", "getOrder", "format", "zerosLike", "x", "ndims", "len", "buf", "ord", "sh", "st", "dt", "require_lib", "__commonJSMin", "exports", "module", "main", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "ns", "require_main", "__commonJSMin", "exports", "module", "isndarrayLike", "isCollection", "isNonNegativeInteger", "copy", "getDType", "getShape", "getStrides", "getOffset", "getOrder", "getData", "format", "broadcastArray", "x", "shape", "strides", "dim", "sh", "st", "N", "M", "d", "i", "j", "require_lib", "__commonJSMin", "exports", "module", "main", "require_index_of_types", "__commonJSMin", "exports", "module", "indexOfTypes", "N", "M", "x", "strideX1", "strideX2", "offsetX", "y", "strideY", "offsetY", "ix", "iy", "i", "j", "require_main", "__commonJSMin", "exports", "module", "isNonNegativeInteger", "isPositiveInteger", "isInteger", "isFunctionArray", "isFunction", "isCollection", "isndarrayLike", "format", "getDType", "resolveEnum", "indexOfTypes", "types2enums", "types", "out", "i", "dispatch", "fcns", "data", "nargs", "nin", "nout", "narrays", "nfcns", "fcn", "dispatcher", "arrays", "dtypes", "argc", "idx", "v", "f", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isPlainObject", "hasOwnProp", "isArrayLike", "shape2strides", "strides2offset", "emptyArray", "allocUnsafe", "numel", "ndarray", "defaults", "format", "DTYPE", "ORDER", "empty", "shape", "options", "dtype", "order", "ndims", "opts", "buf", "len", "st", "sh", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isndarrayLike", "isPlainObject", "isNonNegativeIntegerArray", "hasOwnProp", "shape2strides", "strides2offset", "numel", "getDType", "getShape", "getOrder", "ndarray", "emptyArray", "allocUnsafe", "format", "emptyLike", "x", "options", "dtype", "order", "ndims", "opts", "buf", "len", "st", "sh", "require_lib", "__commonJSMin", "exports", "module", "main", "require_re_integer", "__commonJSMin", "exports", "module", "RE_INTEGER", "require_re_subseq", "__commonJSMin", "exports", "module", "RE_SUBSEQ", "require_prop2slice_0d", "__commonJSMin", "exports", "module", "trim", "replace", "MultiSlice", "str2multislice", "seq2multislice", "str2slice", "format", "RE_INTEGER", "RE_SUBSEQ", "prop2slice", "target", "property", "shape", "prop", "ch", "s", "require_prop2slice_1d", "__commonJSMin", "exports", "module", "trim", "replace", "MultiSlice", "str2multislice", "seq2multislice", "str2slice", "format", "RE_INTEGER", "prop2slice", "target", "property", "strict", "shape", "prop", "ch", "require_prop2slice_nd", "__commonJSMin", "exports", "module", "trim", "str2multislice", "seq2multislice", "sargs2multislice", "format", "RE_SUBSEQ", "prop2slice", "target", "property", "strict", "shape", "prop", "ch", "require_has_property", "__commonJSMin", "exports", "module", "propertiesIn", "contains", "ndarray", "defaults", "hasProperty", "require_get_value", "__commonJSMin", "exports", "module", "isFunction", "getValue", "target", "property", "receiver", "value", "wrapper", "args", "i", "require_error_message", "__commonJSMin", "exports", "module", "replace", "errMessage", "msg", "require_error_constructor", "__commonJSMin", "exports", "module", "isRangeError", "isTypeError", "isSyntaxError", "errConstructor", "err", "require_get_slice", "__commonJSMin", "exports", "module", "slice", "errMessage", "errConstructor", "getSlice", "target", "property", "receiver", "prop2slice", "strict", "E", "err", "require_get", "__commonJSMin", "exports", "module", "hasProperty", "getValue", "getSlice", "factory", "prop2slice", "get", "target", "property", "receiver", "require_set_value", "__commonJSMin", "exports", "module", "setValue", "target", "property", "value", "require_main", "__commonJSMin", "exports", "module", "isInteger", "isNegativeZero", "isComplexLike", "PINF", "NINF", "FLOAT32_SMALLEST_SUBNORMAL", "FLOAT32_MAX_SAFE_INTEGER", "FLOAT32_MIN_SAFE_INTEGER", "INT8_MIN", "INT16_MIN", "INT32_MIN", "UINT8_MAX", "UINT16_MAX", "UINT32_MAX", "minFloatDataType", "value", "minDataType", "require_lib", "__commonJSMin", "exports", "module", "minDataType", "require_main", "__commonJSMin", "exports", "module", "hasOwnProp", "isPlainObject", "isNumber", "isComplexLike", "isAccessorArray", "accessorSetter", "setter", "buffer", "ndarray", "defaults", "format", "ORDER", "scalar2ndarray", "value", "options", "opts", "buf", "flg", "set", "dt", "v", "require_lib", "__commonJSMin", "exports", "module", "main", "require_set_slice", "__commonJSMin", "exports", "module", "sliceAssign", "isndarrayLike", "isNumber", "isInteger", "isComplexLike", "isComplexDataType", "isFloatingDataType", "isUnsignedIntegerDataType", "isSignedIntegerDataType", "isSafeCast", "INT8_MAX", "INT16_MAX", "INT32_MAX", "minDataType", "complexDataType", "scalar2ndarray", "format", "errMessage", "errConstructor", "options", "dtype", "setSlice", "target", "property", "value", "receiver", "prop2slice", "strict", "vdt", "dt", "E", "s", "err", "require_set", "__commonJSMin", "exports", "module", "hasProperty", "setValue", "setSlice", "factory", "prop2slice", "set", "target", "property", "value", "receiver", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "parent", "inherit", "Proxy", "prop2slice0d", "prop2slice1d", "prop2slicend", "get", "set", "get0d", "set0d", "get1d", "set1d", "getnd", "setnd", "FancyArray", "dtype", "buffer", "shape", "strides", "offset", "order", "options", "handlers", "nargs", "ndims", "require_lib", "__commonJSMin", "exports", "module", "main", "require_defaults", "__commonJSMin", "exports", "module", "require_validate", "__commonJSMin", "exports", "module", "isObject", "hasOwnProp", "isOrder", "isIndexMode", "format", "validate", "opts", "options", "require_main", "__commonJSMin", "exports", "module", "isNonNegativeIntegerArray", "isInteger", "shape2strides", "getSubscripts", "format", "defaults", "validate", "ind2sub", "shape", "idx", "options", "opts", "err", "require_assign", "__commonJSMin", "exports", "module", "isNonNegativeIntegerArray", "isInteger", "shape2strides", "getSubscripts", "format", "defaults", "validate", "ind2sub", "shape", "idx", "options", "out", "opts", "dest", "err", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "assign", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "isPlainObject", "isBoolean", "isndarrayLike", "isReadOnly", "hasOwnProp", "iteratorSymbol", "zeros", "getShape", "numel", "slice", "nextCartesianIndex", "MultiSlice", "format", "nditerColumns", "x", "options", "shape", "ndims", "opts", "iter", "FLG", "idx", "dim", "S0", "N", "i", "next", "end", "factory", "s", "j", "value", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "isPlainObject", "isOrder", "isndarrayLike", "hasOwnProp", "iteratorSymbol", "zeros", "getShape", "numel", "nextCartesianIndex", "format", "nditerEntries", "x", "options", "shape", "ndims", "opts", "iter", "FLG", "idx", "dim", "N", "i", "next", "end", "factory", "value", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "isPlainObject", "isOrder", "isCollection", "isNonNegativeInteger", "hasOwnProp", "iteratorSymbol", "zeros", "numel", "nextCartesianIndex", "format", "nditerIndices", "shape", "options", "ndims", "opts", "iter", "FLG", "idx", "dim", "sh", "N", "i", "next", "end", "factory", "value", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "isPlainObject", "isBoolean", "isndarrayLike", "isReadOnly", "hasOwnProp", "iteratorSymbol", "zeros", "getShape", "numel", "slice", "nextCartesianIndex", "MultiSlice", "format", "nditerRows", "x", "options", "shape", "ndims", "opts", "iter", "FLG", "idx", "dim", "S1", "N", "i", "next", "end", "factory", "s", "j", "value", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isndarrayLike", "toArray", "getStrides", "getOffset", "getShape", "getOrder", "getData", "format", "ndarray2array", "x", "require_lib", "__commonJSMin", "exports", "module", "ndarray2array", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "isFunction", "isIteratorLike", "iteratorSymbol", "ndarray2array", "format", "nditer2arrayEach", "iterator", "iter", "FLG", "next", "end", "factory", "v", "value", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "isPlainObject", "isOrder", "isndarrayLike", "hasOwnProp", "iteratorSymbol", "zeros", "getShape", "numel", "nextCartesianIndex", "format", "nditerValues", "x", "options", "shape", "ndims", "opts", "iter", "FLG", "idx", "dim", "N", "i", "next", "end", "factory", "value", "require_lib", "__commonJSMin", "exports", "module", "main", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "ns", "require_main", "__commonJSMin", "exports", "module", "isndarrayLike", "isCollection", "isNonNegativeInteger", "broadcast", "format", "maybeBroadcastArray", "x", "shape", "sh", "N", "d", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_next_dtypes", "__commonJSMin", "exports", "module", "require_main", "__commonJSMin", "exports", "module", "objectKeys", "hasOwnProp", "resolveStr", "NEXT_DTYPES", "generateTable", "dtypes", "ntypes", "out", "nextDataType", "dtype", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isNonNegativeInteger", "isCollection", "format", "numel", "x", "ndims", "sh", "n", "d", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_promotion_rules", "__commonJSMin", "exports", "module", "require_main", "__commonJSMin", "exports", "module", "objectKeys", "hasOwnProp", "resolve", "PROMOTION_RULES", "generateFullTable", "dtypes", "ntypes", "out", "tmp", "dt1", "dt2", "o", "j", "i", "promotionRules", "dtype1", "dtype2", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isndarrayLike", "isMultiSlice", "isArrayLikeObject", "isPlainObject", "isBoolean", "hasOwnProp", "MultiSlice", "base", "getShape", "format", "slice", "x", "s", "options", "nargs", "opts", "args", "sh", "S", "i", "err", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isndarrayLike", "isMultiSlice", "isArrayLikeObject", "isPlainObject", "isBoolean", "isReadOnly", "hasOwnProp", "MultiSlice", "base", "getShape", "format", "sliceAssign", "x", "y", "s", "options", "nargs", "opts", "args", "sh", "S", "i", "err", "require_lib", "__commonJSMin", "exports", "module", "main", "require_defaults", "__commonJSMin", "exports", "module", "require_validate", "__commonJSMin", "exports", "module", "isObject", "hasOwnProp", "isArray", "isOrder", "isIndexMode", "format", "validate", "opts", "options", "i", "require_main", "__commonJSMin", "exports", "module", "isNonNegativeIntegerArray", "isInteger", "shape2strides", "getIndex", "format", "defaults", "validate", "sub2ind", "options", "shape", "ndims", "args", "opts", "err", "len", "i", "j", "require_lib", "__commonJSMin", "exports", "module", "sub2ind", "require_main", "__commonJSMin", "exports", "module", "isPlainObject", "hasOwnProp", "isArrayLike", "shape2strides", "strides2offset", "buffer", "numel", "ndarray", "defaults", "format", "DTYPE", "ORDER", "zeros", "shape", "options", "dtype", "order", "ndims", "opts", "buf", "len", "st", "sh", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isndarrayLike", "isPlainObject", "isNonNegativeIntegerArray", "hasOwnProp", "shape2strides", "strides2offset", "buffer", "numel", "getDType", "getShape", "getOrder", "ndarray", "format", "zerosLike", "x", "options", "dtype", "order", "ndims", "opts", "buf", "len", "st", "sh", "require_lib", "__commonJSMin", "exports", "module", "main", "setReadOnly", "ns"] + "sources": ["../base/shape2strides/lib/main.js", "../base/shape2strides/lib/assign.js", "../base/shape2strides/lib/index.js", "../base/strides2offset/lib/main.js", "../base/strides2offset/lib/index.js", "../base/strides2order/lib/main.js", "../base/strides2order/lib/index.js", "../base/numel/lib/main.js", "../base/numel/lib/index.js", "../orders/lib/orders.json", "../orders/lib/main.js", "../orders/lib/enum.js", "../orders/lib/index.js", "../base/assert/is-order/lib/main.js", "../base/assert/is-order/lib/index.js", "../dtypes/lib/dtypes.json", "../dtypes/lib/main.js", "../dtypes/lib/enum.js", "../dtypes/lib/assign.js", "../dtypes/lib/index.js", "../base/assert/is-data-type/lib/main.js", "../base/assert/is-data-type/lib/index.js", "../base/minmax-view-buffer-index/lib/main.js", "../base/minmax-view-buffer-index/lib/assign.js", "../base/minmax-view-buffer-index/lib/index.js", "../base/assert/is-buffer-length-compatible/lib/main.js", "../base/assert/is-buffer-length-compatible/lib/index.js", "../base/bytes-per-element/lib/bytes_per_element.json", "../base/bytes-per-element/lib/main.js", "../base/bytes-per-element/lib/index.js", "../base/iteration-order/lib/main.js", "../base/iteration-order/lib/index.js", "../base/ctor/lib/is_column_major_contiguous.js", "../base/ctor/lib/is_row_major_contiguous.js", "../base/ctor/lib/is_contiguous.js", "../base/ctor/lib/copy_flags.js", "../base/ctor/lib/iget.js", "../base/ctor/lib/iset.js", "../base/ctor/lib/set.js", "../base/ctor/lib/get.js", "../base/ctor/lib/tojson.js", "../base/ctor/lib/tostring.js", "../index-modes/lib/modes.json", "../index-modes/lib/main.js", "../index-modes/lib/enum.js", "../index-modes/lib/index.js", "../base/ctor/lib/meta2dataview.js", "../base/ctor/lib/meta2dataview.polyfill.js", "../base/ctor/lib/main.js", "../base/ctor/lib/index.js", "../defaults/lib/main.js", "../defaults/lib/get.js", "../defaults/lib/index.js", "../base/clamp-index/lib/main.js", "../base/clamp-index/lib/index.js", "../base/wrap-index/lib/main.js", "../base/wrap-index/lib/index.js", "../base/ind/lib/main.js", "../base/ind/lib/index.js", "../ctor/lib/iget.js", "../ctor/lib/iset.js", "../ctor/lib/get.js", "../ctor/lib/set.js", "../ctor/lib/copy_array.js", "../base/assert/is-index-mode/lib/main.js", "../base/assert/is-index-mode/lib/index.js", "../ctor/lib/validate.js", "../ctor/lib/main.js", "../ctor/lib/index.js", "../casting-modes/lib/modes.json", "../casting-modes/lib/main.js", "../casting-modes/lib/enum.js", "../casting-modes/lib/index.js", "../base/assert/is-casting-mode/lib/main.js", "../base/assert/is-casting-mode/lib/index.js", "../base/dtype-enum2str/lib/main.js", "../base/dtype-enum2str/lib/index.js", "../base/dtype-str2enum/lib/main.js", "../base/dtype-str2enum/lib/index.js", "../base/dtype-resolve-str/lib/main.js", "../base/dtype-resolve-str/lib/index.js", "../safe-casts/lib/safe_casts.json", "../safe-casts/lib/main.js", "../safe-casts/lib/index.js", "../base/assert/is-safe-data-type-cast/lib/main.js", "../base/assert/is-safe-data-type-cast/lib/index.js", "../same-kind-casts/lib/same_kind_casts.json", "../same-kind-casts/lib/main.js", "../same-kind-casts/lib/index.js", "../base/assert/is-same-kind-data-type-cast/lib/main.js", "../base/assert/is-same-kind-data-type-cast/lib/index.js", "../base/assert/is-allowed-data-type-cast/lib/main.js", "../base/assert/is-allowed-data-type-cast/lib/index.js", "../base/buffer-ctors/lib/ctors.js", "../base/buffer-ctors/lib/main.js", "../base/buffer-ctors/lib/index.js", "../base/buffer/lib/zeros.js", "../base/buffer/lib/main.js", "../base/buffer/lib/index.js", "../base/buffer-dtype/lib/ctor2dtype.js", "../base/buffer-dtype/lib/ctors.js", "../base/buffer-dtype/lib/dtypes.js", "../base/buffer-dtype/lib/main.js", "../base/buffer-dtype/lib/index.js", "../dtype/lib/main.js", "../dtype/lib/index.js", "../shape/lib/main.js", "../shape/lib/index.js", "../strides/lib/main.js", "../strides/lib/index.js", "../offset/lib/main.js", "../offset/lib/index.js", "../ndims/lib/main.js", "../ndims/lib/index.js", "../order/lib/main.js", "../order/lib/index.js", "../data-buffer/lib/main.js", "../data-buffer/lib/index.js", "../array/lib/is_array_like_object.js", "../array/lib/defaults.js", "../array/lib/cast_buffer.js", "../array/lib/copy_view.js", "../array/lib/expand_shape.js", "../array/lib/expand_strides.js", "../array/lib/main.js", "../array/lib/index.js", "../base/assert/is-buffer-length-compatible-shape/lib/main.js", "../base/assert/is-buffer-length-compatible-shape/lib/index.js", "../base/assert/is-column-major/lib/main.js", "../base/assert/is-column-major/lib/index.js", "../base/assert/is-single-segment-compatible/lib/main.js", "../base/assert/is-single-segment-compatible/lib/index.js", "../base/assert/is-column-major-contiguous/lib/main.js", "../base/assert/is-column-major-contiguous/lib/index.js", "../base/assert/is-complex-floating-point-data-type/lib/main.js", "../base/assert/is-complex-floating-point-data-type/lib/index.js", "../base/assert/is-contiguous/lib/main.js", "../base/assert/is-contiguous/lib/index.js", "../base/assert/is-floating-point-data-type/lib/main.js", "../base/assert/is-floating-point-data-type/lib/index.js", "../base/assert/is-integer-data-type/lib/main.js", "../base/assert/is-integer-data-type/lib/index.js", "../base/assert/is-numeric-data-type/lib/main.js", "../base/assert/is-numeric-data-type/lib/index.js", "../base/assert/is-read-only/lib/main.js", "../base/assert/is-read-only/lib/index.js", "../base/assert/is-real-data-type/lib/main.js", "../base/assert/is-real-data-type/lib/index.js", "../base/assert/is-real-floating-point-data-type/lib/main.js", "../base/assert/is-real-floating-point-data-type/lib/index.js", "../base/assert/is-row-major/lib/main.js", "../base/assert/is-row-major/lib/index.js", "../base/assert/is-row-major-contiguous/lib/main.js", "../base/assert/is-row-major-contiguous/lib/index.js", "../base/assert/is-signed-integer-data-type/lib/main.js", "../base/assert/is-signed-integer-data-type/lib/index.js", "../base/assert/is-unsigned-integer-data-type/lib/main.js", "../base/assert/is-unsigned-integer-data-type/lib/index.js", "../base/assert/lib/index.js", "../base/binary-loop-interchange-order/lib/sort2ins.js", "../base/binary-loop-interchange-order/lib/main.js", "../base/binary-loop-interchange-order/lib/index.js", "../base/binary-tiling-block-size/lib/defaults.js", "../base/binary-tiling-block-size/lib/main.js", "../base/binary-tiling-block-size/lib/index.js", "../base/bind2vind/lib/main.js", "../base/bind2vind/lib/index.js", "../base/shape/lib/main.js", "../base/shape/lib/index.js", "../base/strides/lib/main.js", "../base/strides/lib/index.js", "../base/offset/lib/main.js", "../base/offset/lib/index.js", "../base/order/lib/main.js", "../base/order/lib/index.js", "../base/dtype/lib/main.js", "../base/dtype/lib/index.js", "../base/data-buffer/lib/main.js", "../base/data-buffer/lib/index.js", "../base/broadcast-array/lib/main.js", "../base/broadcast-array/lib/index.js", "../base/broadcast-scalar/lib/main.js", "../base/broadcast-scalar/lib/index.js", "../base/broadcast-shapes/lib/main.js", "../base/broadcast-shapes/lib/index.js", "../base/buffer-dtype-enum/lib/main.js", "../base/buffer-dtype-enum/lib/index.js", "../base/dtype-char/lib/table.js", "../base/dtype-char/lib/main.js", "../base/dtype-char/lib/index.js", "../base/char2dtype/lib/main.js", "../base/char2dtype/lib/index.js", "../base/dtype-desc/lib/table.js", "../base/dtype-desc/lib/main.js", "../base/dtype-desc/lib/index.js", "../base/dtype-resolve-enum/lib/main.js", "../base/dtype-resolve-enum/lib/index.js", "../base/dtype2c/lib/table.json", "../base/dtype2c/lib/main.js", "../base/dtype2c/lib/index.js", "../base/dtypes2signatures/lib/main.js", "../base/dtypes2signatures/lib/index.js", "../base/empty/lib/main.js", "../base/empty/lib/index.js", "../base/empty-like/lib/main.js", "../base/empty-like/lib/index.js", "../base/expand-dimensions/lib/main.js", "../base/expand-dimensions/lib/index.js", "../base/from-scalar/lib/main.js", "../base/from-scalar/lib/index.js", "../base/ind2sub/lib/assign.js", "../base/ind2sub/lib/main.js", "../base/ind2sub/lib/index.js", "../base/max-view-buffer-index/lib/main.js", "../base/max-view-buffer-index/lib/index.js", "../base/maybe-broadcast-array/lib/main.js", "../base/maybe-broadcast-array/lib/index.js", "../base/meta-data-props/lib/main.js", "../base/meta-data-props/lib/index.js", "../base/min-view-buffer-index/lib/main.js", "../base/min-view-buffer-index/lib/index.js", "../base/ndarraylike2object/lib/main.js", "../base/ndarraylike2object/lib/index.js", "../base/ndims/lib/main.js", "../base/ndims/lib/index.js", "../base/next-cartesian-index/lib/assign.js", "../base/next-cartesian-index/lib/main.js", "../base/next-cartesian-index/lib/index.js", "../base/nonsingleton-dimensions/lib/main.js", "../base/nonsingleton-dimensions/lib/index.js", "../base/nullary-loop-interchange-order/lib/sort2ins.js", "../base/nullary-loop-interchange-order/lib/main.js", "../base/nullary-loop-interchange-order/lib/index.js", "../base/nullary-tiling-block-size/lib/defaults.js", "../base/nullary-tiling-block-size/lib/main.js", "../base/nullary-tiling-block-size/lib/index.js", "../base/nullary/lib/2d_blocked_accessors.js", "../base/nullary/lib/3d_blocked_accessors.js", "../base/nullary/lib/4d_blocked_accessors.js", "../base/nullary/lib/5d_blocked_accessors.js", "../base/nullary/lib/6d_blocked_accessors.js", "../base/nullary/lib/7d_blocked_accessors.js", "../base/nullary/lib/8d_blocked_accessors.js", "../base/nullary/lib/9d_blocked_accessors.js", "../base/nullary/lib/10d_blocked_accessors.js", "../base/nullary/lib/2d_blocked.js", "../base/nullary/lib/3d_blocked.js", "../base/nullary/lib/4d_blocked.js", "../base/nullary/lib/5d_blocked.js", "../base/nullary/lib/6d_blocked.js", "../base/nullary/lib/7d_blocked.js", "../base/nullary/lib/8d_blocked.js", "../base/nullary/lib/9d_blocked.js", "../base/nullary/lib/10d_blocked.js", "../base/nullary/lib/0d_accessors.js", "../base/nullary/lib/1d_accessors.js", "../base/nullary/lib/2d_accessors.js", "../base/nullary/lib/3d_accessors.js", "../base/nullary/lib/4d_accessors.js", "../base/nullary/lib/5d_accessors.js", "../base/nullary/lib/6d_accessors.js", "../base/nullary/lib/7d_accessors.js", "../base/nullary/lib/8d_accessors.js", "../base/nullary/lib/9d_accessors.js", "../base/nullary/lib/10d_accessors.js", "../base/vind2bind/lib/main.js", "../base/vind2bind/lib/index.js", "../base/nullary/lib/nd_accessors.js", "../base/nullary/lib/0d.js", "../base/nullary/lib/1d.js", "../base/nullary/lib/2d.js", "../base/nullary/lib/3d.js", "../base/nullary/lib/4d.js", "../base/nullary/lib/5d.js", "../base/nullary/lib/6d.js", "../base/nullary/lib/7d.js", "../base/nullary/lib/8d.js", "../base/nullary/lib/9d.js", "../base/nullary/lib/10d.js", "../base/nullary/lib/nd.js", "../base/nullary/lib/main.js", "../base/nullary/lib/index.js", "../output-dtype-policies/lib/policies.json", "../output-dtype-policies/lib/main.js", "../output-dtype-policies/lib/enum.js", "../output-dtype-policies/lib/assign.js", "../output-dtype-policies/lib/index.js", "../base/output-policy-enum2str/lib/main.js", "../base/output-policy-enum2str/lib/index.js", "../base/output-policy-str2enum/lib/main.js", "../base/output-policy-str2enum/lib/index.js", "../base/output-policy-resolve-enum/lib/main.js", "../base/output-policy-resolve-enum/lib/index.js", "../base/output-policy-resolve-str/lib/main.js", "../base/output-policy-resolve-str/lib/index.js", "../base/prepend-singleton-dimensions/lib/main.js", "../base/prepend-singleton-dimensions/lib/index.js", "../base/remove-singleton-dimensions/lib/main.js", "../base/remove-singleton-dimensions/lib/index.js", "../base/serialize-meta-data/lib/main.js", "../base/serialize-meta-data/lib/polyfill.js", "../base/serialize-meta-data/lib/index.js", "../base/singleton-dimensions/lib/main.js", "../base/singleton-dimensions/lib/index.js", "../base/slice/lib/slice_start.js", "../base/slice/lib/slice_strides.js", "../base/slice/lib/empty.js", "../base/slice/lib/main.js", "../base/slice/lib/index.js", "../base/unary-loop-interchange-order/lib/sort2ins.js", "../base/unary-loop-interchange-order/lib/main.js", "../base/unary-loop-interchange-order/lib/index.js", "../base/unary-tiling-block-size/lib/defaults.js", "../base/unary-tiling-block-size/lib/main.js", "../base/unary-tiling-block-size/lib/index.js", "../base/unary/lib/2d_blocked_accessors.js", "../base/unary/lib/3d_blocked_accessors.js", "../base/unary/lib/4d_blocked_accessors.js", "../base/unary/lib/5d_blocked_accessors.js", "../base/unary/lib/6d_blocked_accessors.js", "../base/unary/lib/7d_blocked_accessors.js", "../base/unary/lib/8d_blocked_accessors.js", "../base/unary/lib/9d_blocked_accessors.js", "../base/unary/lib/10d_blocked_accessors.js", "../base/unary/lib/2d_blocked.js", "../base/unary/lib/3d_blocked.js", "../base/unary/lib/4d_blocked.js", "../base/unary/lib/5d_blocked.js", "../base/unary/lib/6d_blocked.js", "../base/unary/lib/7d_blocked.js", "../base/unary/lib/8d_blocked.js", "../base/unary/lib/9d_blocked.js", "../base/unary/lib/10d_blocked.js", "../base/unary/lib/0d_accessors.js", "../base/unary/lib/1d_accessors.js", "../base/unary/lib/2d_accessors.js", "../base/unary/lib/3d_accessors.js", "../base/unary/lib/4d_accessors.js", "../base/unary/lib/5d_accessors.js", "../base/unary/lib/6d_accessors.js", "../base/unary/lib/7d_accessors.js", "../base/unary/lib/8d_accessors.js", "../base/unary/lib/9d_accessors.js", "../base/unary/lib/10d_accessors.js", "../base/unary/lib/nd_accessors.js", "../base/unary/lib/0d.js", "../base/unary/lib/1d.js", "../base/unary/lib/2d.js", "../base/unary/lib/3d.js", "../base/unary/lib/4d.js", "../base/unary/lib/5d.js", "../base/unary/lib/6d.js", "../base/unary/lib/7d.js", "../base/unary/lib/8d.js", "../base/unary/lib/9d.js", "../base/unary/lib/10d.js", "../base/unary/lib/nd.js", "../base/unary/lib/main.js", "../base/unary/lib/index.js", "../base/slice-assign/lib/main.js", "../base/slice-assign/lib/index.js", "../base/slice-dimension/lib/main.js", "../base/slice-dimension/lib/index.js", "../base/sub2ind/lib/main.js", "../base/sub2ind/lib/index.js", "../base/to-array/lib/recurse.js", "../base/to-array/lib/main.js", "../base/to-array/lib/index.js", "../base/transpose/lib/main.js", "../base/transpose/lib/index.js", "../base/unary-by/lib/2d_blocked_accessors.js", "../base/unary-by/lib/3d_blocked_accessors.js", "../base/unary-by/lib/4d_blocked_accessors.js", "../base/unary-by/lib/5d_blocked_accessors.js", "../base/unary-by/lib/6d_blocked_accessors.js", "../base/unary-by/lib/7d_blocked_accessors.js", "../base/unary-by/lib/8d_blocked_accessors.js", "../base/unary-by/lib/9d_blocked_accessors.js", "../base/unary-by/lib/10d_blocked_accessors.js", "../base/unary-by/lib/2d_blocked.js", "../base/unary-by/lib/3d_blocked.js", "../base/unary-by/lib/4d_blocked.js", "../base/unary-by/lib/5d_blocked.js", "../base/unary-by/lib/6d_blocked.js", "../base/unary-by/lib/7d_blocked.js", "../base/unary-by/lib/8d_blocked.js", "../base/unary-by/lib/9d_blocked.js", "../base/unary-by/lib/10d_blocked.js", "../base/unary-by/lib/0d_accessors.js", "../base/unary-by/lib/1d_accessors.js", "../base/unary-by/lib/2d_accessors.js", "../base/unary-by/lib/3d_accessors.js", "../base/unary-by/lib/4d_accessors.js", "../base/unary-by/lib/5d_accessors.js", "../base/unary-by/lib/6d_accessors.js", "../base/unary-by/lib/7d_accessors.js", "../base/unary-by/lib/8d_accessors.js", "../base/unary-by/lib/9d_accessors.js", "../base/unary-by/lib/10d_accessors.js", "../base/unary-by/lib/nd_accessors.js", "../base/unary-by/lib/0d.js", "../base/unary-by/lib/1d.js", "../base/unary-by/lib/2d.js", "../base/unary-by/lib/3d.js", "../base/unary-by/lib/4d.js", "../base/unary-by/lib/5d.js", "../base/unary-by/lib/6d.js", "../base/unary-by/lib/7d.js", "../base/unary-by/lib/8d.js", "../base/unary-by/lib/9d.js", "../base/unary-by/lib/10d.js", "../base/unary-by/lib/nd.js", "../base/unary-by/lib/main.js", "../base/unary-by/lib/index.js", "../base/unary-output-dtype/lib/main.js", "../base/unary-output-dtype/lib/index.js", "../base/zeros/lib/main.js", "../base/zeros/lib/index.js", "../base/zeros-like/lib/main.js", "../base/zeros-like/lib/index.js", "../base/lib/index.js", "../broadcast-array/lib/main.js", "../broadcast-array/lib/index.js", "../dispatch/lib/index_of_types.js", "../dispatch/lib/main.js", "../dispatch/lib/index.js", "../empty/lib/main.js", "../empty/lib/index.js", "../empty-like/lib/main.js", "../empty-like/lib/index.js", "../fancy/lib/re_integer.js", "../fancy/lib/re_subseq.js", "../fancy/lib/prop2slice.0d.js", "../fancy/lib/prop2slice.1d.js", "../fancy/lib/prop2slice.nd.js", "../fancy/lib/has_property.js", "../fancy/lib/get_value.js", "../fancy/lib/error_message.js", "../fancy/lib/error_constructor.js", "../fancy/lib/get_slice.js", "../fancy/lib/get.js", "../fancy/lib/set_value.js", "../min-dtype/lib/main.js", "../min-dtype/lib/index.js", "../from-scalar/lib/main.js", "../from-scalar/lib/index.js", "../fancy/lib/set_slice.js", "../fancy/lib/set.js", "../fancy/lib/main.js", "../fancy/lib/index.js", "../ind2sub/lib/defaults.json", "../ind2sub/lib/validate.js", "../ind2sub/lib/main.js", "../ind2sub/lib/assign.js", "../ind2sub/lib/index.js", "../iter/columns/lib/main.js", "../iter/columns/lib/index.js", "../iter/entries/lib/main.js", "../iter/entries/lib/index.js", "../iter/indices/lib/main.js", "../iter/indices/lib/index.js", "../iter/rows/lib/main.js", "../iter/rows/lib/index.js", "../to-array/lib/main.js", "../to-array/lib/index.js", "../iter/to-array-each/lib/main.js", "../iter/to-array-each/lib/index.js", "../iter/values/lib/main.js", "../iter/values/lib/index.js", "../iter/lib/index.js", "../maybe-broadcast-array/lib/main.js", "../maybe-broadcast-array/lib/index.js", "../next-dtype/lib/next_dtypes.json", "../next-dtype/lib/main.js", "../next-dtype/lib/index.js", "../numel/lib/main.js", "../numel/lib/index.js", "../promotion-rules/lib/promotion_rules.json", "../promotion-rules/lib/main.js", "../promotion-rules/lib/index.js", "../slice/lib/main.js", "../slice/lib/index.js", "../slice-assign/lib/main.js", "../slice-assign/lib/index.js", "../slice-dimension/lib/main.js", "../slice-dimension/lib/index.js", "../sub2ind/lib/defaults.json", "../sub2ind/lib/validate.js", "../sub2ind/lib/main.js", "../sub2ind/lib/index.js", "../zeros/lib/main.js", "../zeros/lib/index.js", "../zeros-like/lib/main.js", "../zeros-like/lib/index.js", "../lib/index.js"], + "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Generates a stride array from an array shape (row-major).\n*\n* @private\n* @param {NonNegativeIntegerArray} shape - array shape\n* @returns {Array} array strides\n*/\nfunction rowmajor( shape ) {\n\tvar ndims;\n\tvar out;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\tout = [];\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tout.push( 0 );\n\t}\n\ts = 1;\n\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\tout[ i ] = s;\n\t\ts *= shape[ i ];\n\t}\n\treturn out;\n}\n\n/**\n* Generates a stride array from an array shape (column-major).\n*\n* @private\n* @param {NonNegativeIntegerArray} shape - array shape\n* @returns {Array} array strides\n*/\nfunction columnmajor( shape ) {\n\tvar out;\n\tvar s;\n\tvar i;\n\n\tout = [];\n\ts = 1;\n\tfor ( i = 0; i < shape.length; i++ ) {\n\t\tout.push( s );\n\t\ts *= shape[ i ];\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates a stride array from an array shape.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @returns {Array} array strides\n*\n* @example\n* var s = shape2strides( [ 3, 2 ], 'row-major' );\n* // returns [ 2, 1 ]\n*\n* s = shape2strides( [ 3, 2 ], 'column-major' );\n* // returns [ 1, 3 ]\n*/\nfunction shape2strides( shape, order ) {\n\tif ( order === 'column-major' ) {\n\t\treturn columnmajor( shape );\n\t}\n\treturn rowmajor( shape );\n}\n\n\n// EXPORTS //\n\nmodule.exports = shape2strides;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\n/**\n* Generates a stride array from an array shape (row-major).\n*\n* @private\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {(Array|TypedArray|Object)} out - output object\n* @returns {(Array|TypedArray|Object)} array strides\n*/\nfunction rowmajor( shape, out ) {\n\tvar ndims;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\ts = 1;\n\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\tout[ i ] = s;\n\t\ts *= shape[ i ];\n\t}\n\treturn out;\n}\n\n/**\n* Generates a stride array from an array shape (column-major).\n*\n* @private\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {(Array|TypedArray|Object)} out - output object\n* @returns {(Array|TypedArray|Object)} array strides\n*/\nfunction columnmajor( shape, out ) {\n\tvar s;\n\tvar i;\n\n\ts = 1;\n\tfor ( i = 0; i < shape.length; i++ ) {\n\t\tout[ i ] = s;\n\t\ts *= shape[ i ];\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates a stride array from an array shape.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {(Array|TypedArray|Object)} out - output object\n* @returns {(Array|TypedArray|Object)} array strides\n*\n* @example\n* var strides = [ 0, 0 ];\n*\n* var out = shape2strides( [ 3, 2 ], 'row-major', strides );\n* // returns [ 2, 1 ]\n*\n* var bool = ( out === strides );\n* // returns true\n*\n* out = shape2strides( [ 3, 2 ], 'column-major', strides );\n* // returns [ 1, 3 ]\n*/\nfunction shape2strides( shape, order, out ) {\n\tif ( order === 'column-major' ) {\n\t\treturn columnmajor( shape, out );\n\t}\n\treturn rowmajor( shape, out );\n}\n\n\n// EXPORTS //\n\nmodule.exports = shape2strides;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Generate a stride array from an array shape.\n*\n* @module @stdlib/ndarray/base/shape2strides\n*\n* @example\n* var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );\n*\n* var strides = shape2strides( [ 3, 2 ], 'row-major' );\n* // returns [ 2, 1 ]\n*\n* strides = shape2strides( [ 3, 2 ], 'column-major' );\n* // returns [ 1, 3 ]\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar assign = require( './assign.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the index offset which specifies the location of the first indexed value in a multidimensional array based on a stride array.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @returns {NonNegativeInteger} offset - offset\n*\n* @example\n* var shape = [ 2, 3, 10 ];\n* var strides = [ 30, -10, 1 ];\n*\n* var offset = strides2offset( shape, strides );\n* // returns 20\n*/\nfunction strides2offset( shape, strides ) {\n\tvar offset;\n\tvar ndims;\n\tvar i;\n\n\tndims = shape.length;\n\toffset = 0;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tif ( strides[ i ] < 0 ) {\n\t\t\t// Note that, since the stride is negative, this operation increments, not decrements, the offset...\n\t\t\toffset -= strides[ i ] * ( shape[ i ]-1 );\n\t\t}\n\t}\n\treturn offset;\n}\n\n\n// EXPORTS //\n\nmodule.exports = strides2offset;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine the index offset which specifies the location of the first indexed value in a multidimensional array based on a stride array.\n*\n* @module @stdlib/ndarray/base/strides2offset\n*\n* @example\n* var strides2offset = require( '@stdlib/ndarray/base/strides2offset' );\n*\n* var shape = [ 2, 3, 10 ];\n* var strides = [ 30, -10, 1 ];\n*\n* var offset = strides2offset( shape, strides );\n* // returns 20\n*/\n\n// MODULES //\n\nvar strides2offset = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = strides2offset;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Determines the order of a multidimensional array based on a provided stride array.\n*\n* @param {IntegerArray} strides - stride array\n* @returns {integer} order\n*\n* @example\n* var strides2order = require( '@stdlib/ndarray/base/strides2order' );\n*\n* var order = strides2order( [ 2, 1 ] );\n* // returns 1\n*\n* order = strides2order( [ 1, 2 ] );\n* // returns 2\n*\n* order = strides2order( [ 1, 1, 1 ] );\n* // returns 3\n*\n* order = strides2order( [ 2, 3, 1 ] );\n* // returns 0\n*/\nfunction strides2order( strides ) {\n\tvar column;\n\tvar ndims;\n\tvar row;\n\tvar s1;\n\tvar s2;\n\tvar i;\n\n\tndims = strides.length;\n\tif ( ndims === 0 ) {\n\t\treturn 0|0; // 'none'\n\t}\n\tcolumn = true;\n\trow = true;\n\n\ts1 = abs( strides[ 0 ] );\n\tfor ( i = 1; i < ndims; i++ ) {\n\t\ts2 = abs( strides[ i ] );\n\t\tif ( column && s2 < s1 ) {\n\t\t\tcolumn = false;\n\t\t} else if ( row && s2 > s1 ) {\n\t\t\trow = false;\n\t\t}\n\t\tif ( row || column ) {\n\t\t\ts1 = s2;\n\t\t} else {\n\t\t\treturn 0|0; // 'none'\n\t\t}\n\t}\n\tif ( row && column ) {\n\t\treturn 3|0; // 'both'\n\t}\n\tif ( row ) {\n\t\treturn 1|0; // 'row-major'\n\t}\n\treturn 2|0; // 'column-major'\n}\n\n\n// EXPORTS //\n\nmodule.exports = strides2order;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine the order of a multidimensional array based on a provided stride array.\n*\n* @module @stdlib/ndarray/base/strides2order\n*\n* @example\n* var strides2order = require( '@stdlib/ndarray/base/strides2order' );\n*\n* var order = strides2order( [ 2, 1 ] );\n* // returns 1\n*\n* order = strides2order( [ 1, 2 ] );\n* // returns 2\n*\n* order = strides2order( [ 1, 1, 1 ] );\n* // returns 3\n*\n* order = strides2order( [ 2, 3, 1 ] );\n* // returns 0\n*/\n\n// MODULES //\n\nvar strides2order = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = strides2order;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the number of elements in an array.\n*\n* @param {(NonNegativeIntegerArray|EmptyArray)} shape - array shape\n* @returns {NonNegativeInteger} number of elements\n*\n* @example\n* var n = numel( [ 3, 3, 3 ] );\n* // returns 27\n*/\nfunction numel( shape ) {\n\tvar ndims;\n\tvar n;\n\tvar i;\n\n\tndims = shape.length;\n\tif ( ndims === 0 ) {\n\t\treturn 0;\n\t}\n\tn = 1;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tn *= shape[ i ];\n\t}\n\treturn n;\n}\n\n\n// EXPORTS //\n\nmodule.exports = numel;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the number of elements in an array.\n*\n* @module @stdlib/ndarray/base/numel\n*\n* @example\n* var numel = require( '@stdlib/ndarray/base/numel' );\n*\n* var n = numel( [ 3, 3, 3 ] );\n* // returns 27\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "[\n\t\"row-major\",\n\t\"column-major\"\n]\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar ORDERS = require( './orders.json' );\n\n\n// MAIN //\n\n/**\n* Returns a list of ndarray orders.\n*\n* @returns {StringArray} list of ndarray orders\n*\n* @example\n* var list = orders();\n* // returns [ 'row-major', 'column-major' ]\n*/\nfunction orders() {\n\treturn ORDERS.slice();\n}\n\n\n// EXPORTS //\n\nmodule.exports = orders;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an object mapping supported orders to integer values for purposes of C inter-operation.\n*\n* ## Notes\n*\n* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `row-major == 1`). Instead, the object should be used in an opaque manner.\n* - The main purpose of this function is JavaScript and C inter-operation of ndarray objects.\n*\n* @returns {Object} object mapping supported orders to integer values\n*\n* @example\n* var table = enumerated();\n* // returns \n*/\nfunction enumerated() {\n\t// NOTE: the following should match the C `orders.h` enumeration!!!!\n\treturn {\n\t\t// Row-major (C-style):\n\t\t'row-major': 1,\n\n\t\t// Column-major (Fortran-style):\n\t\t'column-major': 2\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = enumerated;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a list of ndarray orders.\n*\n* @module @stdlib/ndarray/orders\n*\n* @example\n* var orders = require( '@stdlib/ndarray/orders' );\n*\n* var list = orders();\n* // returns [ 'row-major', 'column-major' ]\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar enumeration = require( './enum.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'enum', enumeration );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar orders = require( './../../../../orders' );\n\n\n// VARIABLES //\n\nvar ORDERS = orders();\nvar len = ORDERS.length;\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is an ndarray order.\n*\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is an ndarray order\n*\n* @example\n* var bool = isOrder( 'row-major' );\n* // returns true\n*\n* bool = isOrder( 'column-major' );\n* // returns true\n*\n* bool = isOrder( 'foo' );\n* // returns false\n*/\nfunction isOrder( v ) {\n\tvar i;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tif ( v === ORDERS[ i ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nmodule.exports = isOrder;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test whether an input value is an ndarray order.\n*\n* @module @stdlib/ndarray/base/assert/is-order\n*\n* @example\n* var isOrder = require( '@stdlib/ndarray/base/assert/is-order' );\n*\n* var bool = isOrder( 'row-major' );\n* // returns true\n*\n* bool = isOrder( 'column-major' );\n* // returns true\n*\n* bool = isOrder( 'foo' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "{\n \"all\": [\n \"binary\",\n \"complex64\",\n \"complex128\",\n \"float32\",\n \"float64\",\n \"generic\",\n \"int16\",\n \"int32\",\n \"int8\",\n \"uint16\",\n \"uint32\",\n \"uint8\",\n \"uint8c\"\n ],\n \"floating_point\": [\n \"complex64\",\n \"complex128\",\n \"float32\",\n \"float64\"\n ],\n \"real_floating_point\": [\n \"float32\",\n \"float64\"\n ],\n \"complex_floating_point\": [\n \"complex64\",\n \"complex128\"\n ],\n \"integer\": [\n \"int16\",\n \"int32\",\n \"int8\",\n \"uint16\",\n \"uint32\",\n \"uint8\",\n \"uint8c\"\n ],\n \"signed_integer\": [\n \"int16\",\n \"int32\",\n \"int8\"\n ],\n \"unsigned_integer\": [\n \"uint16\",\n \"uint32\",\n \"uint8\",\n \"uint8c\"\n ],\n \"real\": [\n \"float32\",\n \"float64\",\n \"int16\",\n \"int32\",\n \"int8\",\n \"uint16\",\n \"uint32\",\n \"uint8\",\n \"uint8c\"\n ],\n \"numeric\": [\n \"complex64\",\n \"complex128\",\n \"float32\",\n \"float64\",\n \"int16\",\n \"int32\",\n \"int8\",\n \"uint16\",\n \"uint32\",\n \"uint8\",\n \"uint8c\"\n ]\n}\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar DTYPES = require( './dtypes.json' );\n\n\n// MAIN //\n\n/**\n* Returns a list of ndarray data types.\n*\n* @param {string} [kind] - data type kind\n* @returns {StringArray} list of ndarray data types\n*\n* @example\n* var list = dtypes();\n* // returns [...]\n*\n* @example\n* var list = dtypes( 'floating_point' );\n* // returns [...]\n*/\nfunction dtypes() {\n\tvar out;\n\tif ( arguments.length === 0 ) {\n\t\treturn DTYPES.all.slice();\n\t}\n\tout = DTYPES[ arguments[ 0 ] ];\n\treturn ( out ) ? out.slice() : [];\n}\n\n\n// EXPORTS //\n\nmodule.exports = dtypes;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable stdlib/empty-line-before-comment */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an object mapping supported data type strings to enumeration constants.\n*\n* ## Notes\n*\n* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `INT8 == 0`). Instead, the object should be used in an opaque manner.\n* - The main purpose of this function is JavaScript and C inter-operation of ndarray objects. While certain dtypes, such as \"generic\" and \"binary\", have special behavior in JavaScript, they do not have a direct complement in C.\n*\n* @private\n* @returns {Object} object mapping supported dtypes to enumeration constants\n*\n* @example\n* var table = enumeration();\n* // returns \n*/\nfunction enumeration() {\n\t// NOTE: the following should match the C `dtypes.h` enumeration!!!!\n\treturn {\n\t\t// Boolean data types:\n\t\t'bool': 0,\n\n\t\t// Integer data types:\n\t\t'int8': 1,\n\t\t'uint8': 2,\n\t\t'uint8c': 3,\n\t\t'int16': 4,\n\t\t'uint16': 5,\n\t\t'int32': 6,\n\t\t'uint32': 7,\n\t\t'int64': 8,\n\t\t'uint64': 9,\n\t\t// 'int128': 10, // uncomment once supported\n\t\t// 'uint128': 11,\n\t\t// 'int256': 12,\n\t\t// 'uint256': 13,\n\n\t\t// Floating-point data types:\n\t\t// 'float16': 14,\n\t\t// 'bfloat16': 15,\n\t\t'float32': 10,\n\t\t'float64': 11,\n\t\t// 'float128': 18, // uncomment once supported\n\n\t\t// Complex floating-point number data types:\n\t\t'complex64': 12,\n\t\t'complex128': 13,\n\n\t\t// Data type for \"binary\" data (i.e., data stored in a Node.js `Buffer` object):\n\t\t'binary': 14,\n\n\t\t// Data type for \"generic\" JavaScript values (objects):\n\t\t'generic': 15,\n\n\t\t// Define a signaling value which is guaranteed not to be a valid type enumeration value:\n\t\t'notype': 17,\n\n\t\t// Indicate the start of user defined type numbers (leaving room for type growth above):\n\t\t'userdefined_type': 256\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = enumeration;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-read-only-property' );\nvar objectKeys = require( '@stdlib/utils/keys' );\n\n\n// MAIN //\n\n/**\n* Copies all enumerable own properties from a source object to a target object as enumerable read-only properties.\n*\n* @private\n* @param {Object} target - target object\n* @param {Object} source - source object\n* @returns {Object} modified target object\n*\n* @example\n* var source = {\n* 'beep': 'boop'\n* };\n* var target = {};\n*\n* var out = assign( target, source );\n* // returns \n*\n* var bool = ( out === target );\n* // returns true\n*\n* var v = target.beep;\n* // returns 'boop'\n*/\nfunction assign( target, source ) {\n\tvar keys;\n\tvar k;\n\tvar i;\n\n\tkeys = objectKeys( source );\n\tfor ( i = 0; i < keys.length; i++ ) {\n\t\tk = keys[ i ];\n\t\tsetReadOnly( target, k, source[ k ] );\n\t}\n\treturn target;\n}\n\n\n// EXPORTS //\n\nmodule.exports = assign;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a list of ndarray data types.\n*\n* @module @stdlib/ndarray/dtypes\n*\n* @example\n* var dtypes = require( '@stdlib/ndarray/dtypes' );\n*\n* var list = dtypes();\n* // returns [...]\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar enumeration = require( './enum.js' );\nvar assign = require( './assign.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'enum', enumeration );\nassign( main, enumeration() );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar contains = require( '@stdlib/array/base/assert/contains' ).factory;\nvar dtypes = require( './../../../../dtypes' );\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray data type.\n*\n* @name isDataType\n* @type {Function}\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray data type\n*\n* @example\n* var bool = isDataType( 'binary' );\n* // returns true\n*\n* bool = isDataType( 'float32' );\n* // returns true\n*\n* bool = isDataType( 'float64' );\n* // returns true\n*\n* bool = isDataType( 'generic' );\n* // returns true\n*\n* bool = isDataType( 'int16' );\n* // returns true\n*\n* bool = isDataType( 'int32' );\n* // returns true\n*\n* bool = isDataType( 'int8' );\n* // returns true\n*\n* bool = isDataType( 'uint16' );\n* // returns true\n*\n* bool = isDataType( 'uint32' );\n* // returns true\n*\n* bool = isDataType( 'uint8' );\n* // returns true\n*\n* bool = isDataType( 'uint8c' );\n* // returns true\n*\n* bool = isDataType( 'foo' );\n* // returns false\n*/\nvar isDataType = contains( dtypes() );\n\n\n// EXPORTS //\n\nmodule.exports = isDataType;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test whether an input value is a supported ndarray data type.\n*\n* @module @stdlib/ndarray/base/assert/is-data-type\n*\n* @example\n* var isDataType = require( '@stdlib/ndarray/base/assert/is-data-type' );\n*\n* var bool = isDataType( 'binary' );\n* // returns true\n*\n* bool = isDataType( 'float32' );\n* // returns true\n*\n* bool = isDataType( 'float64' );\n* // returns true\n*\n* bool = isDataType( 'generic' );\n* // returns true\n*\n* bool = isDataType( 'int16' );\n* // returns true\n*\n* bool = isDataType( 'int32' );\n* // returns true\n*\n* bool = isDataType( 'int8' );\n* // returns true\n*\n* bool = isDataType( 'uint16' );\n* // returns true\n*\n* bool = isDataType( 'uint32' );\n* // returns true\n*\n* bool = isDataType( 'uint8' );\n* // returns true\n*\n* bool = isDataType( 'uint8c' );\n* // returns true\n*\n* bool = isDataType( 'foo' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Computes the minimum and maximum linear indices in an underlying data buffer which are accessible to an array view.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @returns {Array} linear indices\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ 10, 1 ];\n* var offset = 10;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 10, 109 ]\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ -10, -1 ];\n* var offset = 99;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 0, 99 ]\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ 1, 10 ];\n* var offset = 10;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 10, 109 ]\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ -1, -10 ];\n* var offset = 99;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 0, 99 ]\n*/\nfunction minmaxViewBufferIndex( shape, strides, offset ) {\n\tvar ndims;\n\tvar min;\n\tvar max;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\tmin = offset;\n\tmax = offset;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tif ( shape[ i ] === 0 ) {\n\t\t\treturn [ offset, offset ];\n\t\t}\n\t\ts = strides[ i ];\n\t\tif ( s > 0 ) {\n\t\t\tmax += s * ( shape[i]-1 );\n\t\t} else if ( s < 0 ) {\n\t\t\tmin += s * ( shape[i]-1 ); // decrements min\n\t\t}\n\t}\n\treturn [ min, max ];\n}\n\n\n// EXPORTS //\n\nmodule.exports = minmaxViewBufferIndex;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Computes the minimum and maximum linear indices in an underlying data buffer which are accessible to an array view and assigns results to a provided output array.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @param {(Array|TypedArray|Object)} out - output object\n* @returns {(Array|TypedArray|Object)} linear indices\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ 10, 1 ];\n* var offset = 10;\n*\n* var out = [ 0, 0 ];\n* var idx = minmaxViewBufferIndex( shape, strides, offset, out );\n* // returns [ 10, 109 ]\n*\n* var bool = ( idx === out );\n* // returns true\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ -10, -1 ];\n* var offset = 99;\n*\n* var out = [ 0, 0 ];\n* var idx = minmaxViewBufferIndex( shape, strides, offset, out );\n* // returns [ 0, 99 ]\n*\n* var bool = ( idx === out );\n* // returns true\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ 1, 10 ];\n* var offset = 10;\n*\n* var out = [ 0, 0 ];\n* var idx = minmaxViewBufferIndex( shape, strides, offset, out );\n* // returns [ 10, 109 ]\n*\n* var bool = ( idx === out );\n* // returns true\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ -1, -10 ];\n* var offset = 99;\n*\n* var out = [ 0, 0 ];\n* var idx = minmaxViewBufferIndex( shape, strides, offset, out );\n* // returns [ 0, 99 ]\n*\n* var bool = ( idx === out );\n* // returns true\n*/\nfunction minmaxViewBufferIndex( shape, strides, offset, out ) {\n\tvar ndims;\n\tvar min;\n\tvar max;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\tmin = offset;\n\tmax = offset;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tif ( shape[ i ] === 0 ) {\n\t\t\tout[ 0 ] = offset;\n\t\t\tout[ 1 ] = offset;\n\t\t\treturn out;\n\t\t}\n\t\ts = strides[ i ];\n\t\tif ( s > 0 ) {\n\t\t\tmax += s * ( shape[i]-1 );\n\t\t} else if ( s < 0 ) {\n\t\t\tmin += s * ( shape[i]-1 ); // decrements min\n\t\t}\n\t}\n\tout[ 0 ] = min;\n\tout[ 1 ] = max;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = minmaxViewBufferIndex;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Compute the minimum and maximum linear indices in an underlying data buffer which are accessible to an array view.\n*\n* @module @stdlib/ndarray/base/minmax-view-buffer-index\n*\n* @example\n* var minmaxViewBufferIndex = require( '@stdlib/ndarray/base/minmax-view-buffer-index' );\n*\n* var shape = [ 10, 10 ];\n* var strides = [ 10, 1 ];\n* var offset = 10;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 10, 109 ]\n*\n* @example\n* var minmaxViewBufferIndex = require( '@stdlib/ndarray/base/minmax-view-buffer-index' );\n*\n* var shape = [ 10, 10 ];\n* var strides = [ -10, -1 ];\n* var offset = 99;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 0, 99 ]\n*\n* @example\n* var minmaxViewBufferIndex = require( '@stdlib/ndarray/base/minmax-view-buffer-index' );\n*\n* var shape = [ 10, 10 ];\n* var strides = [ 1, 10 ];\n* var offset = 10;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 10, 109 ]\n*\n* @example\n* var minmaxViewBufferIndex = require( '@stdlib/ndarray/base/minmax-view-buffer-index' );\n*\n* var shape = [ 10, 10 ];\n* var strides = [ -1, -10 ];\n* var offset = 99;\n*\n* var idx = minmaxViewBufferIndex( shape, strides, offset );\n* // returns [ 0, 99 ]\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar assign = require( './assign.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar minmax = require( './../../../../base/minmax-view-buffer-index' );\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a buffer length is compatible with provided ndarray meta data.\n*\n* @param {NonNegativeInteger} len - buffer length\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @returns {boolean} boolean indicating if a buffer length is compatible\n*\n* @example\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var bool = isBufferLengthCompatible( 4, shape, strides, offset );\n* // returns true\n*\n* @example\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 2;\n*\n* var bool = isBufferLengthCompatible( 4, shape, strides, offset );\n* // returns false\n*/\nfunction isBufferLengthCompatible( len, shape, strides, offset ) {\n\t// Determine the minimum and maximum linear indices which are accessible by the array view:\n\tvar buf = minmax( shape, strides, offset );\n\n\t// If the indices are \"inbounds\", then the buffer length is compatible:\n\treturn ( buf[ 0 ] >= 0 && buf[ 1 ] < len );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isBufferLengthCompatible;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a boolean indicating if a buffer length is compatible with provided ndarray meta data.\n*\n* @module @stdlib/ndarray/base/assert/is-buffer-length-compatible\n*\n* @example\n* var isBufferLengthCompatible = require( '@stdlib/ndarray/base/assert/is-buffer-length-compatible' );\n*\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var bool = isBufferLengthCompatible( 4, shape, strides, offset );\n* // returns true\n*\n* @example\n* var isBufferLengthCompatible = require( '@stdlib/ndarray/base/assert/is-buffer-length-compatible' );\n*\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 2;\n*\n* var bool = isBufferLengthCompatible( 4, shape, strides, offset );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "{\n\t\"binary\": 1,\n\t\"bool\": 1,\n\t\"complex64\": 8,\n\t\"complex128\": 16,\n\t\"float16\": 2,\n\t\"bfloat16\": 2,\n\t\"float32\": 4,\n\t\"float64\": 8,\n\t\"float128\": 16,\n\t\"generic\": null,\n\t\"int8\": 1,\n\t\"int16\": 2,\n\t\"int32\": 4,\n\t\"int64\": 8,\n\t\"int128\": 16,\n\t\"int256\": 32,\n\t\"uint8\": 1,\n\t\"uint8c\": 1,\n\t\"uint16\": 2,\n\t\"uint32\": 4,\n\t\"uint64\": 8,\n\t\"uint128\": 16,\n\t\"uint256\": 32\n}\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar BYTES_PER_ELEMENT = require( './bytes_per_element.json' );\n\n\n// MAIN //\n\n/**\n* Returns the number of bytes per element provided an underlying array data type.\n*\n* @param {string} dtype - data type\n* @returns {(NonNegativeInteger|null)} number of bytes per element\n*\n* @example\n* var nbytes = bytesPerElement( 'float64' );\n* // returns 8\n*\n* nbytes = bytesPerElement( 'generic' );\n* // returns null\n*/\nfunction bytesPerElement( dtype ) {\n\treturn BYTES_PER_ELEMENT[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = bytesPerElement;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the number of bytes per element provided an underlying array data type.\n*\n* @module @stdlib/ndarray/base/bytes-per-element\n*\n* @example\n* var bytesPerElement = require( '@stdlib/ndarray/base/bytes-per-element' );\n*\n* var nbytes = bytesPerElement( 'float64' );\n* // returns 8\n*\n* nbytes = bytesPerElement( 'generic' );\n* // returns null\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns array iteration order.\n*\n* ## Notes\n*\n* - Return value key:\n*\n* - `0`: unordered (i.e., strides of mixed sign; e.g., `[ 9, -3, 1 ]`)\n* - `1`: ordered left-to-right (i.e., all nonnegative strides)\n* - `-1`: ordered right-to-left (i.e., all negative strides)\n*\n* @param {IntegerArray} strides - stride array\n* @returns {integer} iteration order\n*\n* @example\n* var o = iterationOrder( [ 2, 1 ] );\n* // returns 1\n*\n* o = iterationOrder( [ -2, 1 ] );\n* // returns 0\n*\n* o = iterationOrder( [ -2, -1 ] );\n* // returns -1\n*/\nfunction iterationOrder( strides ) {\n\tvar cnt;\n\tvar i;\n\n\tcnt = 0;\n\tfor ( i = 0; i < strides.length; i++ ) {\n\t\tif ( strides[ i ] < 0 ) {\n\t\t\tcnt += 1;\n\t\t}\n\t}\n\tif ( cnt === 0 ) {\n\t\t// All nonnegative strides:\n\t\treturn 1|0; // asm-type annotation\n\t}\n\tif ( cnt === strides.length ) {\n\t\t// All negative strides:\n\t\treturn -1|0; // asm-type annotation\n\t}\n\t// Strides of mixed signs:\n\treturn 0|0; // asm-type annotation\n}\n\n\n// EXPORTS //\n\nmodule.exports = iterationOrder;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Given a stride array, determine array iteration order.\n*\n* @module @stdlib/ndarray/base/iteration-order\n*\n* @example\n* var iterationOrder = require( '@stdlib/ndarray/base/iteration-order' );\n*\n* var o = iterationOrder( [ 2, 1 ] );\n* // returns 1\n*\n* o = iterationOrder( [ -2, 1 ] );\n* // returns 0\n*\n* o = iterationOrder( [ -2, -1 ] );\n* // returns -1\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Determines if an array is column-major contiguous.\n*\n* @private\n* @param {integer} order - **inferred** array order\n* @param {boolean} contiguous - boolean indicating is an array is contiguous\n* @returns {boolean} boolean indicating if an array is column-major contiguous\n*/\nfunction isColumnMajorContiguous( order, contiguous ) {\n\treturn contiguous && ( order === 2 || order === 3 );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isColumnMajorContiguous;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Determines if an array is row-major contiguous.\n*\n* @private\n* @param {integer} order - **inferred** array order\n* @param {boolean} contiguous - boolean indicating is an array is contiguous\n* @returns {boolean} boolean indicating if an array is row-major contiguous\n*/\nfunction isRowMajorContiguous( order, contiguous ) {\n\treturn contiguous && ( order === 1 || order === 3 );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isRowMajorContiguous;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar minmaxViewBufferIndex = require( './../../../base/minmax-view-buffer-index' );\n\n\n// MAIN //\n\n/**\n* Determines if an array is contiguous.\n*\n* @private\n* @param {NonNegativeInteger} len - array length\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @param {integer} iterationOrder - iteration order\n* @returns {boolean} boolean indicating if an array is contiguous\n*/\nfunction isContiguous( len, shape, strides, offset, iterationOrder ) {\n\tvar buf;\n\n\t// If an array does not contain any elements, then no data to store, and, if the array is unordered, adjacent array elements are not guaranteed to be stored next to each other.\n\tif ( len === 0 || iterationOrder === 0 ) {\n\t\treturn false;\n\t}\n\t// Ensure that the array is compatible with a single memory segment:\n\tbuf = minmaxViewBufferIndex( shape, strides, offset );\n\treturn ( len === ( buf[1]-buf[0]+1 ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isContiguous;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Copies ndarray flags.\n*\n* @private\n* @param {Object} flags - flags\n* @returns {Object} copy of input object\n*/\nfunction copyFlags( flags ) {\n\treturn {\n\t\t'ROW_MAJOR_CONTIGUOUS': flags.ROW_MAJOR_CONTIGUOUS,\n\t\t'COLUMN_MAJOR_CONTIGUOUS': flags.COLUMN_MAJOR_CONTIGUOUS,\n\t\t'READONLY': flags.READONLY\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = copyFlags;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an array element located a specified linear view index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the input argument is ignored and, for clarity, should not be provided.\n*\n* @private\n* @param {integer} [idx] - linear view index\n* @returns {*} array element\n*/\nfunction iget( idx ) {\n\t/* eslint-disable no-invalid-this */\n\tvar strides;\n\tvar shape;\n\tvar ndims;\n\tvar ind;\n\tvar s;\n\tvar i;\n\n\tndims = this._ndims;\n\tif ( ndims === 0 ) {\n\t\tif ( this._accessors ) {\n\t\t\treturn this._buffer.get( this._offset );\n\t\t}\n\t\treturn this._buffer[ this._offset ];\n\t}\n\tif ( this._flags.ROW_MAJOR_CONTIGUOUS || this._flags.COLUMN_MAJOR_CONTIGUOUS ) { // eslint-disable-line max-len\n\t\t// Trivial case where we have all positive strides...\n\t\tif ( this._iterationOrder === 1 ) {\n\t\t\tif ( this._accessors ) {\n\t\t\t\treturn this._buffer.get( this._offset+idx );\n\t\t\t}\n\t\t\treturn this._buffer[ this._offset+idx ];\n\t\t}\n\t\t// Trivial case where we have all negative strides...\n\t\tif ( this._iterationOrder === -1 ) {\n\t\t\tif ( this._accessors ) {\n\t\t\t\treturn this._buffer.get( this.offset-idx );\n\t\t\t}\n\t\t\treturn this._buffer[ this._offset-idx ];\n\t\t}\n\t}\n\t// The approach which follows is to resolve a view index to its subscripts and then plug the subscripts into the standard formula for computing the linear index in the underlying data buffer...\n\tshape = this._shape;\n\tstrides = this._strides;\n\tind = this._offset;\n\tif ( this._order === 'column-major' ) {\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\ts = idx % shape[ i ];\n\t\t\tidx -= s;\n\t\t\tidx /= shape[ i ];\n\t\t\tind += s * strides[ i ];\n\t\t}\n\t\tif ( this._accessors ) {\n\t\t\treturn this._buffer.get( ind );\n\t\t}\n\t\treturn this._buffer[ ind ];\n\t}\n\t// Case: row-major\n\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\ts = idx % shape[ i ];\n\t\tidx -= s;\n\t\tidx /= shape[ i ];\n\t\tind += s * strides[ i ];\n\t}\n\tif ( this._accessors ) {\n\t\treturn this._buffer.get( ind );\n\t}\n\treturn this._buffer[ ind ];\n}\n\n\n// EXPORTS //\n\nmodule.exports = iget;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Sets an array element located a specified linear view index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the first, and only, argument should be the value to set.\n*\n* @private\n* @param {integer} [idx] - linear view index\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*/\nfunction iset( idx, v ) {\n\t/* eslint-disable no-invalid-this */\n\tvar strides;\n\tvar shape;\n\tvar ndims;\n\tvar ind;\n\tvar s;\n\tvar i;\n\n\tndims = this._ndims;\n\tif ( ndims === 0 ) {\n\t\tif ( this._accessors ) {\n\t\t\tthis._buffer.set( idx, this._offset );\n\t\t} else {\n\t\t\tthis._buffer[ this._offset ] = idx;\n\t\t}\n\t\treturn this;\n\t}\n\tif ( this._flags.ROW_MAJOR_CONTIGUOUS || this._flags.COLUMN_MAJOR_CONTIGUOUS ) { // eslint-disable-line max-len\n\t\t// Trivial case where we have all positive strides...\n\t\tif ( this._iterationOrder === 1 ) {\n\t\t\tif ( this._accessors ) {\n\t\t\t\tthis._buffer.set( v, this._offset+idx );\n\t\t\t} else {\n\t\t\t\tthis._buffer[ this._offset+idx ] = v;\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\t// Trivial case where we have all negative strides...\n\t\tif ( this._iterationOrder === -1 ) {\n\t\t\tif ( this._accessors ) {\n\t\t\t\tthis._buffer.set( v, this._offset-idx );\n\t\t\t} else {\n\t\t\t\tthis._buffer[ this._offset-idx ] = v;\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t}\n\t// The approach which follows is to resolve a view index to its subscripts and then plug the subscripts into the standard formula for computing the linear index in the underlying data buffer...\n\tshape = this._shape;\n\tstrides = this._strides;\n\tind = this._offset;\n\tif ( this._order === 'column-major' ) {\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\ts = idx % shape[ i ];\n\t\t\tidx -= s;\n\t\t\tidx /= shape[ i ];\n\t\t\tind += s * strides[ i ];\n\t\t}\n\t\tif ( this._accessors ) {\n\t\t\tthis._buffer.set( v, ind );\n\t\t} else {\n\t\t\tthis._buffer[ ind ] = v;\n\t\t}\n\t\treturn this;\n\t}\n\t// Case: row-major\n\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\ts = idx % shape[ i ];\n\t\tidx -= s;\n\t\tidx /= shape[ i ];\n\t\tind += s * strides[ i ];\n\t}\n\tif ( this._accessors ) {\n\t\tthis._buffer.set( v, ind );\n\t} else {\n\t\tthis._buffer[ ind ] = v;\n\t}\n\treturn this;\n}\n\n\n// EXPORTS //\n\nmodule.exports = iset;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @private\n* @param {...integer} [idx] - indices\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*/\nfunction set() {\n\t/* eslint-disable no-invalid-this */\n\tvar idx;\n\tvar i;\n\n\tidx = this._offset;\n\tfor ( i = 0; i < arguments.length-1; i++ ) {\n\t\tidx += this._strides[ i ] * arguments[ i ];\n\t}\n\tif ( this._accessors ) {\n\t\tthis._buffer.set( arguments[ i ], idx );\n\t} else {\n\t\tthis._buffer[ idx ] = arguments[ i ];\n\t}\n\treturn this;\n}\n\n\n// EXPORTS //\n\nmodule.exports = set;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @private\n* @param {...integer} idx - indices\n* @returns {*} array element\n*/\nfunction get() {\n\t/* eslint-disable no-invalid-this */\n\tvar idx;\n\tvar i;\n\n\tidx = this._offset;\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\tidx += this._strides[ i ] * arguments[ i ];\n\t}\n\tif ( this._accessors ) {\n\t\treturn this._buffer.get( idx );\n\t}\n\treturn this._buffer[ idx ];\n}\n\n\n// EXPORTS //\n\nmodule.exports = get;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar real = require( '@stdlib/complex/real' );\nvar imag = require( '@stdlib/complex/imag' );\n\n\n// MAIN //\n\n/**\n* Serializes an ndarray as a JSON object.\n*\n* ## Notes\n*\n* - The method does **not** serialize data outside of the buffer region defined by the array configuration.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out;\n\tvar len;\n\tvar v;\n\tvar i;\n\n\tlen = this._length;\n\n\t// Build an object containing all ndarray properties needed to revive a serialized ndarray...\n\tout = {};\n\tout.type = 'ndarray';\n\tout.dtype = this.dtype;\n\tout.flags = {\n\t\t'READONLY': this._flags.READONLY\n\t};\n\tout.order = this._order;\n\tout.shape = this._shape.slice();\n\tout.strides = this._strides.slice();\n\n\t// Flip the signs of negative strides:\n\tfor ( i = 0; i < len; i++ ) {\n\t\tif ( out.strides[ i ] < 0 ) {\n\t\t\tout.strides[ i ] *= -1;\n\t\t}\n\t}\n\t// Cast data to generic array...\n\tout.data = [];\n\tif ( out.dtype === 'complex64' || out.dtype === 'complex128' ) {\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tv = this.iget( i );\n\t\t\tout.data.push( real( v ), imag( v ) );\n\t\t}\n\t} else {\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tout.data.push( this.iget( i ) );\n\t\t}\n\t}\n\treturn out;\n\n\t/* eslint-enable no-invalid-this */\n}\n\n\n// EXPORTS //\n\nmodule.exports = toJSON;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar replace = require( '@stdlib/string/replace' );\nvar real = require( '@stdlib/complex/real' );\nvar imag = require( '@stdlib/complex/imag' );\n\n\n// VARIABLES //\n\nvar CTORS = {\n\t'int8': 'new Int8Array( [ {{data}} ] )',\n\t'uint8': 'new Uint8Array( [ {{data}} ] )',\n\t'uint8c': 'new Uint8ClampedArray( [ {{data}} ] )',\n\t'int16': 'new Int16Array( [ {{data}} ] )',\n\t'uint16': 'new Uint16Array( [ {{data}} ] )',\n\t'int32': 'new Int32Array( [ {{data}} ] )',\n\t'uint32': 'new Uint32Array( [ {{data}} ] )',\n\t'float32': 'new Float32Array( [ {{data}} ] )',\n\t'float64': 'new Float64Array( [ {{data}} ] )',\n\t'generic': '[ {{data}} ]',\n\t'binary': 'new Buffer( [ {{data}} ] )',\n\t'complex64': 'new Complex64Array( [ {{data}} ] )',\n\t'complex128': 'new Complex128Array( [ {{data}} ] )'\n};\n\n\n// MAIN //\n\n/**\n* Serializes an ndarray as a string.\n*\n* ## Notes\n*\n* - The method does **not** serialize data outside of the buffer region defined by the array configuration.\n*\n* @private\n* @returns {string} string representation\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar buffer;\n\tvar ndims;\n\tvar ctor;\n\tvar str;\n\tvar dt;\n\tvar v;\n\tvar i;\n\n\tndims = this._shape.length;\n\tdt = this._dtype;\n\n\t// Function to invoke to create an ndarray:\n\tstr = 'ndarray( \\''+dt+'\\', ';\n\n\t// Data buffer parameter...\n\tbuffer = '';\n\tif ( this._length <= 100 ) {\n\t\tif ( dt === 'complex64' || dt === 'complex128' ) {\n\t\t\tfor ( i = 0; i < this._length; i++ ) {\n\t\t\t\tv = this.iget( i );\n\t\t\t\tbuffer += real( v ) + ', ' + imag( v );\n\t\t\t\tif ( i < this._length-1 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i = 0; i < this._length; i++ ) {\n\t\t\t\tbuffer += this.iget( i );\n\t\t\t\tif ( i < this._length-1 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// First three values...\n\t\tif ( dt === 'complex64' || dt === 'complex128' ) {\n\t\t\tfor ( i = 0; i < 3; i++ ) {\n\t\t\t\tv = this.iget( i );\n\t\t\t\tbuffer += real( v ) + ', ' + imag( v );\n\t\t\t\tif ( i < 2 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i = 0; i < 3; i++ ) {\n\t\t\t\tbuffer += this.iget( i );\n\t\t\t\tif ( i < 2 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbuffer += ', ..., ';\n\n\t\t// Last three values...\n\t\tif ( dt === 'complex64' || dt === 'complex128' ) {\n\t\t\tfor ( i = 2; i >= 0; i-- ) {\n\t\t\t\tv = this.iget( this._length-1-i );\n\t\t\t\tbuffer += real( v ) + ', ' + imag( v );\n\t\t\t\tif ( i > 0 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i = 2; i >= 0; i-- ) {\n\t\t\t\tbuffer += this.iget( this._length-1-i );\n\t\t\t\tif ( i > 0 ) {\n\t\t\t\t\tbuffer += ', ';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tctor = CTORS[ this.dtype ];\n\tstr += replace( ctor, '{{data}}', buffer );\n\tstr += ', ';\n\n\t// Array shape...\n\tif ( ndims === 0 ) {\n\t\tstr += '[]';\n\t} else {\n\t\tstr += '[ ' + this._shape.join( ', ' ) + ' ]';\n\t}\n\tstr += ', ';\n\n\t// Stride array...\n\tstr += '[ ';\n\tif ( ndims === 0 ) {\n\t\tstr += '0';\n\t} else {\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\tif ( this._strides[ i ] < 0 ) {\n\t\t\t\tstr += -this._strides[ i ];\n\t\t\t} else {\n\t\t\t\tstr += this._strides[ i ];\n\t\t\t}\n\t\t\tif ( i < ndims-1 ) {\n\t\t\t\tstr += ', ';\n\t\t\t}\n\t\t}\n\t}\n\tstr += ' ]';\n\tstr += ', ';\n\n\t// Buffer offset:\n\tstr += '0';\n\tstr += ', ';\n\n\t// Order:\n\tstr += '\\'' + this._order + '\\'';\n\n\t// Close the function call:\n\tstr += ' )';\n\treturn str;\n\n\t/* eslint-enable no-invalid-this */\n}\n\n\n// EXPORTS //\n\nmodule.exports = toString;\n", "[\n\t\"throw\",\n\t\"clamp\",\n\t\"wrap\"\n]\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar MODES = require( './modes.json' );\n\n\n// MAIN //\n\n/**\n* Returns a list of ndarray index modes.\n*\n* @returns {StringArray} list of ndarray index modes\n*\n* @example\n* var list = modes();\n* // returns [ 'throw', 'clamp', 'wrap' ]\n*/\nfunction modes() {\n\treturn MODES.slice();\n}\n\n\n// EXPORTS //\n\nmodule.exports = modes;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an object mapping supported index modes to integer values for purposes of C inter-operation.\n*\n* ## Notes\n*\n* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `throw == 1`). Instead, the object should be used in an opaque manner.\n* - The main purpose of this function is JavaScript and C inter-operation of ndarray objects.\n*\n* @returns {Object} object mapping supported index modes to integer values\n*\n* @example\n* var table = enumerated();\n* // returns \n*/\nfunction enumerated() {\n\t// NOTE: the following should match the C `index_modes.h` enumeration!!!!\n\treturn {\n\t\t'throw': 1,\n\t\t'clamp': 2,\n\t\t'wrap': 3\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = enumerated;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a list of ndarray index modes.\n*\n* @module @stdlib/ndarray/index-modes\n*\n* @example\n* var modes = require( '@stdlib/ndarray/index-modes' );\n*\n* var list = modes();\n* // returns [ 'throw', 'clamp', 'wrap' ]\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar modes = require( './main.js' );\nvar enumeration = require( './enum.js' );\n\n\n// MAIN //\n\nsetReadOnly( modes, 'enum', enumeration );\n\n\n// EXPORTS //\n\nmodule.exports = modes;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar IS_LITTLE_ENDIAN = require( '@stdlib/assert/is-little-endian' );\nvar ArrayBuffer = require( '@stdlib/array/buffer' );\nvar DataView = require( '@stdlib/array/dataview' );\nvar BigInt = require( '@stdlib/bigint/ctor' );\nvar dtypes = require( './../../../dtypes' ).enum;\nvar orders = require( './../../../orders' ).enum;\nvar modes = require( './../../../index-modes' ).enum;\n\n\n// VARIABLES //\n\nvar DTYPES = dtypes();\nvar ORDERS = orders();\nvar MODES = modes();\n\n\n// FUNCTIONS //\n\n/**\n* Serializes ndarray meta data to a `DataView`.\n*\n* ## Notes\n*\n* - This function takes into account ndarray-like objects which may support index modes.\n*\n* - This function defaults to returning cached serialized meta data. To force serialization, set the private `__meta_dataview__` property to `null`.\n*\n* - Serialization is performed according to host byte order (endianness).\n*\n* - Meta data format:\n*\n* ```text\n* | endianness (1 byte) | (2 bytes) | (8 bytes) | (ndims*8 bytes) | (ndims*8 bytes) | (8 bytes) | (1 byte) | (1 byte) | (8 bytes) | (nsubmodes*1 bytes) | (4 bytes) |\n* ```\n*\n* which translates to the following `ArrayBuffer` layout:\n*\n* ```text\n* ArrayBuffer[\n* [int8],\n* [int16],\n* [int64],\n* [ndims*int64],\n* [ndims*int64],\n* [int64],\n* [int8],\n* [int8],\n* [int64],\n* [nsubmodes*int8],\n* [int32]\n* ]\n* ```\n*\n* where `strides` and `offset` are in units of bytes.\n*\n* - If the endianness is `1`, the byte order is little endian. If the endianness is `0`, the byte order is big endian.\n*\n* - Buffer length:\n*\n* ```text\n* 1 + 2 + 8 + (ndims*8) + (ndims*8) + 8 + 1 + 1 + 8 + (nsubmodes*1) + 4 = 33 + (ndims*16) + nsubmodes\n* ```\n*\n* For example, consider a three-dimensional ndarray with one subscript index mode (submode):\n*\n* ```text\n* 33 + (3*16) + 1 = 82 bytes\n* ```\n*\n* - Views:\n*\n* - endianness: `Int8Array( buf, 0, 1 )`\n* - dtype: `Int16Array( buf, 1, 1 )`\n* - ndims: `Int64Array( buf, 3, 1 )`\n* - shape: `Int64Array( buf, 11, ndims )`\n* - strides: `Int64Array( buf, 11+(ndims*8), ndims )`\n* - offset: `Int64Array( buf, 11+(ndims*16), 1 )`\n* - order: `Int8Array( buf, 19+(ndims*16), 1 )`\n* - mode: `Int8Array( buf, 20+(ndims*16), 1 )`\n* - nsubmodes: `Int64Array( buf, 21+(ndims*16), 1 )`\n* - submodes: `Int8Array( buf, 29+(ndims*16), nsubmodes )`\n* - flags: `Int32Array( buf, 29+(ndims*16)+nsubmodes, 1 )`\n*\n* @private\n* @returns {DataView} serialized meta data\n*/\nfunction meta2dataview() {\n\t/* eslint-disable no-invalid-this */\n\tvar nbytes;\n\tvar flgs;\n\tvar len;\n\tvar dt;\n\tvar sh;\n\tvar st;\n\tvar sm;\n\tvar v;\n\tvar m;\n\tvar o;\n\tvar s;\n\tvar N;\n\tvar M;\n\tvar i;\n\n\tm = this._mode || 'throw';\n\tsm = this._submode || [ m ];\n\tN = this._ndims;\n\tM = sm.length;\n\n\t// Compute the amount of memory we need to allocate for storing meta data:\n\tlen = 33 + (N*16) + M;\n\n\t// Check if we've already serialized ndarray meta data and can reuse an already allocated array buffer...\n\tv = this.__meta_dataview__;\n\tif ( v && v.byteLength === len ) { // Note: the byte length check is only a bare minimum sanity check, as cached contents may still be \"stale\" (e.g., shape and/or strides may have changed)\n\t\treturn v;\n\t}\n\t// Allocate raw memory and create a view for interfacing with the allocated memory:\n\tv = new DataView( new ArrayBuffer( len ) );\n\n\t// Retrieve ndarray meta data:\n\tsh = this._shape;\n\tst = this._strides;\n\tdt = this._dtype;\n\tnbytes = this._bytesPerElement;\n\n\t// Endianness: (byteoffset: 0; bytelength: 1)\n\to = 0;\n\tv.setInt8( o, ( IS_LITTLE_ENDIAN ) ? 1 : 0 );\n\n\t// Data type: (byteoffset: 1; bytelength: 2)\n\to += 1;\n\tv.setInt16( o, DTYPES[ dt ], IS_LITTLE_ENDIAN );\n\n\t// Number of dimensions: (byteoffset: 3; bytelength: 8)\n\to += 2;\n\tv.setBigInt64( o, BigInt( N ), IS_LITTLE_ENDIAN );\n\n\t// Shape and strides: (byteoffset: 11 and 11+(ndims*8), respectively; bytelength: ndims*8 for both shape and strides, and, thus, ndims*16 total)\n\ts = N * 8; // stride length between a dimension (shape[i]) and its associated stride\n\to += 8;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv.setBigInt64( o, BigInt( sh[i] ), IS_LITTLE_ENDIAN );\n\t\tv.setBigInt64( o+s, BigInt( st[i]*nbytes ), IS_LITTLE_ENDIAN );\n\t\to += 8;\n\t}\n\t// Offset: (byteoffset: 11+(ndims*16); bytelength: 8)\n\to += s;\n\tv.setBigInt64( o, BigInt( this._offset*nbytes ), IS_LITTLE_ENDIAN );\n\n\t// Order: (byteoffset: 19+(ndims*16); bytelength: 1)\n\to += 8;\n\tv.setInt8( o, ORDERS[ this._order ] );\n\n\t// Mode: (byteoffset: 20+(ndims*16); bytelength: 1)\n\to += 1;\n\tv.setInt8( o, MODES[ m ] );\n\n\t// Number of submodes: (byteoffset: 21+(ndims*16); bytelength: 8)\n\to += 1;\n\tv.setBigInt64( o, BigInt( M ), IS_LITTLE_ENDIAN );\n\n\t// Submodes: (byteoffset: 29+(ndims*16); bytelength: nsubmodes*1)\n\to += 8;\n\tfor ( i = 0; i < M; i++ ) {\n\t\tv.setInt8( o, MODES[ sm[i] ] );\n\t\to += 1;\n\t}\n\t// Flags: (byteoffset: 29+(ndims*16)+nsubmodes; bytelength: 4)\n\tflgs = 0|0;\n\tflgs |= ( this._flags.READONLY ) ? 4 : 0; // 00000000 00000000 00000000 00000100\n\tv.setInt32( o, flgs, IS_LITTLE_ENDIAN );\n\n\t// Cache the serialized meta data:\n\tthis.__meta_dataview__ = v;\n\n\treturn v;\n\n\t/* eslint-enable no-invalid-this */\n}\n\n\n// EXPORTS //\n\nmodule.exports = meta2dataview;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar IS_LITTLE_ENDIAN = require( '@stdlib/assert/is-little-endian' );\nvar ArrayBuffer = require( '@stdlib/array/buffer' );\nvar DataView = require( '@stdlib/array/dataview' );\nvar Uint8Array = require( '@stdlib/array/uint8' );\nvar dtypes = require( './../../../dtypes' ).enum;\nvar orders = require( './../../../orders' ).enum;\nvar modes = require( './../../../index-modes' ).enum;\nvar float64ToInt64Bytes = require( '@stdlib/number/float64/base/to-int64-bytes' ).assign;\n\n\n// VARIABLES //\n\nvar DTYPES = dtypes();\nvar ORDERS = orders();\nvar MODES = modes();\n\n\n// FUNCTIONS //\n\n/**\n* Serializes ndarray meta data to a `DataView`.\n*\n* ## Notes\n*\n* - This function takes into account ndarray-like objects which may support index modes.\n*\n* - This function defaults to returning cached serialized meta data. To force serialization, set the private `__meta_dataview__` property to `null`.\n*\n* - Serialization is performed according to host byte order (endianness).\n*\n* - Meta data format:\n*\n* ```text\n* | endianness (1 byte) | (2 bytes) | (8 bytes) | (ndims*8 bytes) | (ndims*8 bytes) | (8 bytes) | (1 byte) | (1 byte) | (8 bytes) | (nsubmodes*1 bytes) | (4 bytes) |\n* ```\n*\n* which translates to the following `ArrayBuffer` layout:\n*\n* ```text\n* ArrayBuffer[\n* [int8],\n* [int16],\n* [int64],\n* [ndims*int64],\n* [ndims*int64],\n* [int64],\n* [int8],\n* [int8],\n* [int64],\n* [nsubmodes*int8],\n* [int32]\n* ]\n* ```\n*\n* where `strides` and `offset` are in units of bytes.\n*\n* - If the endianness is `1`, the byte order is little endian. If the endianness is `0`, the byte order is big endian.\n*\n* - Buffer length:\n*\n* ```text\n* 1 + 2 + 8 + (ndims*8) + (ndims*8) + 8 + 1 + 1 + 8 + (nsubmodes*1) + 4 = 33 + (ndims*16) + nsubmodes\n* ```\n*\n* For example, consider a three-dimensional ndarray with one subscript index mode (submode):\n*\n* ```text\n* 33 + (3*16) + 1 = 82 bytes\n* ```\n*\n* - Views:\n*\n* - endianness: `Int8Array( buf, 0, 1 )`\n* - dtype: `Int16Array( buf, 1, 1 )`\n* - ndims: `Int64Array( buf, 3, 1 )`\n* - shape: `Int64Array( buf, 11, ndims )`\n* - strides: `Int64Array( buf, 11+(ndims*8), ndims )`\n* - offset: `Int64Array( buf, 11+(ndims*16), 1 )`\n* - order: `Int8Array( buf, 19+(ndims*16), 1 )`\n* - mode: `Int8Array( buf, 20+(ndims*16), 1 )`\n* - nsubmodes: `Int64Array( buf, 21+(ndims*16), 1 )`\n* - submodes: `Int8Array( buf, 29+(ndims*16), nsubmodes )`\n* - flags: `Int32Array( buf, 29+(ndims*16)+nsubmodes, 1 )`\n*\n* @private\n* @returns {DataView} serialized meta data\n*/\nfunction meta2dataview() {\n\t/* eslint-disable no-invalid-this */\n\tvar nbytes;\n\tvar bytes;\n\tvar flgs;\n\tvar len;\n\tvar dt;\n\tvar sh;\n\tvar st;\n\tvar sm;\n\tvar v;\n\tvar m;\n\tvar o;\n\tvar s;\n\tvar N;\n\tvar M;\n\tvar i;\n\n\tm = this._mode || 'throw';\n\tsm = this._submode || [ m ];\n\tN = this._ndims;\n\tM = sm.length;\n\n\t// Compute the amount of memory we need to allocate for storing meta data:\n\tlen = 33 + (N*16) + M;\n\n\t// Check if we've already serialized ndarray meta data and can reuse an already allocated array buffer...\n\tv = this.__meta_dataview__;\n\tif ( v && v.byteLength === len ) { // Note: the byte length check is only a bare minimum sanity check, as cached contents may still be \"stale\" (e.g., shape and/or strides may have changed)\n\t\treturn v;\n\t}\n\t// Allocate raw memory and create views for interfacing with the allocated memory:\n\tv = new DataView( new ArrayBuffer( len ) );\n\tbytes = new Uint8Array( v.buffer );\n\n\t// Retrieve ndarray meta data:\n\tsh = this._shape;\n\tst = this._strides;\n\tdt = this._dtype;\n\tnbytes = this._bytesPerElement;\n\n\t// Endianness: (byteoffset: 0; bytelength: 1)\n\to = 0;\n\tv.setInt8( o, ( IS_LITTLE_ENDIAN ) ? 1 : 0 );\n\n\t// Data type: (byteoffset: 1; bytelength: 2)\n\to += 1;\n\tv.setInt16( o, DTYPES[ dt ], IS_LITTLE_ENDIAN );\n\n\t// Number of dimensions: (byteoffset: 3; bytelength: 8)\n\to += 2;\n\tfloat64ToInt64Bytes( N, bytes, 1, o );\n\n\t// Shape and strides: (byteoffset: 11 and 11+(ndims*8), respectively; bytelength: ndims*8 for both shape and strides, and, thus, ndims*16 total)\n\ts = N * 8; // stride length between a dimension (shape[i]) and its associated stride\n\to += 8;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tfloat64ToInt64Bytes( sh[i], bytes, 1, o );\n\t\tfloat64ToInt64Bytes( st[i]*nbytes, bytes, 1, o+s );\n\t\to += 8;\n\t}\n\t// Offset: (byteoffset: 11+(ndims*16); bytelength: 8)\n\to += s;\n\tfloat64ToInt64Bytes( this._offset*nbytes, bytes, 1, o );\n\n\t// Order: (byteoffset: 19+(ndims*16); bytelength: 1)\n\to += 8;\n\tv.setInt8( o, ORDERS[ this._order ] );\n\n\t// Mode: (byteoffset: 20+(ndims*16); bytelength: 1)\n\to += 1;\n\tv.setInt8( o, MODES[ m ] );\n\n\t// Number of submodes: (byteoffset: 21+(ndims*16); bytelength: 8)\n\to += 1;\n\tfloat64ToInt64Bytes( M, bytes, 1, o );\n\n\t// Submodes: (byteoffset: 29+(ndims*16); bytelength: nsubmodes*1)\n\to += 8;\n\tfor ( i = 0; i < M; i++ ) {\n\t\tv.setInt8( o, MODES[ sm[i] ] );\n\t\to += 1;\n\t}\n\t// Flags: (byteoffset: 29+(ndims*16)+nsubmodes; bytelength: 4)\n\tflgs = 0|0;\n\tflgs |= ( this._flags.READONLY ) ? 4 : 0; // 00000000 00000000 00000000 00000100\n\tv.setInt32( o, flgs, IS_LITTLE_ENDIAN );\n\n\t// Cache the serialized meta data:\n\tthis.__meta_dataview__ = v;\n\n\treturn v;\n\n\t/* eslint-enable no-invalid-this */\n}\n\n\n// EXPORTS //\n\nmodule.exports = meta2dataview;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-restricted-syntax, no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nvar hasBigIntSupport = require( '@stdlib/assert/has-bigint-support' );\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar setReadOnlyAccessor = require( '@stdlib/utils/define-nonenumerable-read-only-accessor' );\nvar bytesPerElement = require( './../../../base/bytes-per-element' );\nvar iterationOrder = require( './../../../base/iteration-order' );\nvar strides2order = require( './../../../base/strides2order' );\nvar Boolean = require( '@stdlib/boolean/ctor' );\nvar isColumnMajorContiguous = require( './is_column_major_contiguous.js' );\nvar isRowMajorContiguous = require( './is_row_major_contiguous.js' );\nvar isContiguous = require( './is_contiguous.js' );\nvar copyFlags = require( './copy_flags.js' );\nvar igetValue = require( './iget.js' );\nvar isetValue = require( './iset.js' );\nvar setValue = require( './set.js' );\nvar getValue = require( './get.js' );\nvar toJSON = require( './tojson.js' );\nvar toString = require( './tostring.js' ); // eslint-disable-line stdlib/no-redeclare\nvar meta2dataview = require( './meta2dataview.js' );\nvar meta2dataviewPolyfill = require( './meta2dataview.polyfill.js' );\n\n\n// MAIN //\n\n/**\n* ndarray constructor.\n*\n* ## Notes\n*\n* - To create a zero-dimensional array,\n*\n* ```javascript\n* var buffer = [ 1 ];\n* var shape = [];\n* var strides = [ 0 ];\n* var offset = 0;\n*\n* var out = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n* ```\n*\n* @constructor\n* @param {string} dtype - data type\n* @param {(ArrayLikeObject|TypedArray|Buffer)} buffer - data buffer\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - array strides\n* @param {NonNegativeInteger} offset - index offset\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var out = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*/\nfunction ndarray( dtype, buffer, shape, strides, offset, order ) {\n\tvar contiguous;\n\tvar nbytes;\n\tvar ord;\n\tvar len;\n\tvar i;\n\tif ( !(this instanceof ndarray) ) {\n\t\treturn new ndarray( dtype, buffer, shape, strides, offset, order );\n\t}\n\t// Compute the number of elements...\n\tlen = 1;\n\tfor ( i = 0; i < shape.length; i++ ) {\n\t\tlen *= shape[ i ];\n\t}\n\t// Compute the number of bytes...\n\tif ( buffer.BYTES_PER_ELEMENT ) {\n\t\tnbytes = buffer.BYTES_PER_ELEMENT * len;\n\t} else {\n\t\tnbytes = null;\n\t}\n\t// Set private properties...\n\tthis._byteLength = nbytes;\n\tthis._bytesPerElement = bytesPerElement( dtype );\n\tthis._buffer = buffer;\n\tthis._dtype = dtype;\n\tthis._length = len;\n\tthis._ndims = shape.length;\n\tthis._offset = offset;\n\tthis._order = order;\n\tthis._shape = shape;\n\tthis._strides = strides;\n\tthis._accessors = Boolean( buffer.get && buffer.set );\n\n\tthis._iterationOrder = iterationOrder( strides );\n\n\t// Determine if the array can be stored contiguously:\n\tcontiguous = isContiguous( len, shape, strides, offset, this._iterationOrder ); // eslint-disable-line max-len\n\n\t// Infer the array \"order\" from the stride array (this is supplementary to the `order` parameter):\n\tord = strides2order( strides );\n\n\tthis._flags = {\n\t\t'ROW_MAJOR_CONTIGUOUS': isRowMajorContiguous( ord, contiguous ),\n\t\t'COLUMN_MAJOR_CONTIGUOUS': isColumnMajorContiguous( ord, contiguous ),\n\t\t'READONLY': false\n\t};\n\n\t// Initialize a property for caching serialized meta data:\n\tthis.__meta_dataview__ = null;\n\n\treturn this;\n}\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof ndarray\n* @type {string}\n* @default 'ndarray'\n*\n* @example\n* var str = ndarray.name;\n* // returns 'ndarray'\n*/\nsetReadOnly( ndarray, 'name', 'ndarray' );\n\n/**\n* Size (in bytes) of the array (if known).\n*\n* @name byteLength\n* @memberof ndarray.prototype\n* @type {(NonNegativeInteger|null)}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var buffer = new Float64Array( [ 1, 2, 3, 4, 5, 6 ] );\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );\n*\n* var byteLength = x.byteLength;\n* // returns 48\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'byteLength', function get() {\n\treturn this._byteLength;\n});\n\n/**\n* Size (in bytes) of each array element (if known).\n*\n* @name BYTES_PER_ELEMENT\n* @memberof ndarray.prototype\n* @type {(PositiveInteger|null)}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var buffer = new Float64Array( [ 1, 2, 3, 4, 5, 6 ] );\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );\n*\n* var nbytes = x.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'BYTES_PER_ELEMENT', function get() {\n\treturn this._bytesPerElement;\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name data\n* @memberof ndarray.prototype\n* @type {(Array|TypedArray|Buffer)}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var data = x.data;\n* // returns [ 1, 2, 3, 4, 5, 6 ]\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'data', function get() {\n\treturn this._buffer;\n});\n\n/**\n* Underlying data type.\n*\n* @name dtype\n* @memberof ndarray.prototype\n* @type {string}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var dtype = x.dtype;\n* // returns 'generic'\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'dtype', function get() {\n\treturn this._dtype;\n});\n\n/**\n* Meta information, such as information concerning the memory layout of the array.\n*\n* @name flags\n* @memberof ndarray.prototype\n* @type {Object}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var flgs = x.flags;\n* // returns \n*/\nsetReadOnlyAccessor( ndarray.prototype, 'flags', function get() {\n\treturn copyFlags( this._flags );\n});\n\n/**\n* Length of the array.\n*\n* @name length\n* @memberof ndarray.prototype\n* @type {NonNegativeInteger}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var len = x.length;\n* // returns 6\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Number of dimensions.\n*\n* @name ndims\n* @memberof ndarray.prototype\n* @type {PositiveInteger}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var ndims = x.ndims;\n* // returns 2\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'ndims', function get() {\n\treturn this._ndims;\n});\n\n/**\n* Index offset which specifies the buffer index at which to start iterating over array elements.\n*\n* @name offset\n* @memberof ndarray.prototype\n* @type {NonNegativeInteger}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var o = x.offset;\n* // returns 0\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'offset', function get() {\n\treturn this._offset;\n});\n\n/**\n* Array order.\n*\n* ## Notes\n*\n* - The array order is either row-major (C-style) or column-major (Fortran-style).\n*\n* @name order\n* @memberof ndarray.prototype\n* @type {string}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var order = x.order;\n* // returns 'row-major'\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'order', function get() {\n\treturn this._order;\n});\n\n/**\n* Shape of the array.\n*\n* @name shape\n* @memberof ndarray.prototype\n* @type {NonNegativeIntegerArray}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var s = x.shape;\n* // returns [ 3, 2 ]\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'shape', function get() {\n\treturn this._shape.slice();\n});\n\n/**\n* Index strides which specify how to access data along corresponding array dimensions.\n*\n* @name strides\n* @memberof ndarray.prototype\n* @type {IntegerArray}\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var s = x.strides;\n* // returns [ 2, 1 ]\n*/\nsetReadOnlyAccessor( ndarray.prototype, 'strides', function get() {\n\treturn this._strides.slice();\n});\n\n/**\n* Returns an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @name get\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {...integer} [idx] - indices\n* @returns {*} array element\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.get( 1, 1 );\n* // returns 4\n*/\nsetReadOnly( ndarray.prototype, 'get', getValue );\n\n/**\n* Returns an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the input argument is ignored and, for clarity, should not be provided.\n*\n* @name iget\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {integer} [idx] - linear index\n* @returns {*} array element\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.iget( 3 );\n* // returns 4\n*/\nsetReadOnly( ndarray.prototype, 'iget', igetValue );\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @name set\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {...integer} [idx] - indices\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.get( 1, 1 );\n* // returns 4\n*\n* x.set( 1, 1, 10 );\n*\n* var b = x.data;\n* // returns [ 1, 2, 3, 10, 5, 6 ]\n*\n* v = x.get( 1, 1 );\n* // returns 10\n*/\nsetReadOnly( ndarray.prototype, 'set', setValue );\n\n/**\n* Sets an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the first, and only, argument should be the value to set.\n*\n* @name iset\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {integer} [idx] - linear index\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.iget( 3 );\n* // returns 4\n*\n* x.iset( 3, 10 );\n*\n* var b = x.data;\n* // returns [ 1, 2, 3, 10, 5, 6 ]\n*\n* v = x.iget( 3 );\n* // returns 10\n*/\nsetReadOnly( ndarray.prototype, 'iset', isetValue );\n\n/**\n* Serializes an ndarray as a string.\n*\n* ## Notes\n*\n* - The method does **not** serialize data outside of the buffer region defined by the array configuration.\n*\n* @name toString\n* @memberof ndarray.prototype\n* @type {Function}\n* @returns {string} serialized ndarray\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6, 7, 8 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 2;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var str = x.toString();\n* // returns \"ndarray( 'generic', [ 3, 4, 5, 6, 7, 8 ], [ 3, 2 ], [ 2, 1 ], 0, 'row-major' )\"\n*/\nsetReadOnly( ndarray.prototype, 'toString', toString );\n\n/**\n* Serializes an ndarray as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying an `ndarray` instance.\n* - The method does **not** serialize data outside of the buffer region defined by the array configuration.\n*\n* @name toJSON\n* @memberof ndarray.prototype\n* @type {Function}\n* @returns {Object} serialized ndarray\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6, 7, 8 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 2;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var o = x.toJSON();\n* // e.g., returns { 'type': 'ndarray', 'dtype': 'generic', 'flags': {...}, 'offset': 0, 'order': 'row-major', 'shape': [ 3, 2 ], 'strides': [ 2, 1 ], 'data': [ 3, 4, 5, 6, 7, 8 ] }\n*/\nsetReadOnly( ndarray.prototype, 'toJSON', toJSON );\n\n/**\n* Serializes ndarray meta data to a `DataView`.\n*\n* ## Notes\n*\n* - Meta data format:\n*\n* ```text\n* | (1 byte) | (2 bytes) | (8 bytes) | (ndims*8 bytes) | (ndims*8 bytes) | (8 bytes) | (1 byte) | (1 byte) | (8 bytes) | (nsubmodes*1 bytes) | (4 bytes) |\n* ```\n*\n* where `strides` and `offset` are in units of bytes.\n*\n* - If the endianness is `1`, the byte order is little endian. If the endianness is `0`, the byte order is big endian.\n*\n* - Serialization is performed according to host byte order (endianness).\n*\n* - Consumers of this method should treat the returned `DataView` as **immutable**. Otherwise, mutation can invalidate meta data and potentially affect other consumers.\n*\n* @private\n* @name __array_meta_dataview__\n* @memberof ndarray.prototype\n* @type {Function}\n* @returns {DataView} serialized meta data\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6, 7, 8 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 2;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var dv = x.__array_meta_dataview__();\n* // returns \n*/\nsetReadOnly( ndarray.prototype, '__array_meta_dataview__', ( hasBigIntSupport() ) ? meta2dataview : meta2dataviewPolyfill );\n\n\n// EXPORTS //\n\nmodule.exports = ndarray;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Multidimensional array constructor.\n*\n* @module @stdlib/ndarray/base/ctor\n*\n* @example\n* var ndarray = require( '@stdlib/ndarray/base/ctor' );\n*\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var out = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' );\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns default ndarray settings.\n*\n* @returns {Object} defaults\n*\n* @example\n* var o = defaults();\n* // returns {...}\n*/\nfunction defaults() {\n\treturn {\n\t\t// Data types:\n\t\t'dtypes': {\n\t\t\t'default': 'float64',\n\t\t\t'numeric': 'float64',\n\t\t\t'real': 'float64',\n\t\t\t'floating_point': 'float64',\n\t\t\t'real_floating_point': 'float64',\n\t\t\t'complex_floating_point': 'complex128',\n\t\t\t'integer': 'int32',\n\t\t\t'signed_integer': 'int32',\n\t\t\t'unsigned_integer': 'uint32'\n\t\t},\n\n\t\t// Memory layout:\n\t\t'order': 'row-major',\n\n\t\t// Casting mode:\n\t\t'casting': 'safe',\n\n\t\t// Index mode:\n\t\t'index_mode': 'throw'\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = defaults;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar defaults = require( './main.js' );\n\n\n// VARIABLES //\n\nvar DEFAULTS = defaults();\nvar HASH = {\n\t'dtypes.default': DEFAULTS.dtypes.default,\n\t'dtypes.numeric': DEFAULTS.dtypes.numeric,\n\t'dtypes.real': DEFAULTS.dtypes.real,\n\t'dtypes.floating_point': DEFAULTS.dtypes.floating_point,\n\t'dtypes.real_floating_point': DEFAULTS.dtypes.real_floating_point,\n\t'dtypes.complex_floating_point': DEFAULTS.dtypes.complex_floating_point,\n\t'dtypes.integer': DEFAULTS.dtypes.integer,\n\t'dtypes.signed_integer': DEFAULTS.dtypes.signed_integer,\n\t'dtypes.unsigned_integer': DEFAULTS.dtypes.unsigned_integer,\n\t'order': DEFAULTS.order,\n\t'casting': DEFAULTS.casting,\n\t'index_mode': DEFAULTS.index_mode\n};\n\n\n// MAIN //\n\n/**\n* Returns a default ndarray setting.\n*\n* @param {string} name - setting name\n* @returns {*} default setting or null\n*\n* @example\n* var v = get( 'dtypes.default' );\n* // returns \n*/\nfunction get( name ) {\n\tvar v = HASH[ name ];\n\treturn ( v === void 0 ) ? null : v;\n}\n\n\n// EXPORTS //\n\nmodule.exports = get;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return default ndarray settings.\n*\n* @module @stdlib/ndarray/defaults\n*\n* @example\n* var defaults = require( '@stdlib/ndarray/defaults' );\n*\n* var o = defaults();\n* // returns {...}\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar get = require( './get.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'get', get );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Restricts an index to the interval `[0,max]`.\n*\n* @param {integer} idx - index\n* @param {NonNegativeInteger} max - maximum index\n* @returns {NonNegativeInteger} index\n*\n* @example\n* var idx = clampIndex( -1, 10 );\n* // returns 0\n*\n* idx = clampIndex( 15, 10 );\n* // returns 10\n*\n* idx = clampIndex( 5, 10 );\n* // returns 5\n*/\nfunction clampIndex( idx, max ) {\n\tif ( idx < 0 ) {\n\t\treturn 0;\n\t}\n\tif ( idx > max ) {\n\t\treturn max;\n\t}\n\treturn idx;\n}\n\n\n// EXPORTS //\n\nmodule.exports = clampIndex;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Restrict an index to the interval `[0,max]`.\n*\n* @module @stdlib/ndarray/base/clamp-index\n*\n* @example\n* var clampIndex = require( '@stdlib/ndarray/base/clamp-index' );\n*\n* var idx = clampIndex( -1, 10 );\n* // returns 0\n*\n* idx = clampIndex( 15, 10 );\n* // returns 10\n*\n* idx = clampIndex( 5, 10 );\n* // returns 5\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Wraps an index on the interval `[0,max]`.\n*\n* @param {integer} idx - index\n* @param {NonNegativeInteger} max - maximum index\n* @returns {NonNegativeInteger} index\n*\n* @example\n* var idx = wrapIndex( -1, 10 );\n* // returns 10\n*\n* idx = wrapIndex( 13, 10 );\n* // returns 2\n*\n* idx = wrapIndex( 6, 10 );\n* // returns 6\n*/\nfunction wrapIndex( idx, max ) {\n\tvar mp1 = max + 1;\n\tif ( idx < 0 ) {\n\t\tidx += mp1; // slight optimization to avoid modulo arithmetic when |idx| <= max+1\n\t\tif ( idx < 0 ) {\n\t\t\tidx %= mp1;\n\t\t\tif ( idx !== 0 ) {\n\t\t\t\tidx += mp1;\n\t\t\t}\n\t\t}\n\t\treturn idx;\n\t}\n\tif ( idx > max ) {\n\t\tidx -= mp1; // slight optimization to avoid modulo arithmetic when max+1 < idx <= 2*(max+1)\n\t\tif ( idx > max ) {\n\t\t\tidx %= mp1;\n\t\t}\n\t\treturn idx;\n\t}\n\treturn idx;\n}\n\n\n// EXPORTS //\n\nmodule.exports = wrapIndex;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Wrap an index on the interval `[0,max]`.\n*\n* @module @stdlib/ndarray/base/wrap-index\n*\n* @example\n* var wrapIndex = require( '@stdlib/ndarray/base/wrap-index' );\n*\n* var idx = wrapIndex( -1, 10 );\n* // returns 10\n*\n* idx = wrapIndex( 14, 10 );\n* // returns 3\n*\n* idx = wrapIndex( 6, 10 );\n* // returns 6\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar clampIndex = require( './../../../base/clamp-index' );\nvar wrapIndex = require( './../../../base/wrap-index' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns an index given an index mode.\n*\n* @param {integer} idx - index\n* @param {NonNegativeInteger} max - maximum index\n* @param {string} mode - specifies how to handle an index outside the interval `[0,max]`\n* @throws {RangeError} index out-of-bounds\n* @returns {integer} index\n*\n* @example\n* var idx = ind( 2, 9, 'clamp' );\n* // returns 2\n*\n* idx = ind( 10, 9, 'clamp' );\n* // returns 9\n*\n* idx = ind( -1, 9, 'clamp' );\n* // returns 0\n*\n* @example\n* var idx = ind( 2, 9, 'wrap' );\n* // returns 2\n*\n* idx = ind( 10, 9, 'wrap' );\n* // returns 0\n*\n* idx = ind( -1, 9, 'wrap' );\n* // returns 9\n*\n* @example\n* var idx = ind( 2, 9, 'throw' );\n* // returns 2\n*\n* idx = ind( 10, 9, 'throw' );\n* // throws \n*\n* idx = ind( -1, 9, 'throw' );\n* // throws \n*/\nfunction ind( idx, max, mode ) {\n\tif ( mode === 'clamp' ) {\n\t\treturn clampIndex( idx, max );\n\t}\n\tif ( mode === 'wrap' ) {\n\t\treturn wrapIndex( idx, max );\n\t}\n\tif ( idx < 0 || idx > max ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index must be on the interval: [0, %d]. Value: `%d`.', max, idx ) );\n\t}\n\treturn idx;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ind;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return an index given an index mode.\n*\n* @module @stdlib/ndarray/base/ind\n*\n* @example\n* var ind = require( '@stdlib/ndarray/base/ind' );\n*\n* var idx = ind( -1, 10, 'wrap' );\n* // returns 10\n*\n* idx = ind( 14, 10, 'wrap' );\n* // returns 3\n*\n* idx = ind( 6, 10, 'wrap' );\n* // returns 6\n*\n* @example\n* var ind = require( '@stdlib/ndarray/base/ind' );\n*\n* var idx = ind( -1, 10, 'clamp' );\n* // returns 0\n*\n* idx = ind( 14, 10, 'clamp' );\n* // returns 10\n*\n* idx = ind( 6, 10, 'clamp' );\n* // returns 6\n*\n* @example\n* var ind = require( '@stdlib/ndarray/base/ind' );\n*\n* var idx = ind( 1, 10, 'throw' );\n* // returns 1\n*\n* idx = ind( 14, 10, 'throw' );\n* // throws \n*\n* idx = ind( -1, 10, 'throw' );\n* // throws \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nvar isInteger = require( '@stdlib/assert/is-integer' ).isPrimitive;\nvar getIndex = require( './../../base/ind' );\nvar parent = require( './../../base/ctor' ); // eslint-disable-line stdlib/no-redeclare\nvar format = require( '@stdlib/string/format' );\n\n\n// VARIABLES //\n\nvar base = parent.prototype.iget;\n\n\n// MAIN //\n\n/**\n* Returns an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the input argument is ignored and, for clarity, should not be provided.\n*\n* @private\n* @param {integer} [idx] - linear view index\n* @throws {TypeError} index must be an integer\n* @throws {RangeError} index exceeds array dimensions\n* @returns {*} array element\n*/\nfunction iget( idx ) {\n\tif ( this._ndims > 0 ) {\n\t\tif ( !isInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index must be an integer. Value: `%s`.', idx ) );\n\t\t}\n\t\tidx = getIndex( idx, this._length-1, this._mode );\n\t\treturn base.call( this, idx );\n\t}\n\treturn base.call( this );\n}\n\n\n// EXPORTS //\n\nmodule.exports = iget;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-invalid-this */\n\n'use strict';\n\n// METHODS //\n\nvar isInteger = require( '@stdlib/assert/is-integer' ).isPrimitive;\nvar getIndex = require( './../../base/ind' );\nvar parent = require( './../../base/ctor' ); // eslint-disable-line stdlib/no-redeclare\nvar format = require( '@stdlib/string/format' );\n\n\n// VARIABLES //\n\nvar base = parent.prototype.iset;\n\n\n// MAIN //\n\n/**\n* Sets an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the first, and only, argument should be the value to set.\n*\n* @private\n* @param {integer} [idx] - linear view index\n* @param {*} v - value to set\n* @throws {Error} cannot write to a read-only array\n* @throws {TypeError} index must be an integer\n* @throws {RangeError} index exceeds array dimensions\n* @returns {ndarray} ndarray instance\n*/\nfunction iset( idx, v ) {\n\tif ( this._flags.READONLY ) {\n\t\tthrow new Error( 'invalid invocation. Cannot write to a read-only array.' );\n\t}\n\tif ( this._ndims > 0 ) {\n\t\tif ( !isInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index must be an integer. Value: `%s`.', idx ) );\n\t\t}\n\t\tidx = getIndex( idx, this._length-1, this._mode );\n\t\tbase.call( this, idx, v );\n\t} else {\n\t\tbase.call( this, idx );\n\t}\n\treturn this;\n}\n\n\n// EXPORTS //\n\nmodule.exports = iset;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nvar isInteger = require( '@stdlib/assert/is-integer' ).isPrimitive;\nvar getIndex = require( './../../base/ind' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @private\n* @param {...integer} [idx] - indices\n* @throws {TypeError} provided indices must be integer valued\n* @throws {RangeError} index exceeds array dimensions\n* @throws {RangeError} number of indices must equal the number of dimensions\n* @returns {*} array element\n*/\nfunction get() {\n\tvar idx;\n\tvar ind;\n\tvar M;\n\tvar i;\n\n\tif ( arguments.length !== this._ndims ) {\n\t\tthrow new RangeError( format( 'invalid arguments. Number of indices must match the number of dimensions. ndims: `%u`. nargs: `%u`.', this._ndims, arguments.length ) );\n\t}\n\tidx = this._offset;\n\tM = this._submode.length;\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\tif ( !isInteger( arguments[ i ] ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Indices must be integer valued. Argument: `%u`. Value: `%s`.', i, arguments[ i ] ) );\n\t\t}\n\t\tind = getIndex( arguments[ i ], this._shape[ i ]-1, this._submode[ i%M ] ); // eslint-disable-line max-len\n\t\tidx += this._strides[ i ] * ind;\n\t}\n\tif ( this._accessors ) {\n\t\treturn this._buffer.get( idx );\n\t}\n\treturn this._buffer[ idx ];\n}\n\n\n// EXPORTS //\n\nmodule.exports = get;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nvar isInteger = require( '@stdlib/assert/is-integer' ).isPrimitive;\nvar getIndex = require( './../../base/ind' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @private\n* @param {...integer} [idx] - indices\n* @param {*} v - value to set\n* @throws {Error} cannot write to a read-only array\n* @throws {TypeError} provided indices must be integer valued\n* @throws {RangeError} index exceeds array dimensions\n* @throws {RangeError} number of indices must equal the number of dimensions\n* @returns {ndarray} ndarray instance\n*/\nfunction set() {\n\tvar idx;\n\tvar ind;\n\tvar M;\n\tvar i;\n\n\tif ( this._flags.READONLY ) {\n\t\tthrow new Error( 'invalid invocation. Cannot write to a read-only array.' );\n\t}\n\tif ( arguments.length !== this._ndims+1 ) {\n\t\tthrow new RangeError( format( 'invalid arguments. Number of indices must match the number of dimensions. ndims: `%u`. nargs: `%u`.', this._ndims, arguments.length ) );\n\t}\n\tidx = this._offset;\n\tM = this._submode.length;\n\tfor ( i = 0; i < arguments.length-1; i++ ) {\n\t\tif ( !isInteger( arguments[ i ] ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Indices must be integer valued. Argument: `%i`. Value: `%s`.', i, arguments[ i ] ) );\n\t\t}\n\t\tind = getIndex( arguments[ i ], this._shape[ i ]-1, this._submode[ i%M ] ); // eslint-disable-line max-len\n\t\tidx += this._strides[ i ] * ind;\n\t}\n\tif ( this._accessors ) {\n\t\tthis._buffer.set( arguments[ i ], idx );\n\t} else {\n\t\tthis._buffer[ idx ] = arguments[ i ];\n\t}\n\treturn this;\n}\n\n\n// EXPORTS //\n\nmodule.exports = set;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Copies the contents of array-like value to a new array.\n*\n* @private\n* @param {ArrayLike} arr - input array\n* @param {NonNegativeInteger} len - array length\n* @returns {Array} output array\n*\n* @example\n* var arr = [ 1.0, 2.0, 3.0 ];\n*\n* var out = copy( arr, arr.length );\n* // returns [ 1.0, 2.0, 3.0 ]\n*\n* var bool = ( arr === out );\n* // returns false\n*/\nfunction copy( arr, len ) {\n\tvar out;\n\tvar i;\n\n\tout = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tout.push( arr[ i ] );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = copy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar modes = require( './../../../../index-modes' );\n\n\n// VARIABLES //\n\nvar MODES = modes();\nvar len = MODES.length;\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray index mode.\n*\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray index mode\n*\n* @example\n* var bool = isIndexMode( 'wrap' );\n* // returns true\n*\n* bool = isIndexMode( 'clamp' );\n* // returns true\n*\n* bool = isIndexMode( 'throw' );\n* // returns true\n*\n* bool = isIndexMode( 'foo' );\n* // returns false\n*/\nfunction isIndexMode( v ) {\n\tvar i;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tif ( v === MODES[ i ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nmodule.exports = isIndexMode;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test whether an input value is a supported ndarray index mode.\n*\n* @module @stdlib/ndarray/base/assert/is-index-mode\n*\n* @example\n* var isIndexMode = require( '@stdlib/ndarray/base/assert/is-index-mode' );\n*\n* var bool = isIndexMode( 'wrap' );\n* // returns true\n*\n* bool = isIndexMode( 'clamp' );\n* // returns true\n*\n* bool = isIndexMode( 'throw' );\n* // returns true\n*\n* bool = isIndexMode( 'foo' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isObject = require( '@stdlib/assert/is-plain-object' );\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar isArray = require( '@stdlib/assert/is-array' );\nvar isIndexMode = require( './../../base/assert/is-index-mode' );\nvar isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Validates function options.\n*\n* @private\n* @param {Object} opts - destination object\n* @param {Options} options - function options\n* @param {string} [options.mode] - specifies how to handle indices which exceed array dimensions\n* @param {string} [options.submode] - specifies how to handle subscripts which exceed array dimensions\n* @param {boolean} [options.readonly] - boolean indicating whether an array should be read-only\n* @returns {(Error|null)} null or an error object\n*\n* @example\n* var opts = {};\n* var options = {\n* 'mode': 'clamp',\n* 'submode': [ 'throw', 'wrap', 'clamp' ]\n* };\n* var err = validate( opts, options );\n* if ( err ) {\n* throw err;\n* }\n*/\nfunction validate( opts, options ) {\n\tvar i;\n\tif ( !isObject( options ) ) {\n\t\treturn new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t}\n\tif ( hasOwnProp( options, 'mode' ) ) {\n\t\topts.mode = options.mode;\n\t\tif ( !isIndexMode( opts.mode ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a recognized mode. Option: `%s`.', 'mode', opts.mode ) );\n\t\t}\n\t}\n\tif ( hasOwnProp( options, 'submode' ) ) {\n\t\topts.submode = options.submode;\n\t\tif ( !isArray( opts.submode ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.', 'submode', opts.submode ) );\n\t\t}\n\t\tif ( opts.submode.length === 0 ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.', 'submode', opts.submode.join( ',' ) ) );\n\t\t}\n\t\tfor ( i = 0; i < opts.submode.length; i++ ) {\n\t\t\tif ( !isIndexMode( opts.submode[ i ] ) ) {\n\t\t\t\treturn new TypeError( format( 'invalid option. Each submode must be a recognized mode. Option: `%s`.', opts.submode[ i ] ) );\n\t\t\t}\n\t\t}\n\t\topts.submode = opts.submode.slice();\n\t}\n\tif ( hasOwnProp( options, 'readonly' ) ) {\n\t\topts.readonly = options.readonly;\n\t\tif ( !isBoolean( opts.readonly ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'readonly', opts.readonly ) );\n\t\t}\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = validate;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable no-invalid-this */\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar isCollection = require( '@stdlib/assert/is-collection' );\nvar isNonNegativeIntegerArray = require( '@stdlib/assert/is-nonnegative-integer-array' ).primitives;\nvar isNonNegativeInteger = require( '@stdlib/assert/is-nonnegative-integer' ).isPrimitive;\nvar isIntegerArray = require( '@stdlib/assert/is-integer-array' ).primitives;\nvar isFunction = require( '@stdlib/assert/is-function' );\nvar isOrder = require( './../../base/assert/is-order' );\nvar isDataType = require( './../../base/assert/is-data-type' );\nvar isBufferLengthCompatible = require( './../../base/assert/is-buffer-length-compatible' );\nvar numel = require( './../../base/numel' );\nvar parent = require( './../../base/ctor' ); // eslint-disable-line stdlib/no-redeclare\nvar defaults = require( './../../defaults' );\nvar inherit = require( '@stdlib/utils/inherit' );\nvar format = require( '@stdlib/string/format' );\nvar iget = require( './iget.js' );\nvar iset = require( './iset.js' );\nvar get = require( './get.js' );\nvar set = require( './set.js' );\nvar copy = require( './copy_array.js' );\nvar validate = require( './validate.js' );\n\n\n// VARIABLES //\n\n/*\n* See the following references:\n*\n* - https://stackoverflow.com/questions/22747068/is-there-a-max-number-of-arguments-javascript-functions-can-accept\n* - https://bugs.webkit.org/show_bug.cgi?id=80797\n* - https://github.com/numpy/numpy/issues/5744\n*\n* Note that the maximum number of function arguments can vary from engine to engine. Here, we choose something of a lowest common denominator which may **not** be valid everywhere.\n*/\nvar MAX_DIMS = 32767|0;\n\nvar INDEX_MODE = defaults.get( 'index_mode' );\nvar READONLY = false;\n\n\n// MAIN //\n\n/**\n* ndarray constructor.\n*\n* @constructor\n* @param {string} dtype - data type\n* @param {Collection} buffer - data buffer\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - array strides\n* @param {NonNegativeInteger} offset - index offset\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {Options} [options] - function options\n* @param {string} [options.mode=\"throw\"] - specifies how to handle indices which exceed array dimensions\n* @param {StringArray} [options.submode=[\"throw\"]] - specifies how to handle subscripts which exceed array dimensions on a per dimension basis\n* @param {boolean} [options.readonly=false] - boolean indicating whether an array should be read-only\n* @throws {TypeError} `dtype` argument must be a supported ndarray data type\n* @throws {TypeError} `buffer` argument must be an array-like object, typed-array-like, or a Buffer\n* @throws {TypeError} `buffer` argument `get` and `set` properties must be functions\n* @throws {TypeError} `shape` argument must be an array-like object containing nonnegative integers\n* @throws {Error} `shape` argument length must equal the number of dimensions\n* @throws {TypeError} `strides` argument must be an array-like object containing integers\n* @throws {Error} `strides` argument length must equal the number of dimensions (except for zero-dimensional arrays; in which case, the `strides` argument length must be equal to `1`)\n* @throws {Error} for zero-dimensional ndarrays, the `strides` argument must contain a single element equal to `0`\n* @throws {TypeError} `offset` argument must be a nonnegative integer\n* @throws {TypeError} `order` argument must be a supported ndarray order\n* @throws {Error} `buffer` argument must be compatible with specified meta data\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {RangeError} too many dimensions\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var out = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*/\nfunction ndarray( dtype, buffer, shape, strides, offset, order, options ) {\n\tvar ndims;\n\tvar opts;\n\tvar err;\n\tvar sh;\n\tvar st;\n\n\tif ( !(this instanceof ndarray) ) {\n\t\tif ( arguments.length < 7 ) {\n\t\t\treturn new ndarray( dtype, buffer, shape, strides, offset, order );\n\t\t}\n\t\treturn new ndarray( dtype, buffer, shape, strides, offset, order, options ); // eslint-disable-line max-len\n\t}\n\tif ( !isDataType( dtype ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a supported ndarray data type. Value: `%s`.', dtype ) );\n\t}\n\tif ( !isCollection( buffer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an array-like object, typed-array-like, or a Buffer. Value: `%s`.', buffer ) );\n\t} else if ( buffer.get && buffer.set && ( !isFunction( buffer.get ) || !isFunction( buffer.set ) ) ) { // eslint-disable-line max-len\n\t\tthrow new TypeError( format( 'invalid argument. Second argument `get` and `set` properties must be functions. Value: `%s`.', buffer ) );\n\t}\n\tif ( !isNonNegativeIntegerArray( shape ) ) {\n\t\tif ( !isCollection( shape) || shape.length > 0 ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an array-like object containing nonnegative integers. Value: `%s`.', shape ) );\n\t\t}\n\t}\n\tndims = shape.length;\n\tif ( ndims > MAX_DIMS ) {\n\t\tthrow new RangeError( format( 'invalid argument. Number of dimensions must not exceed %u due to stack limits. Value: `%u`.', MAX_DIMS, ndims ) );\n\t}\n\tif ( !isIntegerArray( strides ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Fourth argument must be an array-like object containing integers. Value: `%s`.', strides ) );\n\t}\n\tif ( ndims > 0 ) {\n\t\tif ( strides.length !== ndims ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Fourth argument length must match the number of dimensions. Expected number of dimensions: `%u`. Strides length: `%u`.', ndims, strides.length ) );\n\t\t}\n\t} else if ( strides.length !== 1 ) {\n\t\tthrow new RangeError( 'invalid argument. Fourth argument length must be equal to 1 when creating a zero-dimensional ndarray.' );\n\t} else if ( strides[ 0 ] !== 0 ) {\n\t\tthrow new RangeError( format( 'invalid argument. Fourth argument must contain a single element equal to 0. Value: `%d`.', strides[ 0 ] ) );\n\t}\n\tif ( !isNonNegativeInteger( offset ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Fifth argument must be a nonnegative integer. Value: `%s`.', offset ) );\n\t}\n\tif ( !isOrder( order ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Sixth argument must be a supported order. Value: `%s`.', order ) );\n\t}\n\tif ( ndims > 0 && !isBufferLengthCompatible( buffer.length, shape, strides, offset ) && numel( shape ) > 0 ) { // eslint-disable-line max-len\n\t\tthrow new Error( 'invalid arguments. Input buffer is incompatible with the specified meta data. Ensure that the offset is valid with regard to the strides array and that the buffer has enough elements to satisfy the desired array shape.' );\n\t}\n\topts = {};\n\topts.mode = INDEX_MODE;\n\topts.readonly = READONLY;\n\tif ( arguments.length > 6 ) {\n\t\terr = validate( opts, options );\n\t\tif ( err ) {\n\t\t\tthrow err;\n\t\t}\n\t}\n\tthis._mode = opts.mode;\n\tif ( opts.submode === void 0 ) {\n\t\topts.submode = [ this._mode ];\n\t}\n\tthis._submode = opts.submode;\n\n\t// Copy `shape` and `strides` to prevent external mutation:\n\tsh = copy( shape, ndims );\n\tst = copy( strides, ndims || 1 );\n\n\t// Call the parent constructor:\n\tparent.call( this, dtype, buffer, sh, st, offset, order );\n\tthis._flags.READONLY = opts.readonly;\n\n\treturn this;\n\n\t/* eslint-enable no-invalid-this */\n}\n\n// Inherit from the parent constructor:\ninherit( ndarray, parent );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof ndarray\n* @type {string}\n* @default 'ndarray'\n*\n* @example\n* var str = ndarray.name;\n* // returns 'ndarray'\n*/\nsetReadOnly( ndarray, 'name', 'ndarray' );\n\n/**\n* Returns an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @name get\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {...integer} [idx] - indices\n* @returns {*} array element\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.get( 1, 1 );\n* // returns 4\n*/\nsetReadOnly( ndarray.prototype, 'get', get );\n\n/**\n* Returns an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the input argument is ignored and, for clarity, should not be provided.\n*\n* @name iget\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {integer} [idx] - linear index\n* @returns {*} array element\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.iget( 3 );\n* // returns 4\n*/\nsetReadOnly( ndarray.prototype, 'iget', iget );\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - The number of indices should **equal** the number of dimensions. Accordingly, for zero-dimensional arrays, no indices should be provided.\n*\n* @name set\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {...integer} [idx] - indices\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.get( 1, 1 );\n* // returns 4\n*\n* x.set( 1, 1, 10 );\n*\n* var b = x.data;\n* // returns [ 1, 2, 3, 10, 5, 6 ]\n*\n* v = x.get( 1, 1 );\n* // returns 10\n*/\nsetReadOnly( ndarray.prototype, 'set', set );\n\n/**\n* Sets an array element located at a specified linear index.\n*\n* ## Notes\n*\n* - For zero-dimensional arrays, the first, and only, argument should be the value to set.\n*\n* @name iset\n* @memberof ndarray.prototype\n* @type {Function}\n* @param {integer} [idx] - linear index\n* @param {*} v - value to set\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var buffer = [ 1, 2, 3, 4, 5, 6 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*\n* var v = x.iget( 3 );\n* // returns 4\n*\n* x.iset( 3, 10 );\n*\n* var b = x.data;\n* // returns [ 1, 2, 3, 10, 5, 6 ]\n*\n* v = x.iget( 3 );\n* // returns 10\n*/\nsetReadOnly( ndarray.prototype, 'iset', iset );\n\n\n// EXPORTS //\n\nmodule.exports = ndarray;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Multidimensional array constructor.\n*\n* @module @stdlib/ndarray/ctor\n*\n* @example\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n*\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var out = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "[\n\t\"none\",\n\t\"equiv\",\n\t\"safe\",\n\t\"same-kind\",\n\t\"unsafe\"\n]\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar MODES = require( './modes.json' );\n\n\n// MAIN //\n\n/**\n* Returns a list of ndarray casting modes.\n*\n* @returns {StringArray} list of ndarray casting modes\n*\n* @example\n* var list = modes();\n* // returns [ 'none', 'equiv', 'safe', 'same-kind', 'unsafe' ]\n*/\nfunction modes() {\n\treturn MODES.slice();\n}\n\n\n// EXPORTS //\n\nmodule.exports = modes;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an object mapping supported casting modes to integer values for purposes of C inter-operation.\n*\n* ## Notes\n*\n* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `NO_CASTING == 0`). Instead, the object should be used in an opaque manner.\n* - The main purpose of this function is JavaScript and C inter-operation of ndarray objects.\n*\n* @returns {Object} object mapping supported casting modes to integer values\n*\n* @example\n* var table = enumerated();\n* // returns \n*/\nfunction enumerated() {\n\t// NOTE: the following should match the C `casting_modes.h` enumeration!!!!\n\treturn {\n\t\t'none': 0,\n\t\t'equiv': 1,\n\t\t'safe': 2,\n\t\t'same-kind': 3,\n\t\t'unsafe': 4\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = enumerated;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a list of ndarray casting modes.\n*\n* @module @stdlib/ndarray/casting-modes\n*\n* @example\n* var modes = require( '@stdlib/ndarray/casting-modes' );\n*\n* var list = modes();\n* // returns [ 'none', 'equiv', 'safe', 'same-kind', 'unsafe' ]\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar modes = require( './main.js' );\nvar enumeration = require( './enum.js' );\n\n\n// MAIN //\n\nsetReadOnly( modes, 'enum', enumeration );\n\n\n// EXPORTS //\n\nmodule.exports = modes;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar modes = require( './../../../../casting-modes' );\n\n\n// VARIABLES //\n\nvar MODES = modes();\nvar len = MODES.length;\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray casting mode.\n*\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray casting mode\n*\n* @example\n* var bool = isCastingMode( 'none' );\n* // returns true\n*\n* bool = isCastingMode( 'equiv' );\n* // returns true\n*\n* bool = isCastingMode( 'safe' );\n* // returns true\n*\n* bool = isCastingMode( 'same-kind' );\n* // returns true\n*\n* bool = isCastingMode( 'unsafe' );\n* // returns true\n*\n* bool = isCastingMode( 'foo' );\n* // returns false\n*/\nfunction isCastingMode( v ) {\n\tvar i;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tif ( v === MODES[ i ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nmodule.exports = isCastingMode;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test whether an input value is a supported ndarray casting mode.\n*\n* @module @stdlib/ndarray/base/assert/is-casting-mode\n*\n* @example\n* var isCastingMode = require( '@stdlib/ndarray/base/assert/is-casting-mode' );\n*\n* var bool = isCastingMode( 'none' );\n* // returns true\n*\n* bool = isCastingMode( 'equiv' );\n* // returns true\n*\n* bool = isCastingMode( 'safe' );\n* // returns true\n*\n* bool = isCastingMode( 'same-kind' );\n* // returns true\n*\n* bool = isCastingMode( 'unsafe' );\n* // returns true\n*\n* bool = isCastingMode( 'foo' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar objectInverse = require( '@stdlib/utils/object-inverse' );\nvar enumeration = require( './../../../dtypes' ).enum;\n\n\n// VARIABLES //\n\nvar hash = objectInverse( enumeration(), {\n\t'duplicates': false\n});\n\n\n// MAIN //\n\n/**\n* Returns the data type string associated with an ndarray data type enumeration constant.\n*\n* @param {integer} dtype - data type enumeration constant\n* @returns {(string|null)} data type string or null\n*\n* @example\n* var str2enum = require( '@stdlib/ndarray/base/dtype-str2enum' );\n*\n* var v = str2enum( 'float64' );\n* // returns \n*\n* var dt = enum2str( v );\n* // returns 'float64'\n*/\nfunction enum2str( dtype ) {\n\tvar v = hash[ dtype ];\n\treturn ( typeof v === 'string' ) ? v : null; // note: we include this guard to prevent walking the prototype chain\n}\n\n\n// EXPORTS //\n\nmodule.exports = enum2str;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the data type string associated with an ndarray data type enumeration constant.\n*\n* @module @stdlib/ndarray/base/dtype-enum2str\n*\n* @example\n* var str2enum = require( '@stdlib/ndarray/base/dtype-str2enum' );\n* var enum2str = require( '@stdlib/ndarray/base/dtype-enum2str' );\n*\n* var v = str2enum( 'float64' );\n* // returns \n*\n* var dt = enum2str( v );\n* // returns 'float64'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar enumeration = require( './../../../dtypes' ).enum;\n\n\n// VARIABLES //\n\nvar ENUM = enumeration();\n\n\n// MAIN //\n\n/**\n* Returns the enumeration constant associated with an ndarray data type string.\n*\n* ## Notes\n*\n* - Downstream consumers of this function should **not** rely on specific integer values (e.g., `INT8 == 0`). Instead, the function should be used in an opaque manner.\n*\n* @param {string} dtype - data type string\n* @returns {(integer|null)} integer value or null\n*\n* @example\n* var v = str2enum( 'int8' );\n* // returns \n*/\nfunction str2enum( dtype ) {\n\tvar v = ENUM[ dtype ];\n\treturn ( typeof v === 'number' ) ? v : null; // note: we include this guard to prevent walking the prototype chain\n}\n\n\n// EXPORTS //\n\nmodule.exports = str2enum;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the enumeration constant associated with an ndarray data type string.\n*\n* @module @stdlib/ndarray/base/dtype-str2enum\n*\n* @example\n* var str2enum = require( '@stdlib/ndarray/base/dtype-str2enum' );\n*\n* var v = str2enum( 'float64' );\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar enum2str = require( './../../../base/dtype-enum2str' );\nvar str2enum = require( './../../../base/dtype-str2enum' );\n\n\n// MAIN //\n\n/**\n* Returns the data type string associated with a supported ndarray data type value.\n*\n* @param {*} dtype - data type value\n* @returns {(string|null)} data type string or null\n*\n* @example\n* var str2enum = require( '@stdlib/ndarray/base/dtype-str2enum' );\n*\n* var v = resolve( str2enum( 'float64' ) );\n* // returns 'float64'\n*/\nfunction resolve( dtype ) {\n\tvar t = ( typeof dtype );\n\tif ( t === 'string' ) {\n\t\treturn ( str2enum( dtype ) === null ) ? null : dtype;\n\t}\n\tif ( t === 'number' ) {\n\t\treturn enum2str( dtype );\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = resolve;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the data type string associated with a supported ndarray data type value.\n*\n* @module @stdlib/ndarray/base/dtype-resolve-str\n*\n* @example\n* var str2enum = require( '@stdlib/ndarray/base/dtype-str2enum' );\n* var resolve = require( '@stdlib/ndarray/base/dtype-resolve-str' );\n*\n* var v = resolve( str2enum( 'float64' ) );\n* // returns 'float64'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "{\n\t\"float64\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 0,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 0,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"float32\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"int32\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 0,\n\t\t\"int32\": 1,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 0,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"int16\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 1,\n\t\t\"int16\": 1,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"int8\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 1,\n\t\t\"int16\": 1,\n\t\t\"int8\": 1,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"uint32\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 0,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 1,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 0,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"uint16\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 1,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 1,\n\t\t\"uint16\": 1,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"uint8\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 1,\n\t\t\"int16\": 1,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 1,\n\t\t\"uint16\": 1,\n\t\t\"uint8\": 1,\n\t\t\"uint8c\": 1,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"uint8c\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 1,\n\t\t\"int16\": 1,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 1,\n\t\t\"uint16\": 1,\n\t\t\"uint8\": 1,\n\t\t\"uint8c\": 1,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"complex128\": {\n\t\t\"float64\": 0,\n\t\t\"float32\": 0,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 0,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"complex64\": {\n\t\t\"float64\": 0,\n\t\t\"float32\": 0,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"generic\": {\n\t\t\"float64\": 0,\n\t\t\"float32\": 0,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 0,\n\t\t\"complex64\": 0,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"binary\": {\n\t\t\"float64\": 0,\n\t\t\"float32\": 0,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 0,\n\t\t\"complex64\": 0,\n\t\t\"binary\": 1,\n\t\t\"generic\": 0\n\t}\n}\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar objectKeys = require( '@stdlib/utils/keys' );\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar resolve = require( './../../base/dtype-resolve-str' );\nvar SAFE_CASTS = require( './safe_casts.json' );\n\n\n// VARIABLES //\n\nvar TABLE;\n\n\n// FUNCTIONS //\n\n/**\n* Generates a full table of safe casts for each ndarray data type.\n*\n* @private\n* @returns {Object} table\n*/\nfunction generateFullTable() {\n\tvar dtypes;\n\tvar ntypes;\n\tvar out;\n\tvar tmp;\n\tvar dt1;\n\tvar dt2;\n\tvar o;\n\tvar j;\n\tvar i;\n\n\tout = {};\n\tdtypes = objectKeys( SAFE_CASTS );\n\tntypes = dtypes.length;\n\tfor ( i = 0; i < ntypes; i++ ) {\n\t\tdt1 = dtypes[ i ];\n\t\to = SAFE_CASTS[ dt1 ];\n\t\ttmp = {};\n\t\tfor ( j = 0; j < ntypes; j++ ) {\n\t\t\tdt2 = dtypes[ j ];\n\t\t\ttmp[ dt2 ] = o[ dt2 ];\n\t\t}\n\t\tout[ dt1 ] = tmp;\n\t}\n\treturn out;\n}\n\n/**\n* Generates a table of safe casts for each ndarray data type.\n*\n* @private\n* @returns {Object} table\n*/\nfunction generateTable() {\n\tvar dtypes;\n\tvar ntypes;\n\tvar out;\n\tvar tmp;\n\tvar dt1;\n\tvar dt2;\n\tvar o;\n\tvar j;\n\tvar i;\n\n\tout = {};\n\tdtypes = objectKeys( SAFE_CASTS );\n\tntypes = dtypes.length;\n\tfor ( i = 0; i < ntypes; i++ ) {\n\t\tdt1 = dtypes[ i ];\n\t\to = SAFE_CASTS[ dt1 ];\n\t\ttmp = [];\n\t\tfor ( j = 0; j < ntypes; j++ ) {\n\t\t\tdt2 = dtypes[ j ];\n\t\t\tif ( o[ dt2 ] === 1 ) {\n\t\t\t\ttmp.push( dt2 );\n\t\t\t}\n\t\t}\n\t\tout[ dt1 ] = tmp;\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Returns a list of ndarray data types to which a provided ndarray data type can be safely cast.\n*\n* @param {*} [dtype] - ndarray data type value\n* @returns {(Object|StringArray|null)} list of ndarray data types or null\n*\n* @example\n* var list = safeCasts( 'float32' );\n* // returns [...]\n*/\nfunction safeCasts( dtype ) {\n\tif ( arguments.length === 0 ) {\n\t\treturn generateFullTable();\n\t}\n\tif ( TABLE === void 0 ) {\n\t\t// Lazily generate table...\n\t\tTABLE = generateTable();\n\t}\n\tdtype = resolve( dtype );\n\tif ( hasOwnProp( TABLE, dtype ) ) {\n\t\treturn TABLE[ dtype ].slice();\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = safeCasts;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a list of ndarray data types to which a provided ndarray data type can be safely cast.\n*\n* @module @stdlib/ndarray/safe-casts\n*\n* @example\n* var safeCasts = require( '@stdlib/ndarray/safe-casts' );\n*\n* var list = safeCasts( 'float32' );\n* // returns [...]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar safeCasts = require( './../../../../safe-casts' );\n\n\n// VARIABLES //\n\nvar TABLE = safeCasts();\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a provided ndarray data type can be safely cast to another ndarray data type.\n*\n* @param {string} from - ndarray data type\n* @param {string} to - ndarray data type\n* @returns {boolean} boolean indicating if a data type can be safely cast to another data type\n*\n* @example\n* var bool = isSafeCast( 'float32', 'float64' );\n* // returns true\n*\n* bool = isSafeCast( 'float64', 'int32' );\n* // returns false\n*/\nfunction isSafeCast( from, to ) {\n\tif ( from === to ) {\n\t\treturn true;\n\t}\n\treturn ( TABLE[ from ][ to ] > 0 );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isSafeCast;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine if an ndarray data type can be safely cast to another ndarray data type.\n*\n* @module @stdlib/ndarray/base/assert/is-safe-data-type-cast\n*\n* @example\n* var isSafeCast = require( '@stdlib/ndarray/base/assert/is-safe-data-type-cast' );\n*\n* var bool = isSafeCast( 'float32', 'float64' );\n* // returns true\n*\n* bool = isSafeCast( 'float64', 'int32' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "{\n\t\"float64\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 0,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"float32\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"int32\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 0,\n\t\t\"int32\": 1,\n\t\t\"int16\": 1,\n\t\t\"int8\": 1,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 0,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"int16\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 1,\n\t\t\"int16\": 1,\n\t\t\"int8\": 1,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"int8\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 1,\n\t\t\"int16\": 1,\n\t\t\"int8\": 1,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"uint32\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 0,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 1,\n\t\t\"uint16\": 1,\n\t\t\"uint8\": 1,\n\t\t\"uint8c\": 1,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 0,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"uint16\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 1,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 1,\n\t\t\"uint16\": 1,\n\t\t\"uint8\": 1,\n\t\t\"uint8c\": 1,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"uint8\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 1,\n\t\t\"int16\": 1,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 1,\n\t\t\"uint16\": 1,\n\t\t\"uint8\": 1,\n\t\t\"uint8c\": 1,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"uint8c\": {\n\t\t\"float64\": 1,\n\t\t\"float32\": 1,\n\t\t\"int32\": 1,\n\t\t\"int16\": 1,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 1,\n\t\t\"uint16\": 1,\n\t\t\"uint8\": 1,\n\t\t\"uint8c\": 1,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"complex128\": {\n\t\t\"float64\": 0,\n\t\t\"float32\": 0,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 0\n\t},\n\t\"complex64\": {\n\t\t\"float64\": 0,\n\t\t\"float32\": 0,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 1,\n\t\t\"complex64\": 1,\n\t\t\"binary\": 0,\n\t\t\"generic\": 0\n\t},\n\t\"generic\": {\n\t\t\"float64\": 0,\n\t\t\"float32\": 0,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 0,\n\t\t\"complex64\": 0,\n\t\t\"binary\": 0,\n\t\t\"generic\": 1\n\t},\n\t\"binary\": {\n\t\t\"float64\": 0,\n\t\t\"float32\": 0,\n\t\t\"int32\": 0,\n\t\t\"int16\": 0,\n\t\t\"int8\": 0,\n\t\t\"uint32\": 0,\n\t\t\"uint16\": 0,\n\t\t\"uint8\": 0,\n\t\t\"uint8c\": 0,\n\t\t\"complex128\": 0,\n\t\t\"complex64\": 0,\n\t\t\"binary\": 1,\n\t\t\"generic\": 0\n\t}\n}\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar objectKeys = require( '@stdlib/utils/keys' );\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar resolve = require( './../../base/dtype-resolve-str' );\nvar SAME_KIND_CASTS = require( './same_kind_casts.json' );\n\n\n// VARIABLES //\n\nvar TABLE;\n\n\n// FUNCTIONS //\n\n/**\n* Generates a full table of same \"kind\" casts for each ndarray data type.\n*\n* @private\n* @returns {Object} table\n*/\nfunction generateFullTable() {\n\tvar dtypes;\n\tvar ntypes;\n\tvar out;\n\tvar tmp;\n\tvar dt1;\n\tvar dt2;\n\tvar o;\n\tvar j;\n\tvar i;\n\n\tout = {};\n\tdtypes = objectKeys( SAME_KIND_CASTS );\n\tntypes = dtypes.length;\n\tfor ( i = 0; i < ntypes; i++ ) {\n\t\tdt1 = dtypes[ i ];\n\t\to = SAME_KIND_CASTS[ dt1 ];\n\t\ttmp = {};\n\t\tfor ( j = 0; j < ntypes; j++ ) {\n\t\t\tdt2 = dtypes[ j ];\n\t\t\ttmp[ dt2 ] = o[ dt2 ];\n\t\t}\n\t\tout[ dt1 ] = tmp;\n\t}\n\treturn out;\n}\n\n/**\n* Generates a table of same \"kind\" casts for each ndarray data type.\n*\n* @private\n* @returns {Object} table\n*/\nfunction generateTable() {\n\tvar dtypes;\n\tvar ntypes;\n\tvar out;\n\tvar tmp;\n\tvar dt1;\n\tvar dt2;\n\tvar o;\n\tvar j;\n\tvar i;\n\n\tout = {};\n\tdtypes = objectKeys( SAME_KIND_CASTS );\n\tntypes = dtypes.length;\n\tfor ( i = 0; i < ntypes; i++ ) {\n\t\tdt1 = dtypes[ i ];\n\t\to = SAME_KIND_CASTS[ dt1 ];\n\t\ttmp = [];\n\t\tfor ( j = 0; j < ntypes; j++ ) {\n\t\t\tdt2 = dtypes[ j ];\n\t\t\tif ( o[ dt2 ] === 1 ) {\n\t\t\t\ttmp.push( dt2 );\n\t\t\t}\n\t\t}\n\t\tout[ dt1 ] = tmp;\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Returns a list of ndarray data types to which a provided ndarray data type can be safely cast or cast within the same \"kind\".\n*\n* @param {*} [dtype] - ndarray data type value\n* @returns {(Object|StringArray|null)} list of ndarray data types or null\n*\n* @example\n* var list = sameKindCasts( 'float32' );\n* // returns [...]\n*/\nfunction sameKindCasts( dtype ) {\n\tif ( arguments.length === 0 ) {\n\t\treturn generateFullTable();\n\t}\n\tif ( TABLE === void 0 ) {\n\t\t// Lazily generate table...\n\t\tTABLE = generateTable();\n\t}\n\tdtype = resolve( dtype );\n\tif ( hasOwnProp( TABLE, dtype ) ) {\n\t\treturn TABLE[ dtype ].slice();\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sameKindCasts;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a list of ndarray data types to which a provided ndarray data type can be safely cast or cast within the same \"kind\".\n*\n* @module @stdlib/ndarray/same-kind-casts\n*\n* @example\n* var sameKindCasts = require( '@stdlib/ndarray/same-kind-casts' );\n*\n* var list = sameKindCasts( 'float32' );\n* // returns [...]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar sameKindCasts = require( './../../../../same-kind-casts' );\n\n\n// VARIABLES //\n\nvar TABLE = sameKindCasts();\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a provided ndarray data type can be safely cast to, or is of the same \"kind\" as, another ndarray data type.\n*\n* @param {string} from - ndarray data type\n* @param {string} to - ndarray data type\n* @returns {boolean} boolean indicating if a data type can be cast to another data type\n*\n* @example\n* var bool = isSameKindCast( 'float32', 'float64' );\n* // returns true\n*\n* bool = isSameKindCast( 'uint16', 'int16' );\n* // returns false\n*/\nfunction isSameKindCast( from, to ) {\n\tif ( from === to ) {\n\t\treturn true;\n\t}\n\treturn ( TABLE[ from ][ to ] > 0 );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isSameKindCast;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine if an ndarray data type can be safely cast to, or is of the same \"kind\" as, another ndarray data type.\n*\n* @module @stdlib/ndarray/base/assert/is-same-kind-data-type-cast\n*\n* @example\n* var isSameKindCast = require( '@stdlib/ndarray/base/assert/is-same-kind-data-type-cast' );\n*\n* var bool = isSameKindCast( 'float32', 'float64' );\n* // returns true\n*\n* bool = isSameKindCast( 'uint16', 'int16' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isSafeCast = require( './../../../../base/assert/is-safe-data-type-cast' );\nvar isSameKindCast = require( './../../../../base/assert/is-same-kind-data-type-cast' );\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a provided ndarray data type can be cast to another ndarray data type according to a specified casting mode.\n*\n* @param {string} from - ndarray data type\n* @param {string} to - ndarray data type\n* @param {string} casting - ndarray casting mode\n* @returns {boolean} boolean indicating if a data type can be cast to another data type\n*\n* @example\n* var bool = isAllowedCast( 'float32', 'float64', 'safe' );\n* // returns true\n*\n* bool = isAllowedCast( 'float64', 'int32', 'safe' );\n* // returns false\n*/\nfunction isAllowedCast( from, to, casting ) {\n\t// Anything goes for \"unsafe\" casting...\n\tif ( casting === 'unsafe' ) {\n\t\treturn true;\n\t}\n\t// \"Casting\" to the same data type is always allowed, regardless of the casting mode...\n\tif ( from === to ) {\n\t\treturn true;\n\t}\n\t// No casts between different data types are allowed in \"none\" or \"equiv\" casting modes...\n\tif ( casting === 'none' || casting === 'equiv' ) {\n\t\treturn false;\n\t}\n\t// In \"safe\" casting mode, only casts which preserve values are allowed...\n\tif ( casting === 'safe' ) {\n\t\treturn isSafeCast( from, to );\n\t}\n\t// In \"same-kind\" casting mode, in addition to \"safe\" casts, casts within a \"kind\" (e.g., between signed integers or between floating-point numbers) are allowed...\n\treturn isSameKindCast( from, to );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isAllowedCast;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine if an array data type can be cast to another array data type according to a specified casting rule.\n*\n* @module @stdlib/ndarray/base/assert/is-allowed-data-type-cast\n*\n* @example\n* var isAllowedCast = require( '@stdlib/ndarray/base/assert/is-allowed-data-type-cast' );\n*\n* var bool = isAllowedCast( 'float32', 'float64', 'safe' );\n* // returns true\n*\n* bool = isAllowedCast( 'float64', 'int32', 'safe' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar Buffer = require( '@stdlib/buffer/ctor' );\nvar Float64Array = require( '@stdlib/array/float64' );\nvar Float32Array = require( '@stdlib/array/float32' );\nvar Int16Array = require( '@stdlib/array/int16' );\nvar Int32Array = require( '@stdlib/array/int32' );\nvar Int8Array = require( '@stdlib/array/int8' );\nvar Uint16Array = require( '@stdlib/array/uint16' );\nvar Uint32Array = require( '@stdlib/array/uint32' );\nvar Uint8Array = require( '@stdlib/array/uint8' );\nvar Uint8ClampedArray = require( '@stdlib/array/uint8c' );\nvar Complex64Array = require( '@stdlib/array/complex64' );\nvar Complex128Array = require( '@stdlib/array/complex128' );\n\n\n// MAIN //\n\n// Mapping from data types to underlying buffer constructors...\nvar ctors = {\n\t'binary': Buffer,\n\t'float64': Float64Array,\n\t'float32': Float32Array,\n\t'generic': Array, // TODO: replace with `stdlib` pkg\n\t'int16': Int16Array,\n\t'int32': Int32Array,\n\t'int8': Int8Array,\n\t'uint16': Uint16Array,\n\t'uint32': Uint32Array,\n\t'uint8': Uint8Array,\n\t'uint8c': Uint8ClampedArray,\n\t'complex64': Complex64Array,\n\t'complex128': Complex128Array\n};\n\n\n// EXPORTS //\n\nmodule.exports = ctors;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar table = require( './ctors.js' );\n\n\n// MAIN //\n\n/**\n* Returns an ndarray data buffer constructor.\n*\n* @param {string} dtype - data type\n* @returns {(Function|null)} data buffer constructor or null\n*\n* @example\n* var ctor = ctors( 'float64' );\n* // returns \n*\n* @example\n* var ctor = ctors( 'float' );\n* // returns null\n*/\nfunction ctors( dtype ) {\n\treturn table[ dtype ] || null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ctors;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* ndarray data buffer constructors.\n*\n* @module @stdlib/ndarray/base/buffer-ctors\n*\n* @example\n* var ctors = require( '@stdlib/ndarray/base/buffer-ctors' );\n*\n* var ctor = ctors( 'float64' );\n* // returns \n*\n* ctor = ctors( 'int' );\n* // returns null\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Fills an array-like object with zeros.\n*\n* @private\n* @param {(Array|TypedArray|Buffer)} v - array-like object to fill\n* @returns {(Array|TypedArray|Buffer)} input value\n*\n* @example\n* var arr = zeros( new Array( 2 ) );\n* // returns [ 0, 0 ]\n*/\nfunction zeros( v ) {\n\tvar i;\n\tfor ( i = 0; i < v.length; i++ ) {\n\t\tv[ i ] = 0;\n\t}\n\treturn v;\n}\n\n\n// EXPORTS //\n\nmodule.exports = zeros;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar bufferCtors = require( './../../../base/buffer-ctors' );\nvar allocUnsafe = require( '@stdlib/buffer/alloc-unsafe' );\nvar zeros = require( './zeros.js' );\n\n\n// FUNCTIONS //\n\n/**\n* Returns a zero-filled generic array.\n*\n* @private\n* @param {NonNegativeInteger} size - buffer size\n* @returns {Array} zero-filled generic array\n*/\nfunction generic( size ) {\n\tvar buf;\n\tvar i;\n\n\tbuf = [];\n\tfor ( i = 0; i < size; i++ ) {\n\t\tbuf.push( 0 );\n\t}\n\treturn buf;\n}\n\n/**\n* Returns a zero-filled binary buffer.\n*\n* @private\n* @param {NonNegativeInteger} size - buffer size\n* @returns {Buffer} zero-filled binary buffer\n*/\nfunction binary( size ) {\n\treturn zeros( allocUnsafe( size ) );\n}\n\n/**\n* Returns a zero-filled typed array.\n*\n* @private\n* @param {string} dtype - data type\n* @param {NonNegativeInteger} size - buffer size\n* @returns {(TypedArray|null)} zero-filled typed array\n*/\nfunction typedarray( dtype, size ) {\n\tvar ctor = bufferCtors( dtype );\n\tif ( ctor ) {\n\t\treturn new ctor( size );\n\t}\n\treturn null;\n}\n\n\n// MAIN //\n\n/**\n* Returns a zero-filled contiguous linear ndarray data buffer.\n*\n* @param {string} dtype - data type\n* @param {NonNegativeInteger} size - buffer size\n* @returns {(Array|TypedArray|Buffer|null)} data buffer\n*\n* @example\n* var buf = buffer( 'float64', 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*/\nfunction buffer( dtype, size ) {\n\tif ( dtype === 'generic' ) {\n\t\treturn generic( size );\n\t}\n\tif ( dtype === 'binary' ) {\n\t\treturn binary( size );\n\t}\n\treturn typedarray( dtype, size );\n}\n\n\n// EXPORTS //\n\nmodule.exports = buffer;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create a zero-filled contiguous linear ndarray data buffer.\n*\n* @module @stdlib/ndarray/base/buffer\n*\n* @example\n* var buffer = require( '@stdlib/ndarray/base/buffer' );\n*\n* var buf = buffer( 'float64', 3 );\n* // returns [ 0.0, 0.0, 0.0 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n// Mapping from ndarray data buffer constructors to data types...\nvar dtypes = {\n\t'Buffer': 'binary',\n\t'Float32Array': 'float32',\n\t'Float64Array': 'float64',\n\t'Array': 'generic',\n\t'Int16Array': 'int16',\n\t'Int32Array': 'int32',\n\t'Int8Array': 'int8',\n\t'Object': 'generic',\n\t'Uint16Array': 'uint16',\n\t'Uint32Array': 'uint32',\n\t'Uint8Array': 'uint8',\n\t'Uint8ClampedArray': 'uint8c',\n\t'Complex64Array': 'complex64',\n\t'Complex128Array': 'complex128'\n};\n\n\n// EXPORTS //\n\nmodule.exports = dtypes;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar Float64Array = require( '@stdlib/array/float64' );\nvar Float32Array = require( '@stdlib/array/float32' );\nvar Uint32Array = require( '@stdlib/array/uint32' );\nvar Int32Array = require( '@stdlib/array/int32' );\nvar Uint16Array = require( '@stdlib/array/uint16' );\nvar Int16Array = require( '@stdlib/array/int16' );\nvar Uint8Array = require( '@stdlib/array/uint8' );\nvar Uint8ClampedArray = require( '@stdlib/array/uint8c' );\nvar Int8Array = require( '@stdlib/array/int8' );\nvar Complex64Array = require( '@stdlib/array/complex64' );\nvar Complex128Array = require( '@stdlib/array/complex128' );\n\n\n// MAIN //\n\n// Note: order should match `dtypes` order\nvar CTORS = [\n\tFloat64Array,\n\tFloat32Array,\n\tInt32Array,\n\tUint32Array,\n\tInt16Array,\n\tUint16Array,\n\tInt8Array,\n\tUint8Array,\n\tUint8ClampedArray,\n\tComplex64Array,\n\tComplex128Array\n];\n\n\n// EXPORTS //\n\nmodule.exports = CTORS;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n// Note: order should match `ctors` order\nvar DTYPES = [\n\t'float64',\n\t'float32',\n\t'int32',\n\t'uint32',\n\t'int16',\n\t'uint16',\n\t'int8',\n\t'uint8',\n\t'uint8c',\n\t'complex64',\n\t'complex128'\n];\n\n\n// EXPORTS //\n\nmodule.exports = DTYPES;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isBuffer = require( '@stdlib/assert/is-buffer' );\nvar isArray = require( '@stdlib/assert/is-array' );\nvar constructorName = require( '@stdlib/utils/constructor-name' );\nvar ctor2dtype = require( './ctor2dtype.js' );\nvar CTORS = require( './ctors.js' );\nvar DTYPES = require( './dtypes.js' );\n\n\n// VARIABLES //\n\nvar NTYPES = DTYPES.length;\n\n\n// MAIN //\n\n/**\n* Returns the data type of an ndarray data buffer.\n*\n* @param {*} value - input value\n* @returns {(string|null)} data type\n*\n* @example\n* var dt = dtype( [ 1, 2, 3 ] );\n* // returns 'generic'\n*\n* var dt = dtype( 'beep' );\n* // returns null\n*/\nfunction dtype( value ) {\n\tvar i;\n\tif ( isArray( value ) ) {\n\t\treturn 'generic';\n\t}\n\tif ( isBuffer( value ) ) {\n\t\treturn 'binary';\n\t}\n\tfor ( i = 0; i < NTYPES; i++ ) {\n\t\tif ( value instanceof CTORS[ i ] ) {\n\t\t\treturn DTYPES[ i ];\n\t\t}\n\t}\n\t// If the above failed, fall back to a more robust (and significantly slower) means for resolving underlying data types:\n\treturn ctor2dtype[ constructorName( value ) ] || null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dtype;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the data type of an ndarray data buffer.\n*\n* @module @stdlib/ndarray/base/buffer-dtype\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dtype = require( '@stdlib/ndarray/base/buffer-dtype' );\n*\n* var buf = new Float64Array( 10 );\n*\n* var dt = dtype( buf );\n* // returns 'float64'\n*\n* dt = dtype( {} );\n* // returns 'generic'\n*\n* dt = dtype( 'beep' );\n* // returns null\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isDataType = require( './../../base/assert/is-data-type' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns the data type of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @throws {TypeError} must provide an ndarray having a supported data type\n* @returns {string} data type\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'dtype': 'float64'\n* });\n*\n* var dt = dtype( x );\n* // returns 'float64'\n*/\nfunction dtype( x ) {\n\tvar dt;\n\n\t// Note: we intentionally avoid rigorous ndarray checks to minimize performance impacts. This obviously means that non-ndarray-like objects can sneak through, but this is likely all right for the purposes of this function...\n\tif ( typeof x !== 'object' || x === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\tdt = x.dtype;\n\tif ( isDataType( dt ) ) {\n\t\treturn dt;\n\t}\n\t// A data type is essential for interpreting the memory associated with an ndarray object, so no fallbacks or workarounds for data type resolution...\n\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray having a supported data type. Value: `%s`.', dt ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = dtype;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the data type of a provided ndarray.\n*\n* @module @stdlib/ndarray/dtype\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var dtype = require( '@stdlib/ndarray/dtype' );\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'dtype': 'float64'\n* });\n*\n* var dt = dtype( x );\n* // returns 'float64'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isNonNegativeInteger = require( '@stdlib/assert/is-nonnegative-integer' ).isPrimitive;\nvar isCollection = require( '@stdlib/assert/is-collection' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns the shape of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @throws {TypeError} must provide an ndarray\n* @returns {NonNegativeIntegerArray} shape\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var out = shape( zeros( [ 3, 3, 3 ] ) );\n* // returns [ 3, 3, 3 ]\n*/\nfunction shape( x ) {\n\tvar out;\n\tvar sh;\n\tvar d;\n\tvar i;\n\n\t// Note: we intentionally avoid rigorous ndarray checks to minimize performance impacts. This obviously means that non-ndarray-like objects can sneak through, but this is likely all right for the purposes of this function...\n\tif ( typeof x !== 'object' || x === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\tsh = x.shape;\n\tif ( !isCollection( sh ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\t// Copy the shape in order to avoid unintended mutation...\n\tout = [];\n\tfor ( i = 0; i < sh.length; i++ ) {\n\t\td = sh[ i ];\n\t\tif ( !isNonNegativeInteger( d ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t\t}\n\t\tout.push( d );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = shape;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the shape of a provided ndarray.\n*\n* @module @stdlib/ndarray/shape\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var shape = require( '@stdlib/ndarray/shape' );\n*\n* var sh = shape( zeros( [ 3, 3, 3 ] ) );\n* // returns [ 3, 3, 3 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isInteger = require( '@stdlib/assert/is-integer' ).isPrimitive;\nvar isCollection = require( '@stdlib/assert/is-collection' );\nvar isOrder = require( './../../base/assert/is-order' );\nvar shape2strides = require( './../../base/shape2strides' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns the strides of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @throws {TypeError} must provide an ndarray\n* @returns {IntegerArray} strides\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var out = strides( zeros( [ 3, 3, 3 ] ) );\n* // returns [ 9, 3, 1 ]\n*/\nfunction strides( x ) {\n\tvar out;\n\tvar ord;\n\tvar sh;\n\tvar st;\n\tvar d;\n\tvar i;\n\n\t// Note: we intentionally avoid rigorous ndarray checks to minimize performance impacts. This obviously means that non-ndarray-like objects can sneak through, but this is likely all right for the purposes of this function...\n\tif ( typeof x !== 'object' || x === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\tst = x.strides; // TODO: consider whether we want to support ecosystem libraries, such as scijs/ndarray, which name this property `stride`\n\tif ( !isCollection( st ) ) {\n\t\t// WARNING: if no strides array, try to derive the strides from the shape. Note, however, that there is a lot that can go wrong here, as the only thing we are requiring is that the shape is a collection. The main point of going through the effort to compute strides is to support minimal ndarray-esque objects, where the only essential attributes are `shape` and `dtype` and where other attributes can be computed (e.g., `strides`, `offset`, `ndims`, `order`, etc), assuming single-segment contiguous data stored in row-major order...\n\t\tsh = x.shape;\n\t\tif ( !isCollection( sh ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t\t}\n\t\tif ( sh.length === 0 ) {\n\t\t\treturn [ 0 ];\n\t\t}\n\t\tord = x.order;\n\t\tif ( !isOrder( ord ) ) {\n\t\t\tord = 'row-major';\n\t\t}\n\t\treturn shape2strides( sh, ord );\n\t}\n\t// Copy the strides in order to avoid unintended mutation...\n\tout = [];\n\tfor ( i = 0; i < st.length; i++ ) {\n\t\td = st[ i ];\n\t\tif ( !isInteger( d ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t\t}\n\t\tout.push( d );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = strides;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the strides of a provided ndarray.\n*\n* @module @stdlib/ndarray/strides\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var strides = require( '@stdlib/ndarray/strides' );\n*\n* var sh = strides( zeros( [ 3, 3, 3 ] ) );\n* // returns [ 9, 3, 1 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isNonNegativeInteger = require( '@stdlib/assert/is-nonnegative-integer' ).isPrimitive;\nvar isCollection = require( '@stdlib/assert/is-collection' );\nvar strides2offset = require( './../../base/strides2offset' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns the index offset specifying the underlying buffer index of the first iterated ndarray element.\n*\n* @param {ndarrayLike} x - input ndarray\n* @throws {TypeError} must provide an ndarray\n* @returns {NonNegativeInteger} index offset\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var n = offset( zeros( [ 3, 3, 3 ] ) );\n* // returns 0\n*/\nfunction offset( x ) {\n\tvar st;\n\tvar sh;\n\tvar n;\n\n\t// Note: we intentionally avoid rigorous ndarray checks to minimize performance impacts. This obviously means that non-ndarray-like objects can sneak through, but this is likely all right for the purposes of this function...\n\tif ( typeof x !== 'object' || x === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\tn = x.offset;\n\tif ( isNonNegativeInteger( n ) ) {\n\t\treturn n;\n\t}\n\tsh = x.shape;\n\tif ( !isCollection( sh ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\tst = x.strides;\n\tif ( sh.length === 0 || !isCollection( st ) ) {\n\t\treturn 0;\n\t}\n\tn = strides2offset( sh, st );\n\tif ( isNonNegativeInteger( n ) ) {\n\t\treturn n;\n\t}\n\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = offset;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the index offset specifying the underlying buffer index of the first iterated ndarray element.\n*\n* @module @stdlib/ndarray/offset\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var offset = require( '@stdlib/ndarray/offset' );\n*\n* var n = offset( zeros( [ 3, 3, 3 ] ) );\n* // returns 0\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isNonNegativeInteger = require( '@stdlib/assert/is-nonnegative-integer' ).isPrimitive;\nvar isCollection = require( '@stdlib/assert/is-collection' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns the number of ndarray dimensions.\n*\n* @param {ndarrayLike} x - input ndarray\n* @throws {TypeError} must provide an ndarray\n* @returns {NonNegativeInteger} number of dimensions\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var n = ndims( zeros( [ 3, 3, 3 ] ) );\n* // returns 3\n*/\nfunction ndims( x ) {\n\tvar sh;\n\tvar n;\n\n\t// Note: we intentionally avoid rigorous ndarray checks to minimize performance impacts. This obviously means that non-ndarray-like objects can sneak through, but this is likely all right for the purposes of this function...\n\tif ( typeof x !== 'object' || x === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\tn = x.ndims;\n\tif ( isNonNegativeInteger( n ) ) {\n\t\treturn n;\n\t}\n\tsh = x.shape;\n\tif ( !isCollection( sh ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\treturn sh.length;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ndims;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the number of ndarray dimensions.\n*\n* @module @stdlib/ndarray/ndims\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var ndims = require( '@stdlib/ndarray/ndims' );\n*\n* var n = ndims( zeros( [ 3, 3, 3 ] ) );\n* // returns 3\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isOrder = require( './../../base/assert/is-order' );\nvar strides = require( './../../strides' );\nvar ndims = require( './../../ndims' );\nvar strides2order = require( './../../base/strides2order' );\nvar format = require( '@stdlib/string/format' );\n\n\n// VARIABLES //\n\nvar ROW_MAJOR = 'row-major';\nvar COLUMN_MAJOR = 'column-major';\n\n\n// MAIN //\n\n/**\n* Returns the layout order of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @throws {TypeError} must provide an ndarray\n* @returns {(string|null)} layout order\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'order': 'row-major'\n* });\n*\n* var out = order( x );\n* // returns 'row-major'\n*/\nfunction order( x ) {\n\tvar st;\n\tvar o;\n\n\t// Note: we intentionally avoid rigorous ndarray checks to minimize performance impacts. This obviously means that non-ndarray-like objects can sneak through, but this is likely all right for the purposes of this function...\n\tif ( typeof x !== 'object' || x === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\to = x.order;\n\tif ( isOrder( o ) ) {\n\t\treturn o;\n\t}\n\t// Try to infer the layout order from the strides array...\n\tst = strides( x );\n\to = strides2order( st );\n\tif ( o === 1 || o === 3 ) {\n\t\treturn ROW_MAJOR; // for o == 3 (both row- and column-major; e.g., one-dimensional ndarrays), default to row-major\n\t}\n\tif ( o === 2 ) {\n\t\treturn COLUMN_MAJOR;\n\t}\n\t// o === 0\n\tif ( ndims( x ) === 0 ) {\n\t\treturn ROW_MAJOR; // default to row-major for zero-dimensional ndarrays\n\t}\n\t// Case: mixed strides (e.g., [ 2, 3, 1 ] )\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = order;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the layout order of a provided ndarray.\n*\n* @module @stdlib/ndarray/order\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var order = require( '@stdlib/ndarray/order' );\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'order': 'row-major'\n* });\n*\n* var out = order( x );\n* // returns 'row-major'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isCollection = require( '@stdlib/assert/is-collection' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns the underlying data buffer of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @throws {TypeError} must provide an ndarray\n* @returns {Collection} underlying data buffer\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'dtype': 'float64'\n* });\n*\n* var out = data( x );\n* // returns \n*/\nfunction data( x ) {\n\tvar out;\n\n\t// Note: we intentionally avoid rigorous ndarray checks to minimize performance impacts. This obviously means that non-ndarray-like objects can sneak through, but this is likely all right for the purposes of this function...\n\tif ( typeof x !== 'object' || x === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\tout = x.data;\n\tif ( isCollection( out ) ) {\n\t\treturn out;\n\t}\n\t// A data buffer is essential for operating on an ndarray object, so no fallbacks or workarounds for data buffer resolution...\n\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = data;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the underlying data buffer of a provided ndarray.\n*\n* @module @stdlib/ndarray/data-buffer\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var data = require( '@stdlib/ndarray/data-buffer' );\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'dtype': 'float64'\n* });\n*\n* var out = data( x );\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar PINF = require( '@stdlib/constants/float64/pinf' );\nvar isInteger = require( '@stdlib/math/base/assert/is-integer' );\n\n\n// MAIN //\n\n/**\n* Tests (loosely) if an input value is an array-like object.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if an input value is an array-like object\n*\n* @example\n* var bool = isArrayLikeObject( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( '' );\n* // returns false\n*/\nfunction isArrayLikeObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length < PINF\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isArrayLikeObject;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar settings = require( './../../defaults' );\n\n\n// MAIN //\n\n/**\n* Returns default options.\n*\n* @private\n* @returns {Object} default options\n*\n* @example\n* var o = defaults();\n* // returns {...}\n*/\nfunction defaults() {\n\treturn {\n\t\t'casting': settings.get( 'casting' ),\n\t\t'copy': false,\n\t\t'dtype': settings.get( 'dtypes.default' ),\n\t\t'flatten': true,\n\t\t'mode': settings.get( 'index_mode' ),\n\t\t'ndmin': 0,\n\t\t'order': settings.get( 'order' ),\n\t\t'readonly': false\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = defaults;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar bufferCtors = require( './../../base/buffer-ctors' );\nvar allocUnsafe = require( '@stdlib/buffer/alloc-unsafe' );\n\n\n// MAIN //\n\n/**\n* Casts buffer elements by copying those elements to a buffer of another data type.\n*\n* @private\n* @param {(Array|TypedArray|Buffer)} buffer - input buffer\n* @param {NonNegativeInteger} len - number of elements to cast\n* @param {string} dtype - data type\n* @returns {(Array|TypedArray|Buffer)} output buffer\n*\n* @example\n* var b = castBuffer( [ 1.0, 2.0, 3.0 ], 3, 'float64' );\n* // returns [ 1.0, 2.0, 3.0 ]\n*/\nfunction castBuffer( buffer, len, dtype ) {\n\tvar ctor;\n\tvar out;\n\tvar i;\n\n\tctor = bufferCtors( dtype );\n\tif ( dtype === 'generic') {\n\t\tout = [];\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tout.push( buffer[ i ] );\n\t\t}\n\t} else if ( dtype === 'binary' ) {\n\t\tout = allocUnsafe( len );\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tout[ i ] = buffer[ i ];\n\t\t}\n\t} else {\n\t\tout = new ctor( len );\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tout[ i ] = buffer[ i ]; // TODO: wrap and use accessors here and above\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = castBuffer;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar bufferCtors = require( './../../base/buffer-ctors' );\nvar allocUnsafe = require( '@stdlib/buffer/alloc-unsafe' );\n\n\n// FUNCTIONS //\n\n/**\n* Copies a \"generic\" ndarray view.\n*\n* @private\n* @param {ndarray} arr - input ndarray\n* @returns {Array} output data buffer\n*/\nfunction generic( arr ) {\n\tvar len;\n\tvar out;\n\tvar i;\n\n\tlen = arr.length;\n\tout = [];\n\tfor ( i = 0; i < len; i++ ) {\n\t\tout.push( arr.get( i ) ); // FIXME: what if `arr` has more than one dimensions?\n\t}\n\treturn out;\n}\n\n/**\n* Copies a \"binary\" ndarray view.\n*\n* @private\n* @param {ndarray} arr - input ndarray\n* @returns {Array} output data buffer\n*/\nfunction binary( arr ) {\n\tvar len;\n\tvar out;\n\tvar i;\n\n\tlen = arr.length;\n\tout = allocUnsafe( len );\n\tfor ( i = 0; i < len; i++ ) {\n\t\tout[ i ] = arr.get( i ); // FIXME: what if `arr` has more than one dimensions?\n\t}\n\treturn out;\n}\n\n/**\n* Copies a \"typed\" ndarray view.\n*\n* @private\n* @param {ndarray} arr - input ndarray\n* @param {string} dtype - data type\n* @returns {Array} output data buffer\n*/\nfunction typed( arr, dtype ) {\n\tvar ctor;\n\tvar len;\n\tvar out;\n\tvar i;\n\n\tctor = bufferCtors( dtype );\n\tlen = arr.length;\n\tout = new ctor( len ); // FIXME: need to account for complex number arrays; in which case, we may want to do something similar to `array/convert`\n\tfor ( i = 0; i < len; i++ ) {\n\t\tout[ i ] = arr.get( i ); // FIXME: what if `arr` has more than one dimensions?\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Copies an ndarray view to a data buffer.\n*\n* @private\n* @param {ndarray} arr - input ndarray\n* @param {string} dtype - data type\n* @returns {(Array|TypedArray|Buffer)} output data buffer\n*\n* @example\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n*\n* var buffer = [ 1.0, 2.0, 3.0 ];\n* var shape = [ 3 ];\n* var strides = [ -1 ];\n* var vec = ndarray( 'generic', buffer, shape, strides, 2, 'row-major' );\n*\n* var b = copyView( vec, 'float64' );\n* // returns [ 3.0, 2.0, 1.0 ]\n*/\nfunction copyView( arr, dtype ) {\n\t// TODO: handle complex number dtypes!!\n\tif ( dtype === 'generic') {\n\t\treturn generic( arr );\n\t}\n\tif ( dtype === 'binary' ) {\n\t\treturn binary( arr );\n\t}\n\treturn typed( arr, dtype );\n}\n\n\n// EXPORTS //\n\nmodule.exports = copyView;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Prepends singleton dimensions in order to satisfy a minimum number of dimensions.\n*\n* @private\n* @param {NonNegativeInteger} ndims - number of dimensions\n* @param {Array} shape - array dimensions\n* @param {NonNegativeInteger} ndmin - minimum number of dimensions\n* @returns {Array} output shape array\n*/\nfunction expandShape( ndims, shape, ndmin ) {\n\tvar out;\n\tvar i;\n\n\tout = [];\n\tfor ( i = 0; i < ndmin-ndims; i++ ) {\n\t\tout.push( 1 );\n\t}\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tout.push( shape[ i ] );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = expandShape;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Expands a strides array to accommodate an expanded array shape (i.e., an array shape with prepended singleton dimensions).\n*\n* @private\n* @param {NonNegativeInteger} ndims - number of dimensions\n* @param {Array} shape - expanded array shape\n* @param {Array} strides - strides array\n* @param {string} order - memory layout order\n* @returns {Array} output strides array\n*\n* @example\n* var out = expandStrides( 4, [ 1, 1, 2, 2 ], [ 1, 2 ], 'column-major' );\n* // returns [ 1, 1, 1, 2 ]\n*\n* @example\n* var out = expandStrides( 4, [ 1, 1, 2, 2 ], [ 2, 1 ], 'row-major' );\n* // returns [ 4, 4, 2, 1 ]\n*/\nfunction expandStrides( ndims, shape, strides, order ) {\n\tvar out;\n\tvar N;\n\tvar s;\n\tvar i;\n\tvar j;\n\n\tN = strides.length;\n\tj = ndims - N;\n\tout = [];\n\tif ( order === 'row-major' ) {\n\t\ts = abs( strides[ 0 ] ) * shape[ j ]; // at `j` is the size of the first non-prepended dimension\n\t\tfor ( i = 0; i < j; i++ ) {\n\t\t\tout.push( s );\n\t\t}\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tout.push( strides[ i ] );\n\t\t}\n\t} else { // column-major\n\t\tfor ( i = 0; i < j; i++ ) {\n\t\t\tout.push( 1 );\n\t\t}\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tout.push( strides[ i ] );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = expandStrides;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar isObject = require( '@stdlib/assert/is-plain-object' );\nvar isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;\nvar isArray = require( '@stdlib/assert/is-array' );\nvar isNonNegativeInteger = require( '@stdlib/assert/is-nonnegative-integer' ).isPrimitive;\nvar isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );\nvar shape2strides = require( './../../base/shape2strides' );\nvar strides2offset = require( './../../base/strides2offset' );\nvar strides2order = require( './../../base/strides2order' );\nvar numel = require( './../../base/numel' );\nvar ndarray = require( './../../ctor' );\nvar isDataType = require( './../../base/assert/is-data-type' );\nvar isOrder = require( './../../base/assert/is-order' );\nvar isCastingMode = require( './../../base/assert/is-casting-mode' );\nvar isAllowedCast = require( './../../base/assert/is-allowed-data-type-cast' );\nvar createBuffer = require( './../../base/buffer' );\nvar getBufferDType = require( './../../base/buffer-dtype' );\nvar getDType = require( './../../dtype' );\nvar getShape = require( './../../shape' );\nvar getStrides = require( './../../strides' );\nvar getOffset = require( './../../offset' );\nvar getOrder = require( './../../order' );\nvar getData = require( './../../data-buffer' );\nvar arrayShape = require( '@stdlib/array/shape' );\nvar flatten = require( '@stdlib/array/base/flatten' );\nvar format = require( '@stdlib/string/format' );\nvar isArrayLikeObject = require( './is_array_like_object.js' );\nvar getDefaults = require( './defaults.js' );\nvar castBuffer = require( './cast_buffer.js' );\nvar copyView = require( './copy_view.js' );\nvar expandShape = require( './expand_shape.js' );\nvar expandStrides = require( './expand_strides.js' );\n\n\n// VARIABLES //\n\nvar defaults = getDefaults();\n\n\n// MAIN //\n\n/**\n* Returns a multidimensional array.\n*\n* @param {(ArrayLikeObject|TypedArrayLike|Buffer|ndarrayLike)} [buffer] - data source\n* @param {Options} [options] - function options\n* @param {(ArrayLikeObject|TypedArrayLike|Buffer|ndarrayLike)} [options.buffer] - data source\n* @param {string} [options.dtype=\"float64\"] - underlying storage data type (if the input data is not of the same type, this option specifies the data type to which to cast the input data)\n* @param {string} [options.order=\"row-major\"] - specifies the memory layout of the array as either row-major (C-style) or column-major (Fortran-style)\n* @param {NonNegativeIntegerArray} [options.shape] - array shape\n* @param {string} [options.mode=\"throw\"] - specifies how to handle indices which exceed array dimensions\n* @param {StringArray} [options.submode=[\"throw\"]] - specifies how to handle subscripts which exceed array dimensions on a per dimension basis\n* @param {boolean} [options.copy=false] - boolean indicating whether to copy source data to a new data buffer\n* @param {boolean} [options.flatten=true] - boolean indicating whether to automatically flatten generic array data sources\n* @param {NonNegativeInteger} [options.ndmin=0] - minimum number of dimensions\n* @param {string} [options.casting=\"safe\"] - casting rule used to determine what constitutes an acceptable cast\n* @param {boolean} [options.readonly=false] - boolean indicating if an array should be read-only\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {Error} must provide either an array shape, data source, or both\n* @throws {Error} invalid cast\n* @throws {RangeError} data source must be compatible with specified meta data\n* @returns {ndarray} ndarray instance\n*\n* @example\n* var arr = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var v = arr.get( 0, 0 );\n* // returns 1\n*\n* @example\n* var opts = {\n* 'dtype': 'generic',\n* 'flatten': false\n* };\n*\n* var arr = array( [ [ 1, 2 ], [ 3, 4 ] ], opts );\n* // returns \n*\n* var v = arr.get( 0 );\n* // returns [ 1, 2 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var opts = {\n* 'shape': [ 2, 2 ]\n* };\n*\n* var arr = array( new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] ), opts );\n* // returns \n*\n* var v = arr.get( 0, 0 );\n* // returns 1.0\n*/\nfunction array() {\n\tvar options;\n\tvar strides;\n\tvar buffer;\n\tvar offset;\n\tvar order;\n\tvar dtype;\n\tvar btype;\n\tvar shape;\n\tvar ndims;\n\tvar nopts;\n\tvar opts;\n\tvar osh;\n\tvar len;\n\tvar ord;\n\tvar FLG;\n\n\tif ( arguments.length === 1 ) {\n\t\tif ( isArrayLikeObject( arguments[ 0 ] ) ) {\n\t\t\tbuffer = arguments[ 0 ];\n\t\t\toptions = {};\n\t\t} else {\n\t\t\toptions = arguments[ 0 ];\n\t\t\tif ( !isObject( options ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide either a valid data source, options argument, or both. Value: `%s`.', options ) );\n\t\t\t}\n\t\t\tif ( hasOwnProp( options, 'buffer' ) ) {\n\t\t\t\tbuffer = options.buffer;\n\t\t\t\tif ( !isArrayLikeObject( buffer ) ) { // weak test\n\t\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be an array-like object, typed-array-like, a Buffer, or an ndarray. Option: `%s`.', 'buffer', buffer ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\tbuffer = arguments[ 0 ];\n\t\tif ( !isArrayLikeObject( buffer ) ) { // weak test\n\t\t\tthrow new TypeError( format( 'invalid option. Data source must be an array-like object, typed-array-like, a Buffer, or an ndarray. Value: `%s`.', buffer ) );\n\t\t}\n\t\toptions = arguments[ 1 ];\n\t\tif ( !isObject( options ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t\t}\n\t\t// Note: we ignore whether `options` has a `buffer` property\n\t}\n\tif ( buffer ) {\n\t\tif ( isndarrayLike( buffer ) ) {\n\t\t\tbtype = getDType( buffer );\n\t\t\tFLG = true;\n\t\t} else {\n\t\t\tbtype = getBufferDType( buffer );\n\t\t\tFLG = false;\n\t\t}\n\t}\n\tnopts = {};\n\topts = {};\n\n\t// Validate some options before others...\n\tif ( hasOwnProp( options, 'casting' ) ) {\n\t\topts.casting = options.casting;\n\t\tif ( !isCastingMode( opts.casting ) ) {\n\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a recognized casting mode. Option: `%s`.', 'casting', opts.casting ) );\n\t\t}\n\t} else {\n\t\topts.casting = defaults.casting;\n\t}\n\tif ( hasOwnProp( options, 'flatten' ) ) {\n\t\topts.flatten = options.flatten;\n\t\tif ( !isBoolean( opts.flatten ) ) {\n\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'flatten', opts.flatten ) );\n\t\t}\n\t} else {\n\t\topts.flatten = defaults.flatten;\n\t}\n\tif ( hasOwnProp( options, 'ndmin' ) ) {\n\t\topts.ndmin = options.ndmin;\n\t\tif ( !isNonNegativeInteger( opts.ndmin ) ) {\n\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a nonnegative integer. Option: `%s`.', 'ndmin', opts.ndmin ) );\n\t\t}\n\t\t// TODO: validate that minimum number of dimensions does not exceed the maximum number of possible dimensions (in theory, infinite; in practice, determined by max array length; see https://github.com/stdlib-js/stdlib/blob/ac350059877c036640775d6b30d0e98e840d07cf/lib/node_modules/%40stdlib/ndarray/ctor/lib/main.js#L57)\n\t} else {\n\t\topts.ndmin = defaults.ndmin;\n\t}\n\n\t// Validate the remaining options...\n\tif ( hasOwnProp( options, 'dtype' ) ) {\n\t\tdtype = options.dtype;\n\t\tif ( !isDataType( dtype ) ) {\n\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a recognized data type. Option: `%s`.', 'dtype', dtype ) );\n\t\t}\n\t\tif ( btype && !isAllowedCast( btype, dtype, opts.casting ) ) {\n\t\t\tthrow new Error( format( 'invalid option. Data type cast is not allowed. Casting mode: `%s`. From: `%s`. To: `%s`.', opts.casting, btype, dtype ) );\n\t\t}\n\t} else if ( btype ) {\n\t\t// TODO: reconcile difference in behavior when provided a generic array and no `dtype` option. Currently, we cast here, but do not allow casting a generic array (by default) when explicitly providing a `dtype` option.\n\n\t\t// Only cast generic array data sources when not provided an ndarray...\n\t\tif ( !FLG && btype === 'generic' ) {\n\t\t\tdtype = defaults.dtype;\n\t\t} else {\n\t\t\tdtype = btype;\n\t\t}\n\t} else {\n\t\tdtype = defaults.dtype;\n\t}\n\tif ( hasOwnProp( options, 'order' ) ) {\n\t\torder = options.order;\n\t\tif ( order === 'any' || order === 'same' ) {\n\t\t\tif ( FLG ) {\n\t\t\t\t// If the user indicated that \"any\" order suffices (meaning the user does not care about ndarray order), then we use the default order, unless the input ndarray is either unequivocally \"row-major\" or \"column-major\" or configured as such....\n\t\t\t\tif ( order === 'any' ) {\n\t\t\t\t\t// Compute the layout order in order to ascertain whether an ndarray can be considered both \"row-major\" and \"column-major\":\n\t\t\t\t\tord = strides2order( getStrides( buffer ) );\n\n\t\t\t\t\t// If the ndarray can be considered both \"row-major\" and \"column-major\", then use the default order; otherwise, use the ndarray's stated layout order...\n\t\t\t\t\tif ( ord === 3 ) {\n\t\t\t\t\t\torder = defaults.order;\n\t\t\t\t\t} else {\n\t\t\t\t\t\torder = getOrder( buffer );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Otherwise, use the same order as the provided ndarray...\n\t\t\t\telse if ( order === 'same' ) {\n\t\t\t\t\torder = getOrder( buffer );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\torder = defaults.order;\n\t\t\t}\n\t\t} else if ( !isOrder( order ) ) {\n\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a recognized order. Option: `%s`.', 'order', order ) );\n\t\t}\n\t} else {\n\t\torder = defaults.order;\n\t}\n\tif ( hasOwnProp( options, 'mode' ) ) {\n\t\tnopts.mode = options.mode;\n\t} else {\n\t\tnopts.mode = defaults.mode;\n\t}\n\tif ( hasOwnProp( options, 'submode' ) ) {\n\t\tnopts.submode = options.submode;\n\t} else {\n\t\tnopts.submode = [ nopts.mode ];\n\t}\n\tif ( hasOwnProp( options, 'readonly' ) ) {\n\t\tnopts.readonly = options.readonly;\n\t} else {\n\t\tnopts.readonly = defaults.readonly;\n\t}\n\tif ( hasOwnProp( options, 'copy' ) ) {\n\t\topts.copy = options.copy;\n\t\tif ( !isBoolean( opts.copy ) ) {\n\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'copy', opts.copy ) );\n\t\t}\n\t} else {\n\t\topts.copy = defaults.copy;\n\t}\n\t// If not provided a shape, infer from a provided data source...\n\tif ( hasOwnProp( options, 'shape' ) ) {\n\t\tshape = options.shape;\n\t\tif ( !isArrayLikeObject( shape ) ) { // weak test\n\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be an array-like object containing nonnegative integers. Option: `%s`.', 'shape', shape ) );\n\t\t}\n\t\tndims = shape.length;\n\t\tlen = numel( shape );\n\t} else if ( buffer ) {\n\t\tif ( FLG ) {\n\t\t\tshape = getShape( buffer );\n\t\t\tndims = shape.length;\n\t\t\tlen = numel( shape );\n\t\t} else if ( opts.flatten && isArray( buffer ) ) {\n\t\t\tshape = arrayShape( buffer );\n\t\t\tosh = shape; // cache a reference to the inferred shape\n\t\t\tndims = shape.length;\n\t\t\tlen = numel( shape );\n\t\t} else {\n\t\t\tndims = 1;\n\t\t\tlen = buffer.length;\n\t\t\tshape = [ len ]; // assume a 1-dimensional array (vector)\n\t\t}\n\t} else {\n\t\tthrow new Error( 'invalid arguments. Must provide either a data source, array shape, or both.' );\n\t}\n\t// Adjust the array shape to satisfy the minimum number of dimensions...\n\tif ( ndims < opts.ndmin ) {\n\t\tshape = expandShape( ndims, shape, opts.ndmin );\n\t\tndims = opts.ndmin;\n\t}\n\t// If not provided a data buffer, create it; otherwise, see if we need to cast a provided data buffer to another data type or perform a copy...\n\tif ( FLG ) {\n\t\tif ( numel( buffer.shape ) !== len ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Array shape is incompatible with provided data source. Number of data source elements does not match array shape.' );\n\t\t}\n\t\tif ( btype !== dtype || opts.copy ) {\n\t\t\tbuffer = copyView( buffer, dtype );\n\t\t} else {\n\t\t\tstrides = getStrides( buffer );\n\t\t\toffset = getOffset( buffer );\n\t\t\tbuffer = getData( buffer );\n\t\t\tif ( strides.length < ndims ) {\n\t\t\t\t// Account for augmented dimensions (note: expanding the strides array to account for prepended singleton dimensions does **not** affect the index offset):\n\t\t\t\tstrides = expandStrides( ndims, shape, strides, order );\n\t\t\t}\n\t\t}\n\t} else if ( buffer ) {\n\t\tif ( btype === 'generic' && opts.flatten ) {\n\t\t\tbuffer = flatten( buffer, osh || arrayShape( buffer ), false );\n\t\t}\n\t\tif ( buffer.length !== len ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Array shape is incompatible with provided data source. Number of data source elements does not match array shape.' );\n\t\t}\n\t\tif ( btype !== dtype || opts.copy ) {\n\t\t\tbuffer = castBuffer( buffer, len, dtype );\n\t\t}\n\t} else {\n\t\tbuffer = createBuffer( dtype, len );\n\t}\n\t// If we have yet to determine array strides, we assume that we can compute the strides, along with the index offset, for a **contiguous** data source based solely on the array shape and specified memory layout order...\n\tif ( strides === void 0 ) {\n\t\tstrides = shape2strides( shape, order );\n\t\toffset = strides2offset( shape, strides );\n\t}\n\treturn new ndarray( dtype, buffer, shape, strides, offset, order, nopts );\n}\n\n\n// EXPORTS //\n\nmodule.exports = array;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Multidimensional array.\n*\n* @module @stdlib/ndarray/array\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var arr = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var v = arr.get( 0, 0 );\n* // returns 1\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var opts = {\n* 'dtype': 'generic',\n* 'flatten': false\n* };\n*\n* var arr = array( [ [ 1, 2 ], [ 3, 4 ] ], opts );\n* // returns \n*\n* var v = arr.get( 0 );\n* // returns [ 1, 2 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var opts = {\n* 'shape': [ 2, 2 ]\n* };\n*\n* var arr = array( new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] ), opts );\n* // returns \n*\n* var v = arr.get( 0, 0 );\n* // returns 1.0\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar numel = require( './../../../../base/numel' );\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a buffer length is compatible with a provided shape array.\n*\n* @param {NonNegativeInteger} len - buffer length\n* @param {NonNegativeIntegerArray} shape - array shape\n* @returns {boolean} boolean indicating if a buffer length is compatible with a provided shape array\n*\n* @example\n* var shape = [ 2, 2 ];\n*\n* var bool = isBufferLengthCompatibleShape( 4, shape );\n* // returns true\n*\n* @example\n* var shape = [ 2, 2 ];\n*\n* var bool = isBufferLengthCompatibleShape( 3, shape );\n* // returns false\n*/\nfunction isBufferLengthCompatibleShape( len, shape ) { // eslint-disable-line id-length\n\treturn ( len >= numel( shape ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isBufferLengthCompatibleShape;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a boolean indicating if a buffer length is compatible with a provided shape array.\n*\n* @module @stdlib/ndarray/base/assert/is-buffer-length-compatible-shape\n*\n* @example\n* var isBufferLengthCompatibleShape = require( '@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape' );\n*\n* var shape = [ 2, 2 ];\n*\n* var bool = isBufferLengthCompatibleShape( 10, shape );\n* // returns true\n*\n* @example\n* var isBufferLengthCompatibleShape = require( '@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape' );\n*\n* var shape = [ 2, 2 ];\n*\n* var bool = isBufferLengthCompatibleShape( 3, shape );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if an array is column-major based on a provided stride array.\n*\n* @param {IntegerArray} strides - stride array\n* @returns {boolean} boolean indicating if an array is column-major\n*\n* @example\n* var bool = isColumnMajor( [ 1, 2 ] );\n* // returns true\n*\n* bool = isColumnMajor( [ 2, 1 ] );\n* // returns false\n*/\nfunction isColumnMajor( strides ) {\n\tvar ndims;\n\tvar s1;\n\tvar s2;\n\tvar i;\n\n\tndims = strides.length;\n\tif ( ndims === 0 ) {\n\t\treturn false;\n\t}\n\ts1 = abs( strides[ 0 ] );\n\tfor ( i = 1; i < ndims; i++ ) {\n\t\ts2 = abs( strides[ i ] );\n\t\tif ( s2 < s1 ) {\n\t\t\treturn false;\n\t\t}\n\t\ts1 = s2;\n\t}\n\treturn true;\n}\n\n\n// EXPORTS //\n\nmodule.exports = isColumnMajor;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Given a stride array, determine whether an array is column-major.\n*\n* @module @stdlib/ndarray/base/assert/is-column-major\n*\n* @example\n* var isColumnMajor = require( '@stdlib/ndarray/base/assert/is-column-major' );\n*\n* var bool = isColumnMajor( [ 1, 2 ] );\n* // returns true\n*\n* bool = isColumnMajor( [ 2, 1 ] );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar numel = require( './../../../../base/numel' );\nvar minmax = require( './../../../../base/minmax-view-buffer-index' );\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if an array is compatible with a single memory segment.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @returns {boolean} boolean indicating if an array is compatible with a single memory segment\n*\n* @example\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var bool = isSingleSegmentCompatible( shape, strides, offset );\n* // returns true\n*\n* @example\n* var shape = [ 10 ];\n* var strides = [ 3 ];\n* var offset = 0;\n*\n* var bool = isSingleSegmentCompatible( shape, strides, offset );\n* // returns false\n*/\nfunction isSingleSegmentCompatible( shape, strides, offset ) {\n\tvar len;\n\tvar buf;\n\n\t// Compute the total number of elements:\n\tlen = numel( shape );\n\tif ( len === 0 ) {\n\t\treturn false;\n\t}\n\t// Determine the minimum and maximum linear indices which are accessible by the array view:\n\tbuf = minmax( shape, strides, offset );\n\n\treturn ( len === ( buf[1]-buf[0]+1 ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isSingleSegmentCompatible;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a boolean indicating if an array is compatible with a single memory segment.\n*\n* @module @stdlib/ndarray/base/assert/is-single-segment-compatible\n*\n* @example\n* var isSingleSegmentCompatible = require( '@stdlib/ndarray/base/assert/is-single-segment-compatible' );\n*\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var bool = isSingleSegmentCompatible( shape, strides, offset );\n* // returns true\n*\n* @example\n* var isSingleSegmentCompatible = require( '@stdlib/ndarray/base/assert/is-single-segment-compatible' );\n*\n* var shape = [ 10 ];\n* var strides = [ 3 ];\n* var offset = 0;\n*\n* var bool = isSingleSegmentCompatible( shape, strides, offset );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isSingleSegmentCompatible = require( './../../../../base/assert/is-single-segment-compatible' );\nvar iterationOrder = require( './../../../../base/iteration-order' );\nvar isColumnMajor = require( './../../../../base/assert/is-column-major' );\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if an array is column-major contiguous.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @returns {boolean} boolean indicating if an array is column-major contiguous\n*\n* @example\n* var shape = [ 2, 2 ];\n* var strides = [ 1, 2 ];\n* var offset = 0;\n*\n* var bool = isColumnMajorContiguous( shape, strides, offset );\n* // returns true\n*\n* @example\n* var shape = [ 2, 2 ];\n* var strides = [ 1, -2 ];\n* var offset = 2;\n*\n* var bool = isColumnMajorContiguous( shape, strides, offset );\n* // returns false\n*\n* @example\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 2 ];\n* var offset = 0;\n*\n* var bool = isColumnMajorContiguous( shape, strides, offset );\n* // returns false\n*/\nfunction isColumnMajorContiguous( shape, strides, offset ) {\n\treturn (\n\t\titerationOrder( strides ) !== 0 &&\n\t\tisColumnMajor( strides ) &&\n\t\tisSingleSegmentCompatible( shape, strides, offset )\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isColumnMajorContiguous;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine if an array is column-major contiguous.\n*\n* @module @stdlib/ndarray/base/assert/is-column-major-contiguous\n*\n* @example\n* var isColumnMajorContiguous = require( '@stdlib/ndarray/base/assert/is-column-major-contiguous' );\n*\n* var shape = [ 2, 2 ];\n* var strides = [ 1, 2 ];\n* var offset = 0;\n*\n* var bool = isColumnMajorContiguous( shape, strides, offset );\n* // returns true\n*\n* @example\n* var isColumnMajorContiguous = require( '@stdlib/ndarray/base/assert/is-column-major-contiguous' );\n*\n* var shape = [ 2, 2 ];\n* var strides = [ 1, -2 ];\n* var offset = 2;\n*\n* var bool = isColumnMajorContiguous( shape, strides, offset );\n* // returns false\n*\n* @example\n* var isColumnMajorContiguous = require( '@stdlib/ndarray/base/assert/is-column-major-contiguous' );\n*\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 2 ];\n* var offset = 0;\n*\n* var bool = isColumnMajorContiguous( shape, strides, offset );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar contains = require( '@stdlib/array/base/assert/contains' ).factory;\nvar dtypes = require( './../../../../dtypes' );\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray complex-valued floating-point data type.\n*\n* @name isComplexFloatingPointDataType\n* @type {Function}\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray complex-valued floating-point data type\n*\n* @example\n* var bool = isComplexFloatingPointDataType( 'binary' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'complex64' );\n* // returns true\n*\n* bool = isComplexFloatingPointDataType( 'complex128' );\n* // returns true\n*\n* bool = isComplexFloatingPointDataType( 'float32' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'float64' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'generic' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'int16' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'int32' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'int8' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'uint16' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'uint32' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'uint8' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'uint8c' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'foo' );\n* // returns false\n*/\nvar isComplexFloatingPointDataType = contains( dtypes( 'complex_floating_point' ) ); // eslint-disable-line id-length\n\n\n// EXPORTS //\n\nmodule.exports = isComplexFloatingPointDataType;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test whether an input value is a supported ndarray complex-valued floating-point data type.\n*\n* @module @stdlib/ndarray/base/assert/is-complex-floating-point-data-type\n*\n* @example\n* var isComplexFloatingPointDataType = require( '@stdlib/ndarray/base/assert/is-complex-floating-point-data-type' );\n*\n* var bool = isComplexFloatingPointDataType( 'binary' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'complex64' );\n* // returns true\n*\n* bool = isComplexFloatingPointDataType( 'complex128' );\n* // returns true\n*\n* bool = isComplexFloatingPointDataType( 'float32' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'float64' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'generic' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'int16' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'int32' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'int8' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'uint16' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'uint32' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'uint8' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'uint8c' );\n* // returns false\n*\n* bool = isComplexFloatingPointDataType( 'foo' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isSingleSegmentCompatible = require( './../../../../base/assert/is-single-segment-compatible' );\nvar iterationOrder = require( './../../../../base/iteration-order' );\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if an array is contiguous.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @returns {boolean} boolean indicating if an array is contiguous\n*\n* @example\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var bool = isContiguous( shape, strides, offset );\n* // returns true\n*\n* @example\n* var shape = [ 2, 2 ];\n* var strides = [ -2, 1 ];\n* var offset = 2;\n*\n* var bool = isContiguous( shape, strides, offset );\n* // returns false\n*\n* @example\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 2 ];\n* var offset = 0;\n*\n* var bool = isContiguous( shape, strides, offset );\n* // returns false\n*/\nfunction isContiguous( shape, strides, offset ) {\n\treturn (\n\t\titerationOrder( strides ) !== 0 &&\n\t\tisSingleSegmentCompatible( shape, strides, offset )\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isContiguous;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine if an array is contiguous.\n*\n* @module @stdlib/ndarray/base/assert/is-contiguous\n*\n* @example\n* var isContiguous = require( '@stdlib/ndarray/base/assert/is-contiguous' );\n*\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var bool = isContiguous( shape, strides, offset );\n* // returns true\n*\n* @example\n* var isContiguous = require( '@stdlib/ndarray/base/assert/is-contiguous' );\n*\n* var shape = [ 2, 2 ];\n* var strides = [ -2, 1 ];\n* var offset = 2;\n*\n* var bool = isContiguous( shape, strides, offset );\n* // returns false\n*\n* @example\n* var isContiguous = require( '@stdlib/ndarray/base/assert/is-contiguous' );\n*\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 2 ];\n* var offset = 0;\n*\n* var bool = isContiguous( shape, strides, offset );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar contains = require( '@stdlib/array/base/assert/contains' ).factory;\nvar dtypes = require( './../../../../dtypes' );\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray floating-point data type.\n*\n* @name isFloatingPointDataType\n* @type {Function}\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray floating-point data type\n*\n* @example\n* var bool = isFloatingPointDataType( 'binary' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'float32' );\n* // returns true\n*\n* bool = isFloatingPointDataType( 'float64' );\n* // returns true\n*\n* bool = isFloatingPointDataType( 'generic' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'int16' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'int32' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'int8' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'uint16' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'uint32' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'uint8' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'uint8c' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'foo' );\n* // returns false\n*/\nvar isFloatingPointDataType = contains( dtypes( 'floating_point' ) );\n\n\n// EXPORTS //\n\nmodule.exports = isFloatingPointDataType;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test whether an input value is a supported ndarray floating-point data type.\n*\n* @module @stdlib/ndarray/base/assert/is-floating-point-data-type\n*\n* @example\n* var isFloatingPointDataType = require( '@stdlib/ndarray/base/assert/is-floating-point-data-type' );\n*\n* var bool = isFloatingPointDataType( 'binary' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'float32' );\n* // returns true\n*\n* bool = isFloatingPointDataType( 'float64' );\n* // returns true\n*\n* bool = isFloatingPointDataType( 'generic' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'int16' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'int32' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'int8' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'uint16' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'uint32' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'uint8' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'uint8c' );\n* // returns false\n*\n* bool = isFloatingPointDataType( 'foo' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar contains = require( '@stdlib/array/base/assert/contains' ).factory;\nvar dtypes = require( './../../../../dtypes' );\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray integer data type.\n*\n* @name isIntegerDataType\n* @type {Function}\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray integer data type\n*\n* @example\n* var bool = isIntegerDataType( 'binary' );\n* // returns false\n*\n* bool = isIntegerDataType( 'float32' );\n* // returns false\n*\n* bool = isIntegerDataType( 'float64' );\n* // returns false\n*\n* bool = isIntegerDataType( 'generic' );\n* // returns false\n*\n* bool = isIntegerDataType( 'int16' );\n* // returns true\n*\n* bool = isIntegerDataType( 'int32' );\n* // returns true\n*\n* bool = isIntegerDataType( 'int8' );\n* // returns true\n*\n* bool = isIntegerDataType( 'uint16' );\n* // returns true\n*\n* bool = isIntegerDataType( 'uint32' );\n* // returns true\n*\n* bool = isIntegerDataType( 'uint8' );\n* // returns true\n*\n* bool = isIntegerDataType( 'uint8c' );\n* // returns true\n*\n* bool = isIntegerDataType( 'foo' );\n* // returns false\n*/\nvar isIntegerDataType = contains( dtypes( 'integer' ) );\n\n\n// EXPORTS //\n\nmodule.exports = isIntegerDataType;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test whether an input value is a supported ndarray integer data type.\n*\n* @module @stdlib/ndarray/base/assert/is-integer-data-type\n*\n* @example\n* var isIntegerDataType = require( '@stdlib/ndarray/base/assert/is-integer-data-type' );\n*\n* var bool = isIntegerDataType( 'binary' );\n* // returns false\n*\n* bool = isIntegerDataType( 'float32' );\n* // returns false\n*\n* bool = isIntegerDataType( 'float64' );\n* // returns false\n*\n* bool = isIntegerDataType( 'generic' );\n* // returns false\n*\n* bool = isIntegerDataType( 'int16' );\n* // returns true\n*\n* bool = isIntegerDataType( 'int32' );\n* // returns true\n*\n* bool = isIntegerDataType( 'int8' );\n* // returns true\n*\n* bool = isIntegerDataType( 'uint16' );\n* // returns true\n*\n* bool = isIntegerDataType( 'uint32' );\n* // returns true\n*\n* bool = isIntegerDataType( 'uint8' );\n* // returns true\n*\n* bool = isIntegerDataType( 'uint8c' );\n* // returns true\n*\n* bool = isIntegerDataType( 'foo' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar contains = require( '@stdlib/array/base/assert/contains' ).factory;\nvar dtypes = require( './../../../../dtypes' );\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray numeric data type.\n*\n* @name isNumericDataType\n* @type {Function}\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray numeric data type\n*\n* @example\n* var bool = isNumericDataType( 'binary' );\n* // returns false\n*\n* bool = isNumericDataType( 'float32' );\n* // returns true\n*\n* bool = isNumericDataType( 'float64' );\n* // returns true\n*\n* bool = isNumericDataType( 'generic' );\n* // returns false\n*\n* bool = isNumericDataType( 'int16' );\n* // returns true\n*\n* bool = isNumericDataType( 'int32' );\n* // returns true\n*\n* bool = isNumericDataType( 'int8' );\n* // returns true\n*\n* bool = isNumericDataType( 'uint16' );\n* // returns true\n*\n* bool = isNumericDataType( 'uint32' );\n* // returns true\n*\n* bool = isNumericDataType( 'uint8' );\n* // returns true\n*\n* bool = isNumericDataType( 'uint8c' );\n* // returns true\n*\n* bool = isNumericDataType( 'foo' );\n* // returns false\n*/\nvar isNumericDataType = contains( dtypes( 'numeric' ) );\n\n\n// EXPORTS //\n\nmodule.exports = isNumericDataType;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test whether an input value is a supported ndarray numeric data type.\n*\n* @module @stdlib/ndarray/base/assert/is-numeric-data-type\n*\n* @example\n* var isNumericDataType = require( '@stdlib/ndarray/base/assert/is-numeric-data-type' );\n*\n* var bool = isNumericDataType( 'binary' );\n* // returns false\n*\n* bool = isNumericDataType( 'float32' );\n* // returns true\n*\n* bool = isNumericDataType( 'float64' );\n* // returns true\n*\n* bool = isNumericDataType( 'generic' );\n* // returns false\n*\n* bool = isNumericDataType( 'int16' );\n* // returns true\n*\n* bool = isNumericDataType( 'int32' );\n* // returns true\n*\n* bool = isNumericDataType( 'int8' );\n* // returns true\n*\n* bool = isNumericDataType( 'uint16' );\n* // returns true\n*\n* bool = isNumericDataType( 'uint32' );\n* // returns true\n*\n* bool = isNumericDataType( 'uint8' );\n* // returns true\n*\n* bool = isNumericDataType( 'uint8c' );\n* // returns true\n*\n* bool = isNumericDataType( 'foo' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests whether an ndarray is read-only.\n*\n* @param {ndarray} arr - input ndarray\n* @returns {boolean} boolean indicating whether an ndarray is read-only\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ 1, 2, 3, 4 ], {\n* 'readonly': true\n* });\n* var bool = isReadOnly( x );\n* // returns true\n*\n* x = array( [ 1, 2, 3, 4 ] );\n* bool = isReadOnly( x );\n* // returns false\n*/\nfunction isReadOnly( arr ) {\n\tvar flags = arr.flags;\n\treturn ( flags && flags.READONLY === true );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isReadOnly;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test whether an ndarray is read-only.\n*\n* @module @stdlib/ndarray/base/assert/is-read-only\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var isReadOnly = require( '@stdlib/ndarray/base/assert/is-read-only' );\n*\n* var x = array( [ 1, 2, 3, 4 ], {\n* 'readonly': true\n* });\n* var bool = isReadOnly( x );\n* // returns true\n*\n* x = array( [ 1, 2, 3, 4 ] );\n* bool = isReadOnly( x );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar contains = require( '@stdlib/array/base/assert/contains' ).factory;\nvar dtypes = require( './../../../../dtypes' );\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray real-valued data type.\n*\n* @name isRealDataType\n* @type {Function}\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray real-valued data type\n*\n* @example\n* var bool = isRealDataType( 'binary' );\n* // returns false\n*\n* bool = isRealDataType( 'float32' );\n* // returns true\n*\n* bool = isRealDataType( 'float64' );\n* // returns true\n*\n* bool = isRealDataType( 'complex128' );\n* // returns false\n*\n* bool = isRealDataType( 'generic' );\n* // returns false\n*\n* bool = isRealDataType( 'int16' );\n* // returns true\n*\n* bool = isRealDataType( 'int32' );\n* // returns true\n*\n* bool = isRealDataType( 'int8' );\n* // returns true\n*\n* bool = isRealDataType( 'uint16' );\n* // returns true\n*\n* bool = isRealDataType( 'uint32' );\n* // returns true\n*\n* bool = isRealDataType( 'uint8' );\n* // returns true\n*\n* bool = isRealDataType( 'uint8c' );\n* // returns true\n*\n* bool = isRealDataType( 'foo' );\n* // returns false\n*/\nvar isRealDataType = contains( dtypes( 'real' ) );\n\n\n// EXPORTS //\n\nmodule.exports = isRealDataType;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test whether an input value is a supported ndarray real-valued data type.\n*\n* @module @stdlib/ndarray/base/assert/is-real-data-type\n*\n* @example\n* var isRealDataType = require( '@stdlib/ndarray/base/assert/is-real-data-type' );\n*\n* var bool = isRealDataType( 'binary' );\n* // returns false\n*\n* bool = isRealDataType( 'float32' );\n* // returns true\n*\n* bool = isRealDataType( 'float64' );\n* // returns true\n*\n* bool = isRealDataType( 'complex128' );\n* // returns false\n*\n* bool = isRealDataType( 'generic' );\n* // returns false\n*\n* bool = isRealDataType( 'int16' );\n* // returns true\n*\n* bool = isRealDataType( 'int32' );\n* // returns true\n*\n* bool = isRealDataType( 'int8' );\n* // returns true\n*\n* bool = isRealDataType( 'uint16' );\n* // returns true\n*\n* bool = isRealDataType( 'uint32' );\n* // returns true\n*\n* bool = isRealDataType( 'uint8' );\n* // returns true\n*\n* bool = isRealDataType( 'uint8c' );\n* // returns true\n*\n* bool = isRealDataType( 'foo' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar contains = require( '@stdlib/array/base/assert/contains' ).factory;\nvar dtypes = require( './../../../../dtypes' );\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray real-valued floating-point data type.\n*\n* @name isRealFloatingPointDataType\n* @type {Function}\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray real-valued floating-point data type\n*\n* @example\n* var bool = isRealFloatingPointDataType( 'binary' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'float32' );\n* // returns true\n*\n* bool = isRealFloatingPointDataType( 'float64' );\n* // returns true\n*\n* bool = isRealFloatingPointDataType( 'generic' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'int16' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'int32' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'int8' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'uint16' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'uint32' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'uint8' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'uint8c' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'foo' );\n* // returns false\n*/\nvar isRealFloatingPointDataType = contains( dtypes( 'real_floating_point' ) ); // eslint-disable-line id-length\n\n\n// EXPORTS //\n\nmodule.exports = isRealFloatingPointDataType;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test whether an input value is a supported ndarray real-valued floating-point data type.\n*\n* @module @stdlib/ndarray/base/assert/is-real-floating-point-data-type\n*\n* @example\n* var isRealFloatingPointDataType = require( '@stdlib/ndarray/base/assert/is-real-floating-point-data-type' );\n*\n* var bool = isRealFloatingPointDataType( 'binary' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'float32' );\n* // returns true\n*\n* bool = isRealFloatingPointDataType( 'float64' );\n* // returns true\n*\n* bool = isRealFloatingPointDataType( 'generic' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'int16' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'int32' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'int8' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'uint16' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'uint32' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'uint8' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'uint8c' );\n* // returns false\n*\n* bool = isRealFloatingPointDataType( 'foo' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if an array is row-major based on a provided stride array.\n*\n* @param {IntegerArray} strides - stride array\n* @returns {boolean} boolean indicating if an array is row-major\n*\n* @example\n* var bool = isRowMajor( [ 2, 1 ] );\n* // returns true\n*\n* bool = isRowMajor( [ 1, 2 ] );\n* // returns false\n*/\nfunction isRowMajor( strides ) {\n\tvar ndims;\n\tvar s1;\n\tvar s2;\n\tvar i;\n\n\tndims = strides.length;\n\tif ( ndims === 0 ) {\n\t\treturn false;\n\t}\n\ts1 = abs( strides[ 0 ] );\n\tfor ( i = 1; i < ndims; i++ ) {\n\t\ts2 = abs( strides[ i ] );\n\t\tif ( s2 > s1 ) {\n\t\t\treturn false;\n\t\t}\n\t\ts1 = s2;\n\t}\n\treturn true;\n}\n\n\n// EXPORTS //\n\nmodule.exports = isRowMajor;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Given a stride array, determine whether an array is row-major.\n*\n* @module @stdlib/ndarray/base/assert/is-row-major\n*\n* @example\n* var isRowMajor = require( '@stdlib/ndarray/base/assert/is-row-major' );\n*\n* var bool = isRowMajor( [ 2, 1 ] );\n* // returns true\n*\n* bool = isRowMajor( [ 1, 2 ] );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isSingleSegmentCompatible = require( './../../../../base/assert/is-single-segment-compatible' );\nvar iterationOrder = require( './../../../../base/iteration-order' );\nvar isRowMajor = require( './../../../../base/assert/is-row-major' );\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if an array is row-major contiguous.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @returns {boolean} boolean indicating if an array is row-major contiguous\n*\n* @example\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var bool = isRowMajorContiguous( shape, strides, offset );\n* // returns true\n*\n* @example\n* var shape = [ 2, 2 ];\n* var strides = [ -2, 1 ];\n* var offset = 2;\n*\n* var bool = isRowMajorContiguous( shape, strides, offset );\n* // returns false\n*\n* @example\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 2 ];\n* var offset = 0;\n*\n* var bool = isRowMajorContiguous( shape, strides, offset );\n* // returns false\n*/\nfunction isRowMajorContiguous( shape, strides, offset ) {\n\treturn (\n\t\titerationOrder( strides ) !== 0 &&\n\t\tisRowMajor( strides ) &&\n\t\tisSingleSegmentCompatible( shape, strides, offset )\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isRowMajorContiguous;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine if an array is row-major contiguous.\n*\n* @module @stdlib/ndarray/base/assert/is-row-major-contiguous\n*\n* @example\n* var isRowMajorContiguous = require( '@stdlib/ndarray/base/assert/is-row-major-contiguous' );\n*\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var bool = isRowMajorContiguous( shape, strides, offset );\n* // returns true\n*\n* @example\n* var isRowMajorContiguous = require( '@stdlib/ndarray/base/assert/is-row-major-contiguous' );\n*\n* var shape = [ 2, 2 ];\n* var strides = [ -2, 1 ];\n* var offset = 2;\n*\n* var bool = isRowMajorContiguous( shape, strides, offset );\n* // returns false\n*\n* @example\n* var isRowMajorContiguous = require( '@stdlib/ndarray/base/assert/is-row-major-contiguous' );\n*\n* var shape = [ 2, 2 ];\n* var strides = [ 2, 2 ];\n* var offset = 0;\n*\n* var bool = isRowMajorContiguous( shape, strides, offset );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar contains = require( '@stdlib/array/base/assert/contains' ).factory;\nvar dtypes = require( './../../../../dtypes' );\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray signed integer data type.\n*\n* @name isSignedIntegerDataType\n* @type {Function}\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray signed integer data type\n*\n* @example\n* var bool = isSignedIntegerDataType( 'binary' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'float32' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'float64' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'generic' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'int16' );\n* // returns true\n*\n* bool = isSignedIntegerDataType( 'int32' );\n* // returns true\n*\n* bool = isSignedIntegerDataType( 'int8' );\n* // returns true\n*\n* bool = isSignedIntegerDataType( 'uint16' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'uint32' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'uint8' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'uint8c' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'foo' );\n* // returns false\n*/\nvar isSignedIntegerDataType = contains( dtypes( 'signed_integer' ) );\n\n\n// EXPORTS //\n\nmodule.exports = isSignedIntegerDataType;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test whether an input value is a supported ndarray signed integer data type.\n*\n* @module @stdlib/ndarray/base/assert/is-signed-integer-data-type\n*\n* @example\n* var isSignedIntegerDataType = require( '@stdlib/ndarray/base/assert/is-signed-integer-data-type' );\n*\n* var bool = isSignedIntegerDataType( 'binary' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'float32' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'float64' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'generic' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'int16' );\n* // returns true\n*\n* bool = isSignedIntegerDataType( 'int32' );\n* // returns true\n*\n* bool = isSignedIntegerDataType( 'int8' );\n* // returns true\n*\n* bool = isSignedIntegerDataType( 'uint16' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'uint32' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'uint8' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'uint8c' );\n* // returns false\n*\n* bool = isSignedIntegerDataType( 'foo' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar contains = require( '@stdlib/array/base/assert/contains' ).factory;\nvar dtypes = require( './../../../../dtypes' );\n\n\n// MAIN //\n\n/**\n* Tests whether an input value is a supported ndarray unsigned integer data type.\n*\n* @name isUnsignedIntegerDataType\n* @type {Function}\n* @param {*} v - value to test\n* @returns {boolean} boolean indicating whether an input value is a supported ndarray unsigned integer data type\n*\n* @example\n* var bool = isUnsignedIntegerDataType( 'binary' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'float32' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'float64' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'generic' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'int16' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'int32' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'int8' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'uint16' );\n* // returns true\n*\n* bool = isUnsignedIntegerDataType( 'uint32' );\n* // returns true\n*\n* bool = isUnsignedIntegerDataType( 'uint8' );\n* // returns true\n*\n* bool = isUnsignedIntegerDataType( 'uint8c' );\n* // returns true\n*\n* bool = isUnsignedIntegerDataType( 'foo' );\n* // returns false\n*/\nvar isUnsignedIntegerDataType = contains( dtypes( 'unsigned_integer' ) );\n\n\n// EXPORTS //\n\nmodule.exports = isUnsignedIntegerDataType;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test whether an input value is a supported ndarray unsigned integer data type.\n*\n* @module @stdlib/ndarray/base/assert/is-unsigned-integer-data-type\n*\n* @example\n* var isUnsignedIntegerDataType = require( '@stdlib/ndarray/base/assert/is-unsigned-integer-data-type' );\n*\n* var bool = isUnsignedIntegerDataType( 'binary' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'float32' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'float64' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'generic' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'int16' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'int32' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'int8' );\n* // returns false\n*\n* bool = isUnsignedIntegerDataType( 'uint16' );\n* // returns true\n*\n* bool = isUnsignedIntegerDataType( 'uint32' );\n* // returns true\n*\n* bool = isUnsignedIntegerDataType( 'uint8' );\n* // returns true\n*\n* bool = isUnsignedIntegerDataType( 'uint8c' );\n* // returns true\n*\n* bool = isUnsignedIntegerDataType( 'foo' );\n* // returns false\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name isAllowedDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-allowed-data-type-cast}\n*/\nsetReadOnly( ns, 'isAllowedDataTypeCast', require( './../../../base/assert/is-allowed-data-type-cast' ) );\n\n/**\n* @name isBufferLengthCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatible', require( './../../../base/assert/is-buffer-length-compatible' ) );\n\n/**\n* @name isBufferLengthCompatibleShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-buffer-length-compatible-shape}\n*/\nsetReadOnly( ns, 'isBufferLengthCompatibleShape', require( './../../../base/assert/is-buffer-length-compatible-shape' ) );\n\n/**\n* @name isCastingMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-casting-mode}\n*/\nsetReadOnly( ns, 'isCastingMode', require( './../../../base/assert/is-casting-mode' ) );\n\n/**\n* @name isColumnMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major}\n*/\nsetReadOnly( ns, 'isColumnMajor', require( './../../../base/assert/is-column-major' ) );\n\n/**\n* @name isColumnMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-column-major-contiguous}\n*/\nsetReadOnly( ns, 'isColumnMajorContiguous', require( './../../../base/assert/is-column-major-contiguous' ) );\n\n/**\n* @name isComplexFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-complex-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isComplexFloatingPointDataType', require( './../../../base/assert/is-complex-floating-point-data-type' ) );\n\n/**\n* @name isContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-contiguous}\n*/\nsetReadOnly( ns, 'isContiguous', require( './../../../base/assert/is-contiguous' ) );\n\n/**\n* @name isDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-data-type}\n*/\nsetReadOnly( ns, 'isDataType', require( './../../../base/assert/is-data-type' ) );\n\n/**\n* @name isFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isFloatingPointDataType', require( './../../../base/assert/is-floating-point-data-type' ) );\n\n/**\n* @name isIndexMode\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-index-mode}\n*/\nsetReadOnly( ns, 'isIndexMode', require( './../../../base/assert/is-index-mode' ) );\n\n/**\n* @name isIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-integer-data-type}\n*/\nsetReadOnly( ns, 'isIntegerDataType', require( './../../../base/assert/is-integer-data-type' ) );\n\n/**\n* @name isNumericDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-numeric-data-type}\n*/\nsetReadOnly( ns, 'isNumericDataType', require( './../../../base/assert/is-numeric-data-type' ) );\n\n/**\n* @name isOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-order}\n*/\nsetReadOnly( ns, 'isOrder', require( './../../../base/assert/is-order' ) );\n\n/**\n* @name isReadOnly\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-read-only}\n*/\nsetReadOnly( ns, 'isReadOnly', require( './../../../base/assert/is-read-only' ) );\n\n/**\n* @name isRealDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-data-type}\n*/\nsetReadOnly( ns, 'isRealDataType', require( './../../../base/assert/is-real-data-type' ) );\n\n/**\n* @name isRealFloatingPointDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-real-floating-point-data-type}\n*/\nsetReadOnly( ns, 'isRealFloatingPointDataType', require( './../../../base/assert/is-real-floating-point-data-type' ) );\n\n/**\n* @name isRowMajor\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major}\n*/\nsetReadOnly( ns, 'isRowMajor', require( './../../../base/assert/is-row-major' ) );\n\n/**\n* @name isRowMajorContiguous\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-row-major-contiguous}\n*/\nsetReadOnly( ns, 'isRowMajorContiguous', require( './../../../base/assert/is-row-major-contiguous' ) );\n\n/**\n* @name isSafeDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-safe-data-type-cast}\n*/\nsetReadOnly( ns, 'isSafeDataTypeCast', require( './../../../base/assert/is-safe-data-type-cast' ) );\n\n/**\n* @name isSameKindDataTypeCast\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-same-kind-data-type-cast}\n*/\nsetReadOnly( ns, 'isSameKindDataTypeCast', require( './../../../base/assert/is-same-kind-data-type-cast' ) );\n\n/**\n* @name isSignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-signed-integer-data-type}\n*/\nsetReadOnly( ns, 'isSignedIntegerDataType', require( './../../../base/assert/is-signed-integer-data-type' ) );\n\n/**\n* @name isSingleSegmentCompatible\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-single-segment-compatible}\n*/\nsetReadOnly( ns, 'isSingleSegmentCompatible', require( './../../../base/assert/is-single-segment-compatible' ) );\n\n/**\n* @name isUnsignedIntegerDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/assert/is-unsigned-integer-data-type}\n*/\nsetReadOnly( ns, 'isUnsignedIntegerDataType', require( './../../../base/assert/is-unsigned-integer-data-type' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Simultaneously sorts two arrays based on the sort order of the first array using insertion sort.\n*\n* ## Notes\n*\n* - The first array is sorted in increasing order according to absolute value.\n* - The algorithm has space complexity `O(1)` and worst case time complexity `O(N^2)`.\n* - The algorithm is efficient for small arrays (typically `N <= 20``) and is particularly efficient for sorting arrays which are already substantially sorted.\n* - The algorithm is **stable**, meaning that the algorithm does **not** change the order of array elements which are equal or equivalent.\n* - The input arrays are sorted in-place (i.e., the input arrays are mutated).\n*\n* @private\n* @param {Array} x - first array\n* @param {Array} y - second array\n* @returns {void}\n*\n* @example\n* var x = [ -4, -2, 3, 1 ];\n* var y = [ 0, 1, 2, 3 ];\n*\n* sort2ins( x, y );\n*\n* console.log( x );\n* // => [ 1, -2, 3, -4 ]\n*\n* console.log( y );\n* // => [ 3, 1, 2, 0 ]\n*/\nfunction sort2ins( x, y ) {\n\tvar avx;\n\tvar aux;\n\tvar ix;\n\tvar iy;\n\tvar jx;\n\tvar jy;\n\tvar vx;\n\tvar vy;\n\tvar ux;\n\tvar i;\n\n\tix = 1;\n\tiy = 1;\n\n\t// Sort in increasing order...\n\tfor ( i = 1; i < x.length; i++ ) {\n\t\tvx = x[ ix ];\n\t\tavx = ( vx < 0 ) ? -vx : vx;\n\n\t\tvy = y[ iy ];\n\n\t\tjx = ix - 1;\n\t\tjy = iy - 1;\n\n\t\t// Shift all larger values to the left of the current element to the right...\n\t\twhile ( jx >= 0 ) {\n\t\t\tux = x[ jx ];\n\t\t\taux = ( ux < 0 ) ? -ux : ux;\n\t\t\tif ( aux <= avx ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tx[ jx+1 ] = ux;\n\t\t\ty[ jy+1 ] = y[ jy ];\n\t\t\tjx -= 1;\n\t\t\tjy -= 1;\n\t\t}\n\t\tx[ jx+1 ] = vx;\n\t\ty[ jy+1 ] = vy;\n\t\tix += 1;\n\t\tiy += 1;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = sort2ins;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar zeroTo = require( '@stdlib/array/base/zero-to' );\nvar copy = require( '@stdlib/array/base/copy-indexed' );\nvar take = require( '@stdlib/array/base/take' );\nvar filled = require( '@stdlib/array/base/filled' );\nvar strides2order = require( './../../../base/strides2order' );\nvar sort2ins = require( './sort2ins.js' );\n\n\n// VARIABLES //\n\n// Number of arrays:\nvar N = 3;\n\n\n// MAIN //\n\n/**\n* Reorders ndarray dimensions and associated strides for loop interchange.\n*\n* ## Notes\n*\n* - The returned object has the following properties:\n*\n* - **sh**: dimensions sorted in loop order.\n* - **sx**: first input ndarray strides sorted in loop order.\n* - **sy**: second input ndarray strides sorted in loop order.\n* - **sz**: output ndarray strides sorted in loop order.\n*\n* @param {NonNegativeIntegerArray} sh - array dimensions\n* @param {IntegerArray} sx - first input array stride lengths\n* @param {IntegerArray} sy - second input array stride lengths\n* @param {IntegerArray} sz - output array stride lengths\n* @returns {Object} loop interchange data\n*\n* @example\n* var sh = [ 2, 3, 4 ];\n*\n* var sx = [ 12, 4, 1 ]; // row-major\n* var sy = [ 24, 8, 1 ]; // row-major\n* var sz = [ 1, -2, 6 ]; // column-major\n*\n* var o = loopOrder( sh, sx, sy, sz );\n* // returns {...}\n*\n* var ssh = o.sh;\n* // returns [ 4, 3, 2 ]\n*\n* var ssx = o.sx;\n* // returns [ 1, 4, 12 ]\n*\n* var ssy = o.sy;\n* // returns [ 1, 8, 24 ]\n*\n* var ssz = o.sz;\n* // returns [ 6, -2, 1 ]\n*/\nfunction loopOrder( sh, sx, sy, sz ) {\n\tvar idx;\n\tvar tmp;\n\tvar max;\n\tvar len;\n\tvar arr;\n\tvar ox;\n\tvar oy;\n\tvar oz;\n\tvar i;\n\tvar j;\n\n\t// Initialize a loop interchange index array for generating a loop order permutation:\n\tidx = zeroTo( sh.length );\n\n\t// Determine the order (layout) of each array:\n\tox = strides2order( sx );\n\toy = strides2order( sy );\n\toz = strides2order( sz );\n\n\t// Determine which array should be used to generate the loop order:\n\ttmp = filled( [], 4 );\n\ttmp[ ox ].push( sx );\n\ttmp[ oy ].push( sy );\n\ttmp[ oz ].push( sz );\n\tmax = tmp[ 0 ].length;\n\tif ( max === N ) {\n\t\t// If all arrays are \"disorganized\", then just use the first array, as, generally, each array is likely to be as un-ideal as every other:\n\t\tarr = sx;\n\t} else if ( max === N-1 ) {\n\t\t// If all but one array is \"disorganized\", find the \"organized\" array...\n\t\tfor ( i = 1; i < 4; i++ ) {\n\t\t\tif ( tmp[ i ].length ) {\n\t\t\t\tarr = tmp[ i ][ 0 ];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// Find the layout which is most common...\n\t\tj = 0;\n\t\tfor ( i = 1; i < 4; i++ ) {\n\t\t\tlen = tmp[ i ].length;\n\t\t\tif ( len >= max ) {\n\t\t\t\tmax = len;\n\t\t\t\tj = i;\n\t\t\t}\n\t\t}\n\t\t// Use the strides of the first array having the most common layout:\n\t\tarr = tmp[ j ][ 0 ];\n\t}\n\t// Sort array strides in increasing order (of magnitude):\n\tarr = copy( arr );\n\tsort2ins( arr, idx );\n\n\t// Permute the shape and array strides based on the sorted strides:\n\tsh = take( sh, idx );\n\tsx = ( sx === arr ) ? arr : take( sx, idx );\n\tsy = ( sy === arr ) ? arr : take( sy, idx );\n\tsz = ( sz === arr ) ? arr : take( sz, idx );\n\n\treturn {\n\t\t'sh': sh,\n\t\t'sx': sx,\n\t\t'sy': sy,\n\t\t'sz': sz\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = loopOrder;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Reorder ndarray dimensions and associated strides for loop interchange.\n*\n* @module @stdlib/ndarray/base/binary-loop-interchange-order\n*\n* @example\n* var binaryLoopOrder = require( '@stdlib/ndarray/base/binary-loop-interchange-order' );\n*\n* var sh = [ 2, 3, 4 ];\n*\n* var sx = [ 12, 4, 1 ]; // row-major\n* var sy = [ 24, 8, 1 ]; // row-major\n* var sz = [ 1, -2, 6 ]; // column-major\n*\n* var o = loopOrder( sh, sx, sy, sz );\n* // returns {...}\n*\n* var ssh = o.sh;\n* // returns [ 4, 3, 2 ]\n*\n* var ssx = o.sx;\n* // returns [ 1, 4, 12 ]\n*\n* var ssy = o.sy;\n* // returns [ 1, 8, 24 ]\n*\n* var ssz = o.sz;\n* // returns [ 6, -2, 1 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar defaults = {\n\t// Define a default block size (in bytes):\n\t'BLOCK_SIZE_IN_BYTES': 64|0, // 64b is a common cache line size. How applicable the common cache line size is here is debatable, given that, depending on the associated stride(s), the innermost loop may not iterate over adjacent elements. The primary goal is to have a block size in which all data within a block can always fit in (L1) cache, regardless of cache size (i.e., cache-oblivious). For reference, a common L1 cache size is 32kB per core. For best performance, block sizes should be tuned based on system hardware; however, such tuning is not readily available to us here. Without obvious better alternatives, 64b has some theoretical (and practical) underpinning, and it should be good enough for most inputs, especially for ndarrays with near contiguity.\n\n\t// Define a default block size (in elements):\n\t'BLOCK_SIZE_IN_ELEMENTS': 8|0 // 64 bytes / 8 bytes per element (i.e., default element size is same as a double)\n};\n\n\n// EXPORTS //\n\nmodule.exports = defaults;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar bytesPerElement = require( './../../../base/bytes-per-element' );\nvar defaults = require( './defaults.js' );\n\n\n// MAIN //\n\n/**\n* Returns a loop block size for multi-dimensional array tiled loops.\n*\n* @param {string} dtypeX - first input array data type\n* @param {string} dtypeY - second input array data type\n* @param {string} dtypeZ - output array data type\n* @returns {integer} block size (in units of elements)\n*\n* @example\n* var bsize = binaryBlockSize( 'float64', 'float64', 'float64' );\n* // returns \n*/\nfunction binaryBlockSize( dtypeX, dtypeY, dtypeZ ) {\n\tvar nbx;\n\tvar nby;\n\tvar nbz;\n\n\tnbx = bytesPerElement( dtypeX );\n\tnby = bytesPerElement( dtypeY );\n\tnbz = bytesPerElement( dtypeZ );\n\tif ( nbx === null || nby === null || nbz === null ) { // e.g., \"generic\" arrays\n\t\treturn defaults.BLOCK_SIZE_IN_ELEMENTS;\n\t}\n\tif ( nbx > nby && nbx > nbz ) {\n\t\treturn ( defaults.BLOCK_SIZE_IN_BYTES/nbx )|0; // asm type annotation\n\t}\n\tif ( nby > nbz ) {\n\t\treturn ( defaults.BLOCK_SIZE_IN_BYTES/nby )|0; // asm type annotation\n\t}\n\treturn ( defaults.BLOCK_SIZE_IN_BYTES/nbz )|0; // asm type annotation\n}\n\n\n// EXPORTS //\n\nmodule.exports = binaryBlockSize;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Resolve a loop block size for multi-dimensional array tiled loops.\n*\n* @module @stdlib/ndarray/base/binary-tiling-block-size\n*\n* @example\n* var binaryBlockSize = require( '@stdlib/ndarray/base/binary-tiling-block-size' );\n*\n* var bsize = binaryBlockSize( 'float64', 'float64', 'float64' );\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar format = require( '@stdlib/string/format' );\nvar trunc = require( '@stdlib/math/base/special/trunc' );\nvar abs = require( '@stdlib/math/base/special/abs' );\n\n\n// MAIN //\n\n/**\n* Converts a linear index in an underlying data buffer to a linear index in an array view.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - location of the first indexed value **based** on the stride array\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {integer} idx - linear index in an underlying data buffer\n* @param {string} mode - specifies how to handle a linear index which exceeds array dimensions\n* @throws {RangeError} linear index must not exceed array dimensions\n* @returns {NonNegativeInteger} linear index in an array view\n*\n* @example\n* var shape = [ 3, 3 ];\n* var strides = [ -3, 1 ];\n* var offset = 6;\n* var order = 'row-major';\n* var mode = 'throw';\n*\n* var ind = bind2vind( shape, strides, offset, order, 7, mode );\n* // returns 1\n*/\nfunction bind2vind( shape, strides, offset, order, idx, mode ) {\n\tvar ndims;\n\tvar len;\n\tvar ind;\n\tvar k;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\tlen = 1;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tlen *= shape[ i ];\n\t}\n\tif ( mode === 'clamp' ) {\n\t\tif ( idx < 0 ) {\n\t\t\tidx = 0;\n\t\t} else if ( idx >= len ) {\n\t\t\tidx = len - 1;\n\t\t}\n\t} else if ( mode === 'wrap' ) {\n\t\tif ( idx < 0 ) {\n\t\t\tidx += len; // slight optimization to avoid modulo arithmetic when |idx| <= len\n\t\t\tif ( idx < 0 ) {\n\t\t\t\tidx %= len;\n\t\t\t\tif ( idx !== 0 ) {\n\t\t\t\t\tidx += len;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( idx >= len ) {\n\t\t\tidx -= len; // slight optimization to avoid modulo arithmetic when len < idx <= 2*len\n\t\t\tif ( idx >= len ) {\n\t\t\t\tidx %= len;\n\t\t\t}\n\t\t}\n\t} else if ( idx < 0 || idx >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.', len, idx ) );\n\t}\n\t// The approach which follows is to resolve a buffer index to its subscripts and then plug the subscripts into the standard formula for computing the linear index in the array view (i.e., where all strides are positive and offset is 0)...\n\tind = 0;\n\tif ( order === 'column-major' ) {\n\t\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\t\ts = strides[ i ];\n\t\t\tif ( s < 0 ) {\n\t\t\t\tk = trunc( idx/s );\n\t\t\t\tidx -= k * s;\n\t\t\t\tk += shape[ i ] - 1;\n\t\t\t} else {\n\t\t\t\tk = trunc( idx/s );\n\t\t\t\tidx -= k * s;\n\t\t\t}\n\t\t\tind += k * abs( s );\n\t\t}\n\t\treturn ind;\n\t}\n\t// Case: row-major\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\ts = strides[ i ];\n\t\tif ( s < 0 ) {\n\t\t\tk = trunc( idx/s );\n\t\t\tidx -= k * s;\n\t\t\tk += shape[ i ] - 1;\n\t\t} else {\n\t\t\tk = trunc( idx/s );\n\t\t\tidx -= k * s;\n\t\t}\n\t\tind += k * abs( s );\n\t}\n\treturn ind;\n}\n\n\n// EXPORTS //\n\nmodule.exports = bind2vind;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a linear index in an underlying data buffer to a linear index in an array view.\n*\n* @module @stdlib/ndarray/base/bind2vind\n*\n* @example\n* var bind2vind = require( '@stdlib/ndarray/base/bind2vind' );\n*\n* var shape = [ 3, 3 ];\n* var strides = [ -3, 1 ];\n* var offset = 6;\n* var order = 'row-major';\n* var mode = 'throw';\n*\n* var ind = bind2vind( shape, strides, offset, order, 7, mode );\n* // returns 1\n*/\n\n// MODULES //\n\nvar bind2vind = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = bind2vind;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar copyIndexed = require( '@stdlib/array/base/copy-indexed' );\n\n\n// MAIN //\n\n/**\n* Returns the shape of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @param {boolean} copy - boolean indicating whether to explicitly copy the value assigned to the input ndarray's `shape` property\n* @returns {NonNegativeIntegerArray} shape\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var out = shape( zeros( [ 3, 3, 3 ] ), false );\n* // returns [ 3, 3, 3 ]\n*/\nfunction shape( x, copy ) {\n\tvar sh = x.shape;\n\tif ( copy ) {\n\t\treturn copyIndexed( sh );\n\t}\n\treturn sh;\n}\n\n\n// EXPORTS //\n\nmodule.exports = shape;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the shape of a provided ndarray.\n*\n* @module @stdlib/ndarray/base/shape\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var shape = require( '@stdlib/ndarray/base/shape' );\n*\n* var sh = shape( zeros( [ 3, 3, 3 ] ), false );\n* // returns [ 3, 3, 3 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar shape2strides = require( './../../../base/shape2strides' );\nvar copyIndexed = require( '@stdlib/array/base/copy-indexed' );\n\n\n// VARIABLES //\n\nvar ROW_MAJOR = 'row-major';\n\n\n// MAIN //\n\n/**\n* Returns the strides of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @param {boolean} copy - boolean indicating whether to explicitly copy the value assigned to the input ndarray's `strides` property\n* @returns {IntegerArray} strides\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var out = strides( zeros( [ 3, 3, 3 ] ), false );\n* // returns [ 9, 3, 1 ]\n*/\nfunction strides( x, copy ) {\n\tvar ord;\n\tvar sh;\n\tvar st;\n\n\tst= x.strides;\n\tif ( typeof st !== 'object' || st === null ) {\n\t\tsh = x.shape;\n\t\tif ( sh.length === 0 ) {\n\t\t\treturn [ 0 ];\n\t\t}\n\t\tord = x.order;\n\t\tif ( typeof ord !== 'string' ) {\n\t\t\tord = ROW_MAJOR;\n\t\t}\n\t\treturn shape2strides( sh, ord );\n\t}\n\tif ( copy ) {\n\t\treturn copyIndexed( st );\n\t}\n\treturn st;\n}\n\n\n// EXPORTS //\n\nmodule.exports = strides;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the strides of a provided ndarray.\n*\n* @module @stdlib/ndarray/base/strides\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var strides = require( '@stdlib/ndarray/base/strides' );\n*\n* var st = strides( zeros( [ 3, 3, 3 ] ), false );\n* // returns [ 9, 3, 1 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar strides2offset = require( './../../../base/strides2offset' );\n\n\n// MAIN //\n\n/**\n* Returns the index offset specifying the underlying buffer index of the first iterated ndarray element.\n*\n* @param {ndarrayLike} x - input ndarray\n* @returns {NonNegativeInteger} index offset\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var n = offset( zeros( [ 3, 3, 3 ] ) );\n* // returns 0\n*/\nfunction offset( x ) {\n\tvar st;\n\tvar sh;\n\tvar o;\n\n\to = x.offset;\n\tif ( typeof o === 'number' ) {\n\t\treturn o;\n\t}\n\tsh = x.shape;\n\tif ( sh.length === 0 ) {\n\t\treturn 0;\n\t}\n\tst = x.strides;\n\tif ( typeof st !== 'object' || st === null ) {\n\t\treturn 0;\n\t}\n\treturn strides2offset( sh, st );\n}\n\n\n// EXPORTS //\n\nmodule.exports = offset;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the index offset specifying the underlying buffer index of the first iterated ndarray element.\n*\n* @module @stdlib/ndarray/base/offset\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var offset = require( '@stdlib/ndarray/base/offset' );\n*\n* var n = offset( zeros( [ 3, 3, 3 ] ) );\n* // returns 0\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar strides2order = require( './../../../base/strides2order' );\n\n\n// VARIABLES //\n\nvar ROW_MAJOR = 'row-major';\nvar COLUMN_MAJOR = 'column-major';\n\n\n// MAIN //\n\n/**\n* Returns the layout order of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @returns {(string|null)} layout order\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'order': 'row-major'\n* });\n*\n* var out = order( x );\n* // returns 'row-major'\n*/\nfunction order( x ) {\n\tvar st;\n\tvar o;\n\n\to = x.order;\n\tif ( typeof o === 'string' ) {\n\t\treturn o;\n\t}\n\t// Try to infer the layout order from the strides array...\n\tst = x.strides;\n\tif ( typeof st !== 'object' || st === null ) {\n\t\treturn ROW_MAJOR; // WARNING: default to row-major for ndarray-like objects lacking strides. This may or may not be accurate, and we're defaulting to row-major here based on the belief that row-major is more likely given that, e.g., JavaScript arrays are similar to C arrays (i.e., stored in row-major order).\n\t}\n\to = strides2order( st );\n\tif ( o === 1 || o === 3 ) {\n\t\treturn ROW_MAJOR; // for o == 3 (both row- and column-major; e.g., one-dimensional ndarrays), default to row-major\n\t}\n\tif ( o === 2 ) {\n\t\treturn COLUMN_MAJOR;\n\t}\n\t// o === 0\n\tif ( x.shape.length === 0 ) {\n\t\treturn ROW_MAJOR; // default to row-major for zero-dimensional ndarrays\n\t}\n\t// Case: mixed strides (e.g., [ 2, 3, 1 ] )\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = order;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the layout order of a provided ndarray.\n*\n* @module @stdlib/ndarray/base/order\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var order = require( '@stdlib/ndarray/base/order' );\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'order': 'row-major'\n* });\n*\n* var out = order( x );\n* // returns 'row-major'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the data type of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @returns {string} data type\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'dtype': 'float64'\n* });\n*\n* var dt = dtype( x );\n* // returns 'float64'\n*/\nfunction dtype( x ) {\n\treturn x.dtype;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dtype;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the data type of a provided ndarray.\n*\n* @module @stdlib/ndarray/base/dtype\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var dtype = require( '@stdlib/ndarray/base/dtype' );\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'dtype': 'float64'\n* });\n*\n* var dt = dtype( x );\n* // returns 'float64'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the underlying data buffer of a provided ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @returns {Collection} underlying data buffer\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'dtype': 'float64'\n* });\n*\n* var out = data( x );\n* // returns \n*/\nfunction data( x ) {\n\treturn x.data;\n}\n\n\n// EXPORTS //\n\nmodule.exports = data;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the underlying data buffer of a provided ndarray.\n*\n* @module @stdlib/ndarray/base/data-buffer\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var data = require( '@stdlib/ndarray/base/data-buffer' );\n*\n* var x = zeros( [ 3, 3, 3 ], {\n* 'dtype': 'float64'\n* });\n*\n* var out = data( x );\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar copy = require( '@stdlib/array/base/copy-indexed' );\nvar ndarray = require( './../../../base/ctor' );\nvar getShape = require( './../../../base/shape' );\nvar getStrides = require('./../../../base/strides' );\nvar getOffset = require( './../../../base/offset' );\nvar getOrder = require( './../../../base/order' );\nvar getDType = require( './../../../base/dtype' );\nvar getData = require( './../../../base/data-buffer' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Broadcasts an ndarray to a specified shape.\n*\n* ## Notes\n*\n* - The returned array is a view on the input array data buffer. The view is typically **not** contiguous. As more than one element of a returned view may refer to the same memory location, writing to the view may affect multiple elements. If you need to write to the returned array, copy the array before performing operations which may mutate elements.\n*\n* @param {ndarray} arr - input array\n* @param {NonNegativeIntegerArray} shape - desired shape\n* @throws {Error} input array cannot have more dimensions than the desired shape\n* @throws {Error} input array dimension sizes must be `1` or equal to the corresponding dimension in the provided shape\n* @throws {Error} input array and desired shape must be broadcast compatible\n* @returns {ndarray} broadcasted array\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var shx = x.shape;\n* // returns [ 2, 2 ]\n*\n* var y = broadcastArray( x, [ 3, 2, 2 ] );\n* // returns \n*\n* var shy = y.shape;\n* // returns [ 3, 2, 2 ]\n*\n* var v = y.get( 0, 0, 0 );\n* // returns 1\n*\n* v = y.get( 0, 0, 1 );\n* // returns 2\n*\n* v = y.get( 1, 0, 0 );\n* // returns 1\n*\n* v = y.get( 1, 1, 0 );\n* // returns 3\n*\n* v = y.get( 2, 0, 0 );\n* // returns 1\n*\n* v = y.get( 2, 1, 1 );\n* // returns 4\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var y = broadcastArray( x, [ 3, 2 ] );\n* // throws \n*/\nfunction broadcastArray( arr, shape ) {\n\tvar strides;\n\tvar dim;\n\tvar sh;\n\tvar st;\n\tvar N;\n\tvar M;\n\tvar d;\n\tvar i;\n\tvar j;\n\n\tN = shape.length;\n\tsh = getShape( arr, false );\n\tM = sh.length;\n\tif ( N < M ) {\n\t\tthrow new Error( 'invalid argument. Cannot broadcast an array to a shape having fewer dimensions. Arrays can only be broadcasted to shapes having the same or more dimensions.' );\n\t}\n\t// Initialize a strides array...\n\tstrides = [];\n\tfor ( i = 0; i < N; i++ ) {\n\t\tstrides.push( 0 );\n\t}\n\t// Determine the output array strides...\n\tst = getStrides( arr, false );\n\tfor ( i = N-1; i >= 0; i-- ) {\n\t\tj = M - N + i;\n\t\tif ( j < 0 ) {\n\t\t\t// Prepended singleton dimension; stride is zero...\n\t\t\tcontinue;\n\t\t}\n\t\td = sh[ j ];\n\t\tdim = shape[ i ];\n\t\tif ( dim !== 0 && dim < d ) {\n\t\t\tthrow new Error( format( 'invalid argument. Input array cannot be broadcast to the specified shape, as the specified shape has a dimension whose size is less than the size of the corresponding dimension in the input array. Array shape: (%s). Desired shape: (%s). Dimension: %u.', copy( sh ).join( ', ' ), copy( shape ).join( ', ' ), i ) );\n\t\t}\n\t\tif ( d === dim ) {\n\t\t\tstrides[ i ] = st[ j ];\n\t\t} else if ( d === 1 ) {\n\t\t\t// In order to broadcast dimensions, we set the stride for that dimension to zero...\n\t\t\tstrides[ i ] = 0;\n\t\t} else {\n\t\t\t// At this point, we know that `dim > d` and that `d` does not equal `1` (e.g., `dim=3` and `d=2`); in which case, the shapes are considered incompatible (even for desired shapes which are multiples of array dimensions, as might be desired when \"tiling\" an array; e.g., `dim=4` and `d=2`)...\n\t\t\tthrow new Error( format( 'invalid argument. Input array and the specified shape are broadcast incompatible. Array shape: (%s). Desired shape: (%s). Dimension: %u.', copy( sh ).join( ', ' ), copy( shape ).join( ', ' ), i ) );\n\t\t}\n\t}\n\treturn ndarray( getDType( arr ), getData( arr ), copy( shape ), strides, getOffset( arr ), getOrder( arr ) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = broadcastArray;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Broadcast an ndarray to a specified shape.\n*\n* @module @stdlib/ndarray/base/broadcast-array\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var broadcastArray = require( '@stdlib/ndarray/base/broadcast-array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var shx = x.shape;\n* // returns [ 2, 2 ]\n*\n* var y = broadcastArray( x, [ 3, 2, 2 ] );\n* // returns \n*\n* var shy = y.shape;\n* // returns [ 3, 2, 2 ]\n*\n* var v = y.get( 0, 0, 0 );\n* // returns 1\n*\n* v = y.get( 0, 0, 1 );\n* // returns 2\n*\n* v = y.get( 1, 0, 0 );\n* // returns 1\n*\n* v = y.get( 1, 1, 0 );\n* // returns 3\n*\n* v = y.get( 2, 0, 0 );\n* // returns 1\n*\n* v = y.get( 2, 1, 1 );\n* // returns 4\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isAccessorArray = require( '@stdlib/array/base/assert/is-accessor-array' );\nvar accessorSetter = require( '@stdlib/array/base/accessor-setter' );\nvar setter = require( '@stdlib/array/base/setter' );\nvar zeros = require( '@stdlib/array/base/zeros' );\nvar buffer = require( './../../../base/buffer' );\nvar ndarray = require( './../../../base/ctor' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Broadcasts a scalar value to an ndarray having a specified shape.\n*\n* @param {*} value - scalar value\n* @param {string} dtype - output array data type\n* @param {NonNegativeIntegerArray} shape - output array shape\n* @param {string} order - memory layout (either row-major or column-major)\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {ndarray} ndarray\n*\n* @example\n* var x = broadcastScalar( 1.0, 'float64', [ 2, 2 ], 'row-major' );\n* // returns \n*\n* var sh = x.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = x.dtype;\n* // returns 'float64'\n*\n* var v = x.get( 0, 1 );\n* // returns 1.0\n*/\nfunction broadcastScalar( value, dtype, shape, order ) {\n\tvar buf;\n\tvar set;\n\n\tbuf = buffer( dtype, 1 );\n\tif ( buf === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a recognized data type. Value: `%s`.', dtype ) );\n\t}\n\tif ( /^complex/.test( dtype ) && typeof value === 'number' ) {\n\t\tvalue = [ value, 0.0 ]; // note: we're assuming that the ComplexXXArray setter accepts an array of interleaved real and imaginary components\n\t}\n\tif ( isAccessorArray( buf ) ) {\n\t\tset = accessorSetter( dtype );\n\t} else {\n\t\tset = setter( dtype );\n\t}\n\tset( buf, 0, value );\n\treturn new ndarray( dtype, buf, shape, zeros( shape.length ), 0, order );\n}\n\n\n// EXPORTS //\n\nmodule.exports = broadcastScalar;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Broadcast a scalar value to an ndarray having a specified shape.\n*\n* @module @stdlib/ndarray/base/broadcast-scalar\n*\n* @example\n* var broadcastScalar = require( '@stdlib/ndarray/base/broadcast-scalar' );\n*\n* var x = broadcastScalar( 1.0, 'float64', [ 2, 2 ], 'row-major' );\n* // returns \n*\n* var sh = x.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = x.dtype;\n* // returns 'float64'\n*\n* var v = x.get( 0, 1 );\n* // returns 1.0\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Broadcasts array shapes to a single shape.\n*\n* ## Notes\n*\n* - Two respective dimensions in two shape arrays are compatible if\n*\n* 1. the dimensions are equal.\n* 2. one dimension is `1`.\n*\n* - The function returns `null` if provided incompatible shapes (i.e., shapes which cannot be broadcast with one another).\n*\n* @param {Array} shapes - array of shape arrays\n* @returns {(NonNegativeIntegerArray|null)} broadcast shape (or `null`)\n*\n* @example\n* var shapes = [\n* [ 8, 1, 6, 1 ],\n* [ 7, 1, 5 ]\n* ];\n*\n* var out = broadcastShapes( shapes );\n* // returns [ 8, 7, 6, 5 ]\n*\n* @example\n* var shapes = [\n* [ 5, 4 ],\n* [ 1 ]\n* ];\n*\n* var out = broadcastShapes( shapes );\n* // returns [ 5, 4 ]\n*\n* @example\n* var shapes = [\n* [ 5, 4 ],\n* [ 4 ]\n* ];\n*\n* var out = broadcastShapes( shapes );\n* // returns [ 5, 4 ]\n*\n* @example\n* var shapes = [\n* [ 15, 3, 5 ],\n* [ 15, 1, 5 ]\n* ];\n*\n* var out = broadcastShapes( shapes );\n* // returns [ 15, 3, 5 ]\n*\n* @example\n* var shapes = [\n* [ 15, 3, 5 ],\n* [ 3, 5 ]\n* ];\n*\n* var out = broadcastShapes( shapes );\n* // returns [ 15, 3, 5 ]\n*\n* @example\n* var shapes = [\n* [ 15, 3, 5 ],\n* [ 3, 1 ]\n* ];\n*\n* var out = broadcastShapes( shapes );\n* // returns [ 15, 3, 5 ]\n*\n* @example\n* var shapes = [\n* [ 8, 1, 1, 6, 1 ],\n* [ 1, 7, 1, 5 ],\n* [ 8, 4, 1, 6, 5 ]\n* ];\n*\n* var out = broadcastShapes( shapes );\n* // returns [ 8, 4, 7, 6, 5 ]\n*\n* @example\n* var shapes = [\n* [ 8, 1, 1, 6, 1 ],\n* [ 0 ]\n* ];\n*\n* var out = broadcastShapes( shapes );\n* // returns [ 8, 1, 1, 6, 0 ]\n*\n* @example\n* var shapes = [\n* [ 8, 1, 1, 6, 1 ],\n* [ 8, 0, 1, 6, 1 ]\n* ];\n*\n* var out = broadcastShapes( shapes );\n* // returns [ 8, 0, 1, 6, 1 ]\n*\n* @example\n* var shapes = [\n* [ 8, 8, 1, 6, 1 ],\n* [ 8, 0, 1, 6, 1 ]\n* ];\n*\n* var out = broadcastShapes( shapes );\n* // returns null\n*\n* @example\n* var shapes = [\n* [ 8, 0, 1, 6, 1 ],\n* [ 8, 8, 1, 6, 1 ]\n* ];\n*\n* var out = broadcastShapes( shapes );\n* // returns null\n*\n* @example\n* var shapes = [\n* []\n* ];\n*\n* var out = broadcastShapes( shapes );\n* // returns []\n*\n* @example\n* var shapes = [\n* [],\n* []\n* ];\n*\n* var out = broadcastShapes( shapes );\n* // returns []\n*\n* @example\n* var shapes = [];\n*\n* var out = broadcastShapes( shapes );\n* // returns []\n*\n* @example\n* var shapes = [\n* [ 3, 2, 1 ],\n* []\n* ];\n*\n* var out = broadcastShapes( shapes );\n* // returns [ 3, 2, 1 ]\n*\n* @example\n* var shapes = [\n* [],\n* [ 3, 2, 1 ]\n* ];\n*\n* var out = broadcastShapes( shapes );\n* // returns [ 3, 2, 1 ]\n*/\nfunction broadcastShapes( shapes ) {\n\tvar ndims;\n\tvar out;\n\tvar dim;\n\tvar sh;\n\tvar n1;\n\tvar n2;\n\tvar d;\n\tvar M;\n\tvar N;\n\tvar i;\n\tvar j;\n\n\tM = shapes.length;\n\tout = [];\n\tif ( M === 0 ) {\n\t\treturn out;\n\t}\n\tsh = shapes[ 0 ];\n\tN = sh.length;\n\n\t// If provided a single input shape array, then the broadcast shape is input shape...\n\tif ( M === 1 ) {\n\t\t// Need to manually copy to output shape, as shapes could be array-like objects...\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tout.push( sh[ i ] );\n\t\t}\n\t\treturn out;\n\t}\n\t// Determine the maximum dimensionality...\n\tndims = [ N ];\n\tfor ( i = 1; i < M; i++ ) {\n\t\tndims.push( shapes[ i ].length );\n\t\tif ( ndims[ i ] > N ) {\n\t\t\tN = ndims[ i ];\n\t\t}\n\t}\n\t// Initialize the output array...\n\tfor ( i = 0; i < N; i++ ) {\n\t\tout.push( 0 );\n\t}\n\t// Compute the broadcast shape...\n\ti = N - 1;\n\twhile ( i >= 0 ) {\n\t\tn1 = ndims[ 0 ] - N + i;\n\t\tif ( n1 >= 0 ) {\n\t\t\tdim = sh[ n1 ];\n\t\t} else {\n\t\t\tdim = 1;\n\t\t}\n\t\tfor ( j = 1; j < M; j++ ) {\n\t\t\tn2 = ndims[ j ] - N + i;\n\t\t\tif ( n2 >= 0 ) {\n\t\t\t\td = shapes[ j ][ n2 ];\n\t\t\t} else {\n\t\t\t\td = 1;\n\t\t\t}\n\t\t\tif ( dim === 1 ) {\n\t\t\t\tdim = d;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( d === 1 || dim === d ) {\n\t\t\t\t// When either `d` is `1` or `d` equals the current output shape dimension, the current output shape dimension remains the same...\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// The current shape cannot be broadcast against one of the other shapes...\n\t\t\treturn null;\n\t\t}\n\t\tout[ i ] = dim;\n\t\ti -= 1;\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = broadcastShapes;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Broadcast array shapes to a single shape.\n*\n* @module @stdlib/ndarray/base/broadcast-shapes\n*\n* @example\n* var broadcastShapes = require( '@stdlib/ndarray/base/broadcast-shapes' );\n*\n* var shapes = [\n* [ 8, 1, 6, 1 ],\n* [ 7, 1, 5 ]\n* ];\n*\n* var out = broadcastShapes( shapes );\n* // returns [ 8, 7, 6, 5 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar str2enum = require( './../../../base/dtype-str2enum' );\nvar dtype = require( './../../../base/buffer-dtype' );\n\n\n// MAIN //\n\n/**\n* Returns the data type enumeration constant for a provided ndarray data buffer.\n*\n* @param {Collection} arr - strided array\n* @returns {(integer|null)} data type enumeration constant or null\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var x = new Float64Array( 10 );\n*\n* var c = dtypeEnum( x );\n* // returns \n*/\nfunction dtypeEnum( arr ) {\n\tvar dt = dtype( arr );\n\tif ( dt ) {\n\t\treturn str2enum( dt );\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dtypeEnum;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the data type enumeration constant for an ndarray data buffer.\n*\n* @module @stdlib/ndarray/base/buffer-dtype-enum\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var dtypeEnum = require( '@stdlib/ndarray/base/buffer-dtype-enum' );\n*\n* var x = new Float64Array( 10 );\n*\n* var c = dtypeEnum( x );\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an object mapping data type strings to single letter abbreviations.\n*\n* @private\n* @returns {Object} object mapping data type string to single letter abbreviations\n*/\nfunction table() {\n\treturn {\n\t\t'binary': 'r',\n\n\t\t'bool': 'x',\n\n\t\t'complex64': 'c',\n\t\t'complex128': 'z',\n\n\t\t'float16': 'h',\n\t\t'bfloat16': 'e',\n\t\t'float32': 'f',\n\t\t'float64': 'd',\n\t\t'float128': 'g',\n\n\t\t'generic': 'o',\n\n\t\t'int8': 's',\n\t\t'int16': 'k',\n\t\t'int32': 'i',\n\t\t'int64': 'l',\n\t\t'int128': 'm',\n\t\t'int256': 'n',\n\n\t\t'uint8': 'b',\n\t\t'uint8c': 'a',\n\t\t'uint16': 't',\n\t\t'uint32': 'u',\n\t\t'uint64': 'v',\n\t\t'uint128': 'w',\n\t\t'uint256': 'y'\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = table;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar resolve = require( './../../../base/dtype-resolve-str' );\nvar table = require( './table.js' );\n\n\n// VARIABLES //\n\nvar TABLE;\n\n\n// MAIN //\n\n/**\n* Returns the single letter character abbreviation for an underlying array data type.\n*\n* @param {*} [dtype] - data type value\n* @returns {(Object|string|null)} single letter character abbreviation(s)\n*\n* @example\n* var obj = dtypeChar();\n* // returns {...}\n*\n* @example\n* var ch = dtypeChar( 'float64' );\n* // returns 'd'\n*\n* ch = dtypeChar( 'generic' );\n* // returns 'o'\n*/\nfunction dtypeChar( dtype ) {\n\tif ( arguments.length === 0 ) {\n\t\treturn table();\n\t}\n\tif ( TABLE === void 0 ) {\n\t\tTABLE = table();\n\t}\n\treturn TABLE[ resolve( dtype ) ] || null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dtypeChar;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the single letter character abbreviation for an underlying array data type.\n*\n* @module @stdlib/ndarray/base/dtype-char\n*\n* @example\n* var dtypeChar = require( '@stdlib/ndarray/base/dtype-char' );\n*\n* var ch = dtypeChar( 'float64' );\n* // returns 'd'\n*\n* ch = dtypeChar( 'generic' );\n* // returns 'o'\n*\n* @example\n* var dtypeChar = require( '@stdlib/ndarray/base/dtype-char' );\n*\n* var obj = dtypeChar();\n* // returns {...}\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar objectInverse = require( '@stdlib/utils/object-inverse' );\nvar dtypeChar = require( './../../../base/dtype-char' );\n\n\n// VARIABLES //\n\nvar TABLE;\n\n\n// MAIN //\n\n/**\n* Returns the data type string associated with a provided single letter abbreviation.\n*\n* @param {string} ch - single letter character abbreviation\n* @returns {(Object|string|null)} data type string\n*\n* @example\n* var obj = char2dtype();\n* // returns {...}\n*\n* @example\n* var out = char2dtype( 'd' );\n* // returns 'float64'\n*\n* out = char2dtype( '(' );\n* // returns null\n*/\nfunction char2dtype( ch ) {\n\tif ( arguments.length === 0 ) {\n\t\treturn objectInverse( dtypeChar() );\n\t}\n\tif ( TABLE === void 0 ) {\n\t\tTABLE = objectInverse( dtypeChar() );\n\t}\n\treturn TABLE[ ch ] || null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = char2dtype;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the data type string associated with a provided single letter abbreviation.\n*\n* @module @stdlib/ndarray/base/char2dtype\n*\n* @example\n* var char2dtype = require( '@stdlib/ndarray/base/char2dtype' );\n*\n* var out = char2dtype();\n* // returns {...}\n*\n* @example\n* var char2dtype = require( '@stdlib/ndarray/base/char2dtype' );\n*\n* var out = char2dtype( 'd' );\n* // returns 'float64'\n*\n* out = char2dtype( '(' );\n* // returns null\n*/\n\n// MODULES //\n\nvar char2dtype = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = char2dtype;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an object mapping data type strings to descriptions.\n*\n* @private\n* @returns {Object} object mapping data type strings to descriptions\n*/\nfunction table() {\n\treturn {\n\t\t'binary': 'byte',\n\n\t\t'bool': 'boolean',\n\n\t\t'complex64': 'single-precision floating-point complex number',\n\t\t'complex128': 'double-precision floating-point complex number',\n\n\t\t'float16': 'half-precision floating-point number',\n\t\t'bfloat16': 'brain floating-point number',\n\t\t'float32': 'single-precision floating-point number',\n\t\t'float64': 'double-precision floating-point number',\n\t\t'float128': 'quadruple-precision floating-point number',\n\n\t\t'generic': 'generic array value',\n\n\t\t'int8': 'signed 8-bit integer',\n\t\t'int16': 'signed 16-bit integer',\n\t\t'int32': 'signed 32-bit integer',\n\t\t'int64': 'signed 64-bit integer',\n\t\t'int128': 'signed 128-bit integer',\n\t\t'int256': 'signed 256-bit integer',\n\n\t\t'uint8': 'unsigned 8-bit integer',\n\t\t'uint8c': 'unsigned 8-bit integer (clamped)',\n\t\t'uint16': 'unsigned 16-bit integer',\n\t\t'uint32': 'unsigned 32-bit integer',\n\t\t'uint64': 'unsigned 64-bit integer',\n\t\t'uint128': 'unsigned 128-bit integer',\n\t\t'uint256': 'unsigned 256-bit integer'\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = table;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar resolve = require( './../../../base/dtype-resolve-str' );\nvar table = require( './table.js' );\n\n\n// VARIABLES //\n\nvar TABLE;\n\n\n// MAIN //\n\n/**\n* Returns the description for a provided data type.\n*\n* @param {*} [dtype] - data type value\n* @returns {(Object|string|null)} description(s)\n*\n* @example\n* var obj = dtypeDesc();\n* // returns {...}\n*\n* @example\n* var desc = dtypeDesc( 'float64' );\n* // returns '...'\n*\n* desc = dtypeDesc( 'generic' );\n* // returns '...'\n*/\nfunction dtypeDesc( dtype ) {\n\tif ( arguments.length === 0 ) {\n\t\treturn table();\n\t}\n\tif ( TABLE === void 0 ) {\n\t\tTABLE = table();\n\t}\n\treturn TABLE[ resolve( dtype ) ] || null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dtypeDesc;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the description for a specified data type.\n*\n* @module @stdlib/ndarray/base/dtype-desc\n*\n* @example\n* var dtypeDesc = require( '@stdlib/ndarray/base/dtype-desc' );\n*\n* var out = dtypeDesc( 'float64' );\n* // returns '...'\n*\n* out = dtypeDesc( 'generic' );\n* // returns '...'\n*\n* @example\n* var dtypeDesc = require( '@stdlib/ndarray/base/dtype-desc' );\n*\n* var obj = dtypeDesc();\n* // returns {...}\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar enum2str = require( './../../../base/dtype-enum2str' );\nvar str2enum = require( './../../../base/dtype-str2enum' );\n\n\n// MAIN //\n\n/**\n* Returns the enumeration constant associated with a supported ndarray data type value.\n*\n* ## Notes\n*\n* - Downstream consumers of this function should **not** rely on specific integer values (e.g., `INT8 == 0`). Instead, the function should be used in an opaque manner.\n*\n* @param {*} dtype - data type value\n* @returns {(integer|null)} enumeration constant or null\n*\n* @example\n* var v = resolve( 'int8' );\n* // returns \n*/\nfunction resolve( dtype ) {\n\tvar t = ( typeof dtype );\n\tif ( t === 'number' ) {\n\t\treturn ( enum2str( dtype ) ) ? dtype : null;\n\t}\n\tif ( t === 'string' ) {\n\t\treturn str2enum( dtype );\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = resolve;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the enumeration constant associated with a supported ndarray data type value.\n*\n* @module @stdlib/ndarray/base/dtype-resolve-enum\n*\n* @example\n* var resolve = require( '@stdlib/ndarray/base/dtype-resolve-enum' );\n*\n* var v = resolve( 'float64' );\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "{\n\t\"binary\": null,\n\t\"bool\": \"bool\",\n\t\"complex64\": \"stdlib_complex64_t\",\n\t\"complex128\": \"stdlib_complex128_t\",\n\t\"float16\": null,\n\t\"bfloat16\": null,\n\t\"float32\": \"float\",\n\t\"float64\": \"double\",\n\t\"float128\": null,\n\t\"generic\": null,\n\t\"int8\": \"int8_t\",\n\t\"int16\": \"int16_t\",\n\t\"int32\": \"int32_t\",\n\t\"int64\": \"int64_t\",\n\t\"int128\": null,\n\t\"int256\": null,\n\t\"uint8\": \"uint8_t\",\n\t\"uint8c\": null,\n\t\"uint16\": \"uint16_t\",\n\t\"uint32\": \"uint32_t\",\n\t\"uint64\": \"uint64_t\",\n\t\"uint128\": null,\n\t\"uint256\": null\n}\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar resolve = require( './../../../base/dtype-resolve-str' );\nvar TABLE = require( './table.json' );\n\n\n// MAIN //\n\n/**\n* Returns the C data type associated with a provided data type string.\n*\n* @param {*} dtype - data type value\n* @returns {(string|null)} C data type\n*\n* @example\n* var out = dtype2c( 'float64' );\n* // returns 'double'\n*\n* out = dtype2c( 'generic' );\n* // returns null\n*/\nfunction dtype2c( dtype ) {\n\treturn TABLE[ resolve( dtype ) ] || null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dtype2c;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the C data type associated with a provided data type value.\n*\n* @module @stdlib/ndarray/base/dtype2c\n*\n* @example\n* var dtype2c = require( '@stdlib/ndarray/base/dtype2c' );\n*\n* var out = dtype2c( 'float64' );\n* // returns 'double'\n*\n* out = dtype2c( 'generic' );\n* // returns null\n*/\n\n// MODULES //\n\nvar dtype2c = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = dtype2c;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isArrayLikeObject = require( '@stdlib/assert/is-array-like-object' );\nvar isNonNegativeInteger = require( '@stdlib/assert/is-nonnegative-integer' ).isPrimitive;\nvar resolve = require( './../../../base/dtype-resolve-str' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Transforms a list of array argument data types into a list of signatures.\n*\n* @param {ArrayLikeObject} dtypes - list of array argument data types\n* @param {NonNegativeInteger} nin - number of input array arguments\n* @param {NonNegativeInteger} nout - number of output array arguments\n* @throws {TypeError} first argument must be an array-like object\n* @throws {TypeError} second argument must be a nonnegative integer\n* @throws {TypeError} third argument must be a nonnegative integer\n* @throws {RangeError} first argument must contain at least one element\n* @throws {RangeError} length of the first argument is incompatible with the second and third arguments\n* @returns {StringArray} list of signatures\n*\n* @example\n* var dtypes = [\n* 'float64', 'float64',\n* 'float32', 'float32'\n* ];\n*\n* var sigs = dtypes2signatures( dtypes, 1, 1 );\n* // returns [ '(float64) => (float64)', '(float32) => (float32)' ]\n*/\nfunction dtypes2signatures( dtypes, nin, nout ) {\n\tvar len;\n\tvar out;\n\tvar tmp;\n\tvar dt;\n\tvar N;\n\tvar M;\n\tvar i;\n\tvar m;\n\n\tif ( !isArrayLikeObject( dtypes ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object. Value: `%s`.', dtypes ) );\n\t}\n\tif ( !isNonNegativeInteger( nin ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a nonnegative integer. Value: `%s`.', nin ) );\n\t}\n\tif ( !isNonNegativeInteger( nout ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Third argument must be a nonnegative integer. Value: `%s`.', nout ) );\n\t}\n\tlen = dtypes.length;\n\tif ( len === 0 ) {\n\t\tthrow new RangeError( 'invalid argument. First argument must contain at least one element.' );\n\t}\n\tN = nin + nout;\n\tif ( len%N !== 0 ) {\n\t\tthrow new RangeError( 'invalid arguments. Length of the first argument is incompatible with the second and third arguments.' );\n\t}\n\tout = [];\n\n\t// Create a temporary array for storing signatures...\n\ttmp = [];\n\n\t// [ '(', , ', ', ..., ') => (', , ', ', ..., ')' ] => 1+nin+nin-1+1+nout+nout-1+1 => 1 + (2*nin) + (2*nout) => 1 + (2*(nin+nout))\n\tM = 2 * N;\n\tm = 2 * nin;\n\tfor ( i = 0; i <= M; i++ ) {\n\t\tif ( i === 0 ) {\n\t\t\tif ( i === m ) {\n\t\t\t\ttmp.push( '() => (' );\n\t\t\t} else {\n\t\t\t\ttmp.push( '(' );\n\t\t\t}\n\t\t} else if ( i === M ) {\n\t\t\tif ( i === m ) {\n\t\t\t\ttmp.push( ') => ()' );\n\t\t\t} else {\n\t\t\t\ttmp.push( ')' );\n\t\t\t}\n\t\t} else if ( i === m ) {\n\t\t\ttmp.push( ') => (' );\n\t\t} else if ( i%2 === 1 ) {\n\t\t\ttmp.push( '' );\n\t\t} else {\n\t\t\ttmp.push( ', ' );\n\t\t}\n\t}\n\tfor ( i = 0; i < len; i++ ) {\n\t\tdt = resolve( dtypes[ i ] );\n\t\tif ( dt === null ) {\n\t\t\tdt = dtypes[ i ];\n\t\t}\n\t\tm = i % N;\n\t\ttmp[ (2*m)+1 ] = dt;\n\t\tif ( m === N-1 ) {\n\t\t\tout.push( tmp.join( '' ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dtypes2signatures;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Transform a list of array argument data types into a list of signatures.\n*\n* @module @stdlib/ndarray/base/dtypes2signatures\n*\n* @example\n* var dtypes2signatures = require( '@stdlib/ndarray/base/dtypes2signatures' );\n*\n* var dtypes = [\n* 'float64', 'float64',\n* 'float32', 'float32'\n* ];\n*\n* var sigs = dtypes2signatures( dtypes, 2, 0 );\n* // returns [ '(float64) => (float64)', '(float32) => (float32)' ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar shape2strides = require( './../../../base/shape2strides' );\nvar strides2offset = require( './../../../base/strides2offset' );\nvar ndarray = require( './../../../base/ctor' );\nvar numel = require( './../../../base/numel' );\nvar emptyArray = require( '@stdlib/array/empty' );\nvar allocUnsafe = require( '@stdlib/buffer/alloc-unsafe' );\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized ndarray having a specified shape and data type.\n*\n* @param {string} dtype - data type\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {string} order - array order\n* @throws {TypeError} first argument must be a recognized data type\n* @returns {ndarray} ndarray\n*\n* @example\n* var arr = empty( 'float32', [ 2, 2 ], 'row-major' );\n* // returns \n*\n* var sh = arr.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = arr.dtype;\n* // returns 'float32'\n*/\nfunction empty( dtype, shape, order ) {\n\tvar ndims;\n\tvar buf;\n\tvar len;\n\tvar st;\n\n\tndims = shape.length;\n\tif ( ndims > 0 ) {\n\t\tlen = numel( shape );\n\t\tst = shape2strides( shape, order );\n\t} else {\n\t\t// For 0-dimensional arrays, the buffer should contain a single element...\n\t\tlen = 1;\n\t\tst = [ 0 ];\n\t}\n\tif ( dtype === 'binary' ) {\n\t\tbuf = allocUnsafe( len );\n\t} else {\n\t\tbuf = emptyArray( len, dtype );\n\t}\n\treturn new ndarray( dtype, buf, shape, st, strides2offset( shape, st ), order ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = empty;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create an uninitialized ndarray having a specified shape and data type.\n*\n* @module @stdlib/ndarray/base/empty\n*\n* @example\n* var empty = require( '@stdlib/ndarray/base/empty' );\n*\n* var arr = empty( 'float32', [ 2, 2 ], 'row-major' );\n* // returns \n*\n* var sh = arr.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = arr.dtype;\n* // returns 'float32'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar shape2strides = require( './../../../base/shape2strides' );\nvar strides2offset = require( './../../../base/strides2offset' );\nvar numel = require( './../../../base/numel' );\nvar getDType = require( './../../../base/dtype' );\nvar getShape = require( './../../../base/shape' );\nvar getOrder = require( './../../../base/order' );\nvar emptyArray = require( '@stdlib/array/empty' );\nvar allocUnsafe = require( '@stdlib/buffer/alloc-unsafe' );\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized ndarray having the same shape and data type as a provided ndarray.\n*\n* @param {ndarray} x - input array\n* @throws {TypeError} first argument must have a recognized data type\n* @returns {ndarray} ndarray\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/base/zeros' );\n*\n* var x = zeros( 'float32', [ 2, 2 ], 'row-major' );\n* // returns \n*\n* var y = emptyLike( x );\n* // returns \n*\n* var sh = y.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = y.dtype;\n* // returns 'float32'\n*/\nfunction emptyLike( x ) {\n\tvar ndims;\n\tvar len;\n\tvar buf;\n\tvar ord;\n\tvar sh;\n\tvar st;\n\tvar dt;\n\n\tdt = getDType( x );\n\tsh = getShape( x, true );\n\tord = getOrder( x );\n\n\tndims = sh.length;\n\tif ( ndims > 0 ) {\n\t\tlen = numel( sh );\n\t\tst = shape2strides( sh, ord );\n\t} else {\n\t\t// For 0-dimensional arrays, the buffer should contain a single element...\n\t\tlen = 1;\n\t\tst = [ 0 ];\n\t}\n\tif ( dt === 'binary' ) {\n\t\tbuf = allocUnsafe( len );\n\t} else {\n\t\tbuf = emptyArray( len, dt );\n\t}\n\treturn new x.constructor( dt, buf, sh, st, strides2offset( sh, st ), ord );\n}\n\n\n// EXPORTS //\n\nmodule.exports = emptyLike;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create an uninitialized ndarray having the same shape and data type as a provided ndarray.\n*\n* @module @stdlib/ndarray/base/empty-like\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/base/zeros' );\n* var emptyLike = require( '@stdlib/ndarray/base/empty-like' );\n*\n* var x = zeros( 'float32', [ 2, 2 ], 'row-major' );\n* // returns \n*\n* var y = emptyLike( x );\n* // returns \n*\n* var sh = y.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = y.dtype;\n* // returns 'float32'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isReadOnly = require( './../../../base/assert/is-read-only' );\nvar getDType = require( './../../../base/dtype' );\nvar getShape = require( './../../../base/shape' );\nvar getStrides = require( './../../../base/strides' );\nvar getOffset = require( './../../../base/offset' );\nvar getOrder = require( './../../../base/order' );\nvar getData = require( './../../../base/data-buffer' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Expands the shape of an array by inserting a new dimension of size one at a specified axis.\n*\n* ## Notes\n*\n* - A provided axis must reside on the interval `[-N-1, N]`, where `N` is the rank (i.e., number of dimensions) of the provided input array. If provided a negative `axis`, the axis position at which to insert a singleton dimension is computed as `N + axis + 1`. Hence, if provided `-1`, the resolved axis position is `N` (i.e., a singleton dimension is appended to the input array).\n*\n* @param {ndarray} x - input array\n* @param {integer} axis - axis at which to insert a singleton dimension\n* @throws {RangeError} must provide a valid axis\n* @returns {ndarray} output array\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var shx = x.shape;\n* // returns [ 2, 2 ]\n*\n* var y = expandDimensions( x, 1 );\n* // returns \n*\n* var shy = y.shape;\n* // returns [ 2, 1, 2 ]\n*\n* var v = y.get( 0, 0, 0 );\n* // returns 1\n*\n* v = y.get( 0, 0, 1 );\n* // returns 2\n*\n* v = y.get( 1, 0, 0 );\n* // returns 3\n*\n* v = y.get( 1, 0, 1 );\n* // returns 4\n*/\nfunction expandDimensions( x, axis ) {\n\tvar strides;\n\tvar shape;\n\tvar ord;\n\tvar sh;\n\tvar st;\n\tvar N;\n\tvar i;\n\n\tsh = getShape( x, false );\n\tst = getStrides( x, false );\n\tord = getOrder( x );\n\tN = sh.length;\n\n\tstrides = [];\n\tshape = [];\n\n\tif ( axis < 0 ) {\n\t\tif ( axis < -N-1 ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Specified axis is out-of-bounds. Must be on the interval: [-%u-1, %u]. Value: `%d`.', N, N, axis ) );\n\t\t}\n\t\taxis += N + 1;\n\t} else if ( axis > N ) {\n\t\tthrow new RangeError( format( 'invalid argument. Specified axis is out-of-bounds. Must be on the interval: [-%u-1, %u]. Value: `%d`.', N, N, axis ) );\n\t}\n\tif ( axis === 0 ) {\n\t\t// Prepend singleton dimension...\n\t\tshape.push( 1 );\n\t\tstrides.push( st[ 0 ] );\n\n\t\t// Copy remaining dimensions...\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tshape.push( sh[ i ] );\n\t\t\tstrides.push( st[ i ] );\n\t\t}\n\t} else if ( axis === N ) {\n\t\t// Copy dimensions...\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tshape.push( sh[ i ] );\n\t\t\tstrides.push( st[ i ] );\n\t\t}\n\t\t// Append singleton dimension...\n\t\tshape.push( 1 );\n\t\tstrides.push( st[ N-1 ] );\n\t} else {\n\t\t// Insert a singleton dimension...\n\t\tfor ( i = 0; i < N+1; i++ ) {\n\t\t\tif ( i === axis ) {\n\t\t\t\tshape.push( 1 );\n\t\t\t\tif ( ord === 'row-major' ) {\n\t\t\t\t\tstrides.push( st[ i-1 ] );\n\t\t\t\t} else { // ord === 'column-major'\n\t\t\t\t\tstrides.push( st[ i ] );\n\t\t\t\t}\n\t\t\t} else if ( i < axis ) {\n\t\t\t\tshape.push( sh[ i ] );\n\t\t\t\tstrides.push( st[ i ] );\n\t\t\t} else { // i > axis\n\t\t\t\tshape.push( sh[ i-1 ] );\n\t\t\t\tstrides.push( st[ i-1 ] );\n\t\t\t}\n\t\t}\n\t}\n\tif ( isReadOnly( x ) ) {\n\t\t// If provided a read-only view, the returned array should also be read-only...\n\t\treturn new x.constructor( getDType( x ), getData( x ), shape, strides, getOffset( x ), ord, { // eslint-disable-line max-len\n\t\t\t'readonly': true\n\t\t});\n\t}\n\treturn new x.constructor( getDType( x ), getData( x ), shape, strides, getOffset( x ), ord ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = expandDimensions;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Expand the shape of an array by inserting a new dimension of size one at a specified axis.\n*\n* @module @stdlib/ndarray/base/expand-dimensions\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var expandDimensions = require( '@stdlib/ndarray/base/expand-dimensions' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var shx = x.shape;\n* // returns [ 2, 2 ]\n*\n* var y = expandDimensions( x, 1 );\n* // returns \n*\n* var shy = y.shape;\n* // returns [ 2, 1, 2 ]\n*\n* var v = y.get( 0, 0, 0 );\n* // returns 1\n*\n* v = y.get( 0, 0, 1 );\n* // returns 2\n*\n* v = y.get( 1, 0, 0 );\n* // returns 3\n*\n* v = y.get( 1, 0, 1 );\n* // returns 4\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isAccessorArray = require( '@stdlib/array/base/assert/is-accessor-array' );\nvar accessorSetter = require( '@stdlib/array/base/accessor-setter' );\nvar setter = require( '@stdlib/array/base/setter' );\nvar buffer = require( './../../../base/buffer' );\nvar ndarray = require( './../../../base/ctor' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns a zero-dimensional ndarray containing a provided scalar value.\n*\n* @param {*} value - scalar value\n* @param {string} dtype - output array data type\n* @param {string} order - memory layout (either 'row-major' or 'column-major')\n* @throws {TypeError} second argument must be a recognized data type\n* @returns {ndarray} ndarray\n*\n* @example\n* var x = scalar2ndarray( 1.0, 'float64', 'row-major' );\n* // returns \n*\n* var sh = x.shape;\n* // returns []\n*\n* var dt = x.dtype;\n* // returns 'float64'\n*\n* var v = x.get();\n* // returns 1.0\n*/\nfunction scalar2ndarray( value, dtype, order ) {\n\tvar buf;\n\tvar set;\n\n\tbuf = buffer( dtype, 1 );\n\tif ( buf === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a recognized data type. Value: `%s`.', dtype ) );\n\t}\n\tif ( /^complex/.test( dtype ) && typeof value === 'number' ) {\n\t\tvalue = [ value, 0.0 ]; // note: we're assuming that the ComplexXXArray setter accepts an array of interleaved real and imaginary components\n\t}\n\tif ( isAccessorArray( buf ) ) {\n\t\tset = accessorSetter( dtype );\n\t} else {\n\t\tset = setter( dtype );\n\t}\n\tset( buf, 0, value );\n\treturn new ndarray( dtype, buf, [], [ 0 ], 0, order );\n}\n\n\n// EXPORTS //\n\nmodule.exports = scalar2ndarray;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a scalar value to a zero-dimensional ndarray.\n*\n* @module @stdlib/ndarray/base/from-scalar\n*\n* @example\n* var scalar2ndarray = require( '@stdlib/ndarray/base/from-scalar' );\n*\n* var x = scalar2ndarray( 1.0, 'float64', 'row-major' );\n* // returns \n*\n* var sh = x.shape;\n* // returns []\n*\n* var dt = x.dtype;\n* // returns 'float64'\n*\n* var v = x.get();\n* // returns 1.0\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar format = require( '@stdlib/string/format' );\nvar trunc = require( '@stdlib/math/base/special/trunc' );\n\n\n// MAIN //\n\n/**\n* Converts a linear index to an array of subscripts.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - location of the first indexed value **based** on the stride array\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {integer} idx - linear index\n* @param {string} mode - specifies how to handle a linear index which exceeds array dimensions\n* @param {(Array|TypedArray|Object)} out - destination object\n* @throws {RangeError} linear index must not exceed array dimensions\n* @returns {(Array|TypedArray|Object)} subscripts\n*\n* @example\n* var shape = [ 3, 3, 3 ];\n* var strides = [ 9, 6, 1 ];\n* var offset = 0;\n* var order = 'row-major';\n*\n* var s = [ 0, 0, 0 ];\n* var out = ind2sub( shape, strides, offset, order, 17, 'throw', s );\n* // returns [ 1, 2, 2 ]\n*\n* var bool = ( out === s );\n* // returns true\n*/\nfunction ind2sub( shape, strides, offset, order, idx, mode, out ) {\n\tvar ndims;\n\tvar len;\n\tvar k;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\tlen = 1;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tlen *= shape[ i ];\n\t}\n\tif ( mode === 'clamp' ) {\n\t\tif ( idx < 0 ) {\n\t\t\tidx = 0;\n\t\t} else if ( idx >= len ) {\n\t\t\tidx = len - 1;\n\t\t}\n\t} else if ( mode === 'wrap' ) {\n\t\tif ( idx < 0 ) {\n\t\t\tidx += len; // slight optimization to avoid modulo arithmetic when |idx| <= len\n\t\t\tif ( idx < 0 ) {\n\t\t\t\tidx %= len;\n\t\t\t\tif ( idx !== 0 ) {\n\t\t\t\t\tidx += len;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( idx >= len ) {\n\t\t\tidx -= len; // slight optimization to avoid modulo arithmetic when len < idx <= 2*len\n\t\t\tif ( idx >= len ) {\n\t\t\t\tidx %= len;\n\t\t\t}\n\t\t}\n\t} else if ( idx < 0 || idx >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.', len, idx ) );\n\t}\n\tif ( offset === 0 ) {\n\t\tif ( order === 'column-major' ) {\n\t\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\t\ts = idx % shape[ i ];\n\t\t\t\tidx -= s;\n\t\t\t\tidx /= shape[ i ];\n\t\t\t\tout[ i ] = s;\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\t// Case: row-major\n\t\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\t\ts = idx % shape[ i ];\n\t\t\tidx -= s;\n\t\t\tidx /= shape[ i ];\n\t\t\tout[ i ] = s;\n\t\t}\n\t\treturn out;\n\t}\n\tif ( order === 'column-major' ) {\n\t\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\t\ts = strides[ i ];\n\t\t\tif ( s < 0 ) {\n\t\t\t\tk = trunc( idx/s );\n\t\t\t\tidx -= k * s;\n\t\t\t\tout[ i ] = shape[ i ] - 1 + k;\n\t\t\t} else {\n\t\t\t\tk = trunc( idx/s );\n\t\t\t\tidx -= k * s;\n\t\t\t\tout[ i ] = k;\n\t\t\t}\n\t\t}\n\t\treturn out;\n\t}\n\t// Case: row-major\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\ts = strides[ i ];\n\t\tif ( s < 0 ) {\n\t\t\tk = trunc( idx/s );\n\t\t\tidx -= k * s;\n\t\t\tout[ i ] = shape[ i ] - 1 + k;\n\t\t} else {\n\t\t\tk = trunc( idx/s );\n\t\t\tidx -= k * s;\n\t\t\tout[ i ] = k;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ind2sub;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar getSubscripts = require( './assign.js' );\n\n\n// MAIN //\n\n/**\n* Converts a linear index to an array of subscripts.\n*\n* ## Notes\n*\n* - The function accepts the following \"modes\":\n*\n* - `throw`: throws an error when a linear index exceeds array dimensions.\n* - `wrap`: wrap around a linear index exceeding array dimensions using modulo arithmetic.\n* - `clamp`: set a linear index exceeding array dimensions to either `0` (minimum linear index) or the maximum linear index.\n*\n* - When provided a stride array containing negative strides, if an `offset` is greater than `0`, the function interprets the linear index as an index into the underlying data buffer for the array, thus returning subscripts from the perspective of that buffer. If an `offset` is equal to `0`, the function treats the linear index as an index into an array view, thus returning subscripts from the perspective of that view.\n*\n* ```text\n* Dims: 2x2\n* Buffer: [ 1, 2, 3, 4 ]\n*\n* View = [ a00, a01,\n* a10, a11 ]\n*\n* Strides: 2,1\n* Offset: 0\n*\n* View = [ 1, 2,\n* 3, 4 ]\n*\n* Strides: 2,-1\n* Offset: 1\n*\n* View = [ 2, 1,\n* 4, 3 ]\n*\n* Strides: -2,1\n* Offset: 2\n*\n* View = [ 3, 4,\n* 1, 2 ]\n*\n* Strides: -2,-1\n* Offset: 3\n*\n* View = [ 4, 3,\n* 2, 1 ]\n* ```\n*\n* ```javascript\n* var shape = [ 2, 2 ];\n* var order = 'row-major';\n* var strides = [ -2, 1 ];\n* var offset = 2;\n* var mode = 'throw';\n*\n* // From the perspective of a view...\n* var s = ind2sub( shape, strides, 0, order, 0, mode );\n* // returns [ 0, 0 ]\n*\n* s = ind2sub( shape, strides, 0, order, 1, mode );\n* // returns [ 0, 1 ]\n*\n* s = ind2sub( shape, strides, 0, order, 2, mode );\n* // returns [ 1, 0 ]\n*\n* s = ind2sub( shape, strides, 0, order, 3, mode );\n* // returns [ 1, 1 ]\n*\n* // From the perspective of an underlying buffer...\n* s = ind2sub( shape, strides, offset, order, 0, mode );\n* // returns [ 1, 0 ]\n*\n* s = ind2sub( shape, strides, offset, order, 1, mode );\n* // returns [ 1, 1 ]\n*\n* s = ind2sub( shape, strides, offset, order, 2, mode );\n* // returns [ 0, 0 ]\n*\n* s = ind2sub( shape, strides, offset, order, 3, mode );\n* // returns [ 0, 1 ]\n* ```\n*\n* In short, from the perspective of a view, view data is always ordered.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - location of the first indexed value **based** on the stride array\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {integer} idx - linear index\n* @param {string} mode - specifies how to handle a linear index which exceeds array dimensions\n* @throws {RangeError} linear index must not exceed array dimensions\n* @returns {Array} subscripts\n*\n* @example\n* var shape = [ 3, 3, 3 ];\n* var strides = [ 9, 6, 1 ];\n* var offset = 0;\n* var order = 'row-major';\n*\n* var s = ind2sub( shape, strides, offset, order, 17, 'throw' );\n* // returns [ 1, 2, 2 ]\n*/\nfunction ind2sub( shape, strides, offset, order, idx, mode ) {\n\tvar out;\n\tvar i;\n\n\tout = [];\n\tfor ( i = 0; i < shape.length; i++ ) {\n\t\tout.push( 0 );\n\t}\n\treturn getSubscripts( shape, strides, offset, order, idx, mode, out );\n}\n\n\n// EXPORTS //\n\nmodule.exports = ind2sub;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a linear index to an array of subscripts.\n*\n* @module @stdlib/ndarray/base/ind2sub\n*\n* @example\n* var ind2sub = require( '@stdlib/ndarray/base/ind2sub' );\n*\n* var shape = [ 3, 3, 3 ];\n* var strides = [ 9, 6, 1 ];\n* var offset = 0;\n*\n* var s = ind2sub( shape, strides, offset, 'row-major', 17, 'throw' );\n* // returns [ 1, 2, 2 ]\n*\n* @example\n* var ind2sub = require( '@stdlib/ndarray/base/ind2sub' );\n*\n* var shape = [ 3, 3, 3 ];\n* var strides = [ 9, 6, 1 ];\n* var offset = 0;\n*\n* var s = [ 0, 0, 0 ];\n* var out = ind2sub.assign( shape, strides, offset, 'row-major', 17, 'throw', s );\n* // returns [ 1, 2, 2 ]\n*\n* var bool = ( out === s );\n* // returns true\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar assign = require( './assign.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Computes the maximum linear index in an underlying data buffer accessible to an array view.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @returns {NonNegativeInteger} linear index\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ 10, 1 ];\n* var offset = 0;\n*\n* var idx = maxViewBufferIndex( shape, strides, offset );\n* // returns 99\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ -10, -1 ];\n* var offset = 99;\n*\n* var idx = maxViewBufferIndex( shape, strides, offset );\n* // returns 99\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ 1, 10 ];\n* var offset = 0;\n*\n* var idx = maxViewBufferIndex( shape, strides, offset );\n* // returns 99\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ -1, -10 ];\n* var offset = 99;\n*\n* var idx = maxViewBufferIndex( shape, strides, offset );\n* // returns 99\n*/\nfunction maxViewBufferIndex( shape, strides, offset ) {\n\tvar ndims;\n\tvar idx;\n\tvar i;\n\n\tndims = shape.length;\n\tidx = offset;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tif ( shape[ i ] === 0 ) {\n\t\t\treturn offset;\n\t\t}\n\t\tif ( strides[ i ] > 0 ) {\n\t\t\tidx += strides[ i ] * ( shape[ i ] - 1 );\n\t\t}\n\t}\n\treturn idx;\n}\n\n\n// EXPORTS //\n\nmodule.exports = maxViewBufferIndex;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Compute the maximum linear index in an underlying data buffer accessible to an array view.\n*\n* @module @stdlib/ndarray/base/max-view-buffer-index\n*\n* @example\n* var maxViewBufferIndex = require( '@stdlib/ndarray/base/max-view-buffer-index' );\n*\n* var shape = [ 10, 10 ];\n* var strides = [ 10, 1 ];\n* var offset = 0;\n*\n* var idx = maxViewBufferIndex( shape, strides, offset );\n* // returns 99\n*\n* @example\n* var maxViewBufferIndex = require( '@stdlib/ndarray/base/max-view-buffer-index' );\n*\n* var shape = [ 10, 10 ];\n* var strides = [ -10, -1 ];\n* var offset = 99;\n*\n* var idx = maxViewBufferIndex( shape, strides, offset );\n* // returns 99\n*\n* @example\n* var maxViewBufferIndex = require( '@stdlib/ndarray/base/max-view-buffer-index' );\n*\n* var shape = [ 10, 10 ];\n* var strides = [ 1, 10 ];\n* var offset = 0;\n*\n* var idx = maxViewBufferIndex( shape, strides, offset );\n* // returns 99\n*\n* @example\n* var maxViewBufferIndex = require( '@stdlib/ndarray/base/max-view-buffer-index' );\n*\n* var shape = [ 10, 10 ];\n* var strides = [ -1, -10 ];\n* var offset = 99;\n*\n* var idx = maxViewBufferIndex( shape, strides, offset );\n* // returns 99\n*/\n\n// MODULES //\n\nvar maxViewBufferIndex = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = maxViewBufferIndex;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar broadcast = require( './../../../base/broadcast-array' );\nvar getShape = require( './../../../base/shape' );\n\n\n// MAIN //\n\n/**\n* Broadcasts an ndarray to a specified shape if and only if the specified shape differs from the provided ndarray's shape.\n*\n* ## Notes\n*\n* - If a provided ndarray has the same shape as the specified shape, the function returns the provided ndarray.\n* - If a provided ndarray has a different (broadcast compatible) shape than the specified shape, the function returns a new (base) ndarray view of the provided ndarray's data. The view is typically **not** contiguous. As more than one element of a returned view may refer to the same memory location, writing to the view may affect multiple elements. If you need to write to the returned array, copy the array before performing operations which may mutate elements.\n*\n* @param {ndarray} arr - input array\n* @param {NonNegativeIntegerArray} shape - desired shape\n* @throws {Error} input array cannot have more dimensions than the desired shape\n* @throws {Error} input array dimension sizes must be `1` or equal to the corresponding dimension in the provided shape\n* @throws {Error} input array and desired shape must be broadcast compatible\n* @returns {ndarray} broadcasted array\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var shx = x.shape;\n* // returns [ 2, 2 ]\n*\n* var y = maybeBroadcastArray( x, [ 3, 2, 2 ] );\n* // returns \n*\n* var shy = y.shape;\n* // returns [ 3, 2, 2 ]\n*\n* var v = y.get( 0, 0, 0 );\n* // returns 1\n*\n* v = y.get( 0, 0, 1 );\n* // returns 2\n*\n* v = y.get( 1, 0, 0 );\n* // returns 1\n*\n* v = y.get( 1, 1, 0 );\n* // returns 3\n*\n* v = y.get( 2, 0, 0 );\n* // returns 1\n*\n* v = y.get( 2, 1, 1 );\n* // returns 4\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var y = maybeBroadcastArray( x, [ 3, 2 ] );\n* // throws \n*/\nfunction maybeBroadcastArray( arr, shape ) {\n\tvar sh;\n\tvar N;\n\tvar i;\n\n\tN = shape.length;\n\tsh = getShape( arr, false );\n\n\t// Check whether we need to broadcast the input array...\n\tif ( sh.length === N ) {\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t// Check whether dimensions match...\n\t\t\tif ( sh[ i ] !== shape[ i ] ) {\n\t\t\t\t// We found a mismatched dimension; delegate to `broadcast` to ensure that the input array is broadcast compatible with the desired array shape...\n\t\t\t\treturn broadcast( arr, shape );\n\t\t\t}\n\t\t}\n\t\treturn arr;\n\t}\n\t// If we are provided an array having a different rank (i.e., number of dimensions) than the desired shape, assume we need to broadcast, delegating to `broadcast` to ensure that the input array is broadcast compatible with the desired array shape...\n\treturn broadcast( arr, shape );\n}\n\n\n// EXPORTS //\n\nmodule.exports = maybeBroadcastArray;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Broadcast an ndarray to a specified shape if and only if the specified shape differs from the provided ndarray's shape.\n*\n* @module @stdlib/ndarray/base/maybe-broadcast-array\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var maybeBroadcastArray = require( '@stdlib/ndarray/base/maybe-broadcast-array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var shx = x.shape;\n* // returns [ 2, 2 ]\n*\n* var y = maybeBroadcastArray( x, [ 3, 2, 2 ] );\n* // returns \n*\n* var shy = y.shape;\n* // returns [ 3, 2, 2 ]\n*\n* var v = y.get( 0, 0, 0 );\n* // returns 1\n*\n* v = y.get( 0, 0, 1 );\n* // returns 2\n*\n* v = y.get( 1, 0, 0 );\n* // returns 1\n*\n* v = y.get( 1, 1, 0 );\n* // returns 3\n*\n* v = y.get( 2, 0, 0 );\n* // returns 1\n*\n* v = y.get( 2, 1, 1 );\n* // returns 4\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar setReadOnlyAccessor = require( '@stdlib/utils/define-nonenumerable-read-only-accessor' );\nvar dtypes2signatures = require( './../../../base/dtypes2signatures' );\n\n\n// MAIN //\n\n/**\n* Defines non-enumerable read-only properties which expose ndarray function meta data.\n*\n* @param {Object} meta - function meta data\n* @param {NonNegativeInteger} meta.nargs - total number of arguments\n* @param {NonNegativeInteger} meta.nin - total number of input arrays\n* @param {NonNegativeInteger} meta.nout - total number of output arrays\n* @param {ArrayLikeObject} dtypes - list of ndarray data types\n* @param {(Function|Object)} obj - object on which to define properties\n* @returns {(Function|Object)} object on which properties were defined\n*\n* @example\n* // Define ndarray function meta data:\n* var meta = {\n* 'nargs': 2,\n* 'nin': 1,\n* 'nout': 1\n* };\n*\n* // Define the list of ndarray data types:\n* var dtypes = [\n* 'float64', 'float64',\n* 'float32', 'float32',\n* 'generic', 'generic'\n* ];\n*\n* // Define an object on which to set the properties:\n* var obj = {};\n*\n* // Set the properties:\n* setProps( meta, dtypes, obj );\n*\n* @example\n* // Define ndarray function meta data:\n* var meta = {\n* 'nargs': 2,\n* 'nin': 1,\n* 'nout': 1\n* };\n*\n* // Define the list of ndarray data types:\n* var dtypes = [\n* 'float64', 'float64',\n* 'float32', 'float32',\n* 'generic', 'generic'\n* ];\n*\n* // Define a function on which to set the properties:\n* function abs( x, y ) {\n* // Implementation...\n* }\n*\n* // Set the properties:\n* setProps( meta, dtypes, abs );\n*/\nfunction setProps( meta, dtypes, obj ) {\n\t// Define the number of arguments:\n\tsetReadOnly( obj, 'nargs', meta.nargs );\n\n\t// Define the number of input arrays:\n\tsetReadOnly( obj, 'nin', meta.nin );\n\n\t// Define the number of output arrays:\n\tsetReadOnly( obj, 'nout', meta.nout );\n\n\t// Define a read-only accessor for listing a function's supported array data types:\n\tsetReadOnlyAccessor( obj, 'types', types );\n\n\treturn obj;\n\n\t/**\n\t* Returns a list of array type signatures.\n\t*\n\t* @private\n\t* @returns {StringArray} list of signatures\n\t*/\n\tfunction types() {\n\t\treturn dtypes2signatures( dtypes, meta.nin, meta.nout );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = setProps;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Define non-enumerable read-only properties which expose ndarray function meta data.\n*\n* @module @stdlib/ndarray/base/meta-data-props\n*\n* @example\n* var setProps = require( '@stdlib/ndarray/base/meta-data-props' );\n*\n* // Define ndarray function meta data:\n* var meta = {\n* 'nargs': 2,\n* 'nin': 1,\n* 'nout': 1\n* };\n*\n* // Define the list of ndarray data types:\n* var dtypes = [\n* 'float64', 'float64',\n* 'float32', 'float32',\n* 'generic', 'generic'\n* ];\n*\n* // Define an object/function on which to set the properties:\n* var obj = {};\n*\n* // Set the properties:\n* setProps( meta, dtypes, obj );\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Computes the minimum linear index in an underlying data buffer accessible to an array view.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - index offset\n* @returns {NonNegativeInteger} linear index\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ 10, 1 ];\n* var offset = 10;\n*\n* var idx = minViewBufferIndex( shape, strides, offset );\n* // returns 10\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ -10, -1 ];\n* var offset = 109;\n*\n* var idx = minViewBufferIndex( shape, strides, offset );\n* // returns 10\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ 1, 10 ];\n* var offset = 10;\n*\n* var idx = minViewBufferIndex( shape, strides, offset );\n* // returns 10\n*\n* @example\n* var shape = [ 10, 10 ];\n* var strides = [ -1, -10 ];\n* var offset = 109;\n*\n* var idx = minViewBufferIndex( shape, strides, offset );\n* // returns 10\n*/\nfunction minViewBufferIndex( shape, strides, offset ) {\n\tvar ndims;\n\tvar idx;\n\tvar i;\n\n\tndims = shape.length;\n\tidx = offset;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tif ( shape[ i ] === 0 ) {\n\t\t\treturn offset;\n\t\t}\n\t\tif ( strides[ i ] < 0 ) {\n\t\t\tidx += strides[ i ] * ( shape[ i ] - 1 ); // decrements the index\n\t\t}\n\t}\n\treturn idx;\n}\n\n\n// EXPORTS //\n\nmodule.exports = minViewBufferIndex;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Compute the minimum linear index in an underlying data buffer accessible to an array view.\n*\n* @module @stdlib/ndarray/base/min-view-buffer-index\n*\n* @example\n* var minViewBufferIndex = require( '@stdlib/ndarray/base/min-view-buffer-index' );\n*\n* var shape = [ 10, 10 ];\n* var strides = [ 10, 1 ];\n* var offset = 10;\n*\n* var idx = minViewBufferIndex( shape, strides, offset );\n* // returns 10\n*\n* @example\n* var minViewBufferIndex = require( '@stdlib/ndarray/base/min-view-buffer-index' );\n*\n* var shape = [ 10, 10 ];\n* var strides = [ -10, -1 ];\n* var offset = 109;\n*\n* var idx = minViewBufferIndex( shape, strides, offset );\n* // returns 10\n*\n* @example\n* var minViewBufferIndex = require( '@stdlib/ndarray/base/min-view-buffer-index' );\n*\n* var shape = [ 10, 10 ];\n* var strides = [ 1, 10 ];\n* var offset = 10;\n*\n* var idx = minViewBufferIndex( shape, strides, offset );\n* // returns 10\n*\n* @example\n* var minViewBufferIndex = require( '@stdlib/ndarray/base/min-view-buffer-index' );\n*\n* var shape = [ 10, 10 ];\n* var strides = [ -1, -10 ];\n* var offset = 109;\n*\n* var idx = minViewBufferIndex( shape, strides, offset );\n* // returns 10\n*/\n\n// MODULES //\n\nvar minViewBufferIndex = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = minViewBufferIndex;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isAccessorArray = require( '@stdlib/array/base/assert/is-accessor-array' );\nvar accessorGetter = require( '@stdlib/array/base/accessor-getter' );\nvar accessorSetter = require( '@stdlib/array/base/accessor-setter' );\nvar getter = require( '@stdlib/array/base/getter' );\nvar setter = require( '@stdlib/array/base/setter' );\nvar numel = require( './../../../base/numel' );\nvar getDType = require( './../../../base/dtype' );\nvar getShape = require( './../../../base/shape' );\nvar getStrides = require( './../../../base/strides' );\nvar getOffset = require( './../../../base/offset' );\nvar getOrder = require( './../../../base/order' );\nvar getData = require( './../../../base/data-buffer' );\n\n\n// MAIN //\n\n/**\n* Converts an ndarray-like to an object likely to have the same \"shape\".\n*\n* ## Notes\n*\n* - This function is intended as a potential performance optimization. In V8, for example, even if two objects share common properties, if those properties were added in different orders or if one object has additional properties not shared by the other object, then those objects will have different \"hidden\" classes. If a function is provided many objects having different \"shapes\", some JavaScript VMs (e.g., V8) will consider the function \"megamorphic\" and fail to perform various runtime optimizations. Accordingly, the intent of this function is to standardize the \"shape\" of the object holding ndarray meta data to ensure that internal functions operating on ndarrays are provided consistent argument \"shapes\".\n*\n* - The returned object has the following properties:\n*\n* - **ref**: reference to the original ndarray-like object.\n* - **dtype**: underlying data type.\n* - **data**: data buffer.\n* - **length**: number of elements.\n* - **shape**: array dimensions.\n* - **strides**: array strides.\n* - **offset**: index offset.\n* - **order**: order.\n* - **accessorProtocol**: `boolean` indicating whether the data buffer supports the get/set protocol (i.e., uses accessors for getting and setting elements).\n* - **accessors**: a two-element array whose first element is an accessor for retrieving an ndarray element and whose second element is an accessor for setting an ndarray element.\n*\n* @param {ndarrayLike} x - ndarray-like object\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @returns {Object} object containing ndarray meta data\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] );\n*\n* var obj = ndarraylike2object( x );\n* // returns {...}\n*/\nfunction ndarraylike2object( x ) {\n\tvar xbuf;\n\tvar bool;\n\tvar sh;\n\tvar dt;\n\n\txbuf = getData( x );\n\tsh = getShape( x, true );\n\tdt = getDType( x );\n\n\tbool = isAccessorArray( xbuf );\n\n\treturn {\n\t\t'ref': x,\n\t\t'dtype': dt,\n\t\t'data': xbuf,\n\t\t'length': numel( sh ),\n\t\t'shape': sh,\n\t\t'strides': getStrides( x, true ),\n\t\t'offset': getOffset( x ),\n\t\t'order': getOrder( x ),\n\t\t'accessorProtocol': bool,\n\t\t'accessors': ( bool ) ?\n\t\t\t[ accessorGetter( dt ), accessorSetter( dt ) ] :\n\t\t\t[ getter( dt ), setter( dt ) ]\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = ndarraylike2object;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert an ndarray-like object to an object likely to have the same \"shape\".\n*\n* @module @stdlib/ndarray/base/ndarraylike2object\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var ndarraylike2object = require( '@stdlib/ndarray/base/ndarraylike2object' );\n*\n* var x = array( [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] );\n*\n* var obj = ndarraylike2object( x );\n* // returns {...}\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the number of ndarray dimensions.\n*\n* @param {ndarrayLike} x - input ndarray\n* @returns {NonNegativeInteger} number of dimensions\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var n = ndims( zeros( [ 3, 3, 3 ] ) );\n* // returns 3\n*/\nfunction ndims( x ) {\n\tvar n = x.ndims; // Note: intentionally cache in case `ndims` is lazily resolved via accessor\n\tif ( typeof n === 'number' ) {\n\t\treturn n;\n\t}\n\treturn x.shape.length;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ndims;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the number of ndarray dimensions.\n*\n* @module @stdlib/ndarray/base/ndims\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var ndims = require( '@stdlib/ndarray/base/ndims' );\n*\n* var n = ndims( zeros( [ 3, 3, 3 ] ) );\n* // returns 3\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// VARIABLES //\n\nvar ROW_MAJOR = 'row-major';\n\n\n// FUNCTIONS //\n\n/**\n* Returns the next Cartesian index (row-major).\n*\n* @private\n* @param {NonNegativeInteger} ndims - number of dimensions\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {NonNegativeIntegerArray} idx - current dimension indices\n* @param {NonNegativeInteger} dim - index of the dimension from which to start incrementing (inclusive)\n* @param {(Array|TypedArray|Object)} out - output array\n* @returns {(Array|TypedArray|Object)} output array\n*/\nfunction rowmajor( ndims, shape, idx, dim, out ) {\n\tvar i;\n\tvar j;\n\n\t// Set dimension indices which are skipped...\n\tfor ( i = ndims-1; i > dim; i-- ) {\n\t\tout[ i ] = idx[ i ];\n\t}\n\t// Search for the first dimension in which we don't have to \"carry the one\"...\n\tfor ( i = dim; i >= 0; i-- ) {\n\t\tj = ( idx[ i ] + 1 ) % shape[ i ];\n\t\tout[ i ] = j;\n\n\t\t// If the current index value is greater than zero, we can continue iterating within the current sub-array...\n\t\tif ( j > 0 ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\t// Set dimension indices which did not get updated...\n\tfor ( i -= 1; i >= 0; i-- ) {\n\t\tout[ i ] = idx[ i ];\n\t}\n\treturn out;\n}\n\n/**\n* Returns the next Cartesian index (column-major).\n*\n* @private\n* @param {NonNegativeInteger} ndims - number of dimensions\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {NonNegativeIntegerArray} idx - current dimension indices\n* @param {NonNegativeInteger} dim - index of the dimension from which to start incrementing (inclusive)\n* @param {(Array|TypedArray|Object)} out - output array\n* @returns {(Array|TypedArray|Object)} output array\n*/\nfunction columnmajor( ndims, shape, idx, dim, out ) {\n\tvar i;\n\tvar j;\n\n\t// Set dimension indices which are skipped...\n\tfor ( i = 0; i < dim; i++ ) {\n\t\tout[ i ] = idx[ i ];\n\t}\n\t// Search for the first dimension in which we don't have to \"carry the one\"...\n\tfor ( i = dim; i < ndims; i++ ) {\n\t\tj = ( idx[ i ] + 1 ) % shape[ i ];\n\t\tout[ i ] = j;\n\n\t\t// If the current index value is greater than zero, we can continue iterating within the current sub-array...\n\t\tif ( j > 0 ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\t// Set dimension indices which did not get updated...\n\tfor ( i += 1; i < ndims; i++ ) {\n\t\tout[ i ] = idx[ i ];\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Returns the next Cartesian index (i.e., set of subscripts/dimension indices) and assigns results to a provided output array.\n*\n* ## Notes\n*\n* - The function does not check whether the current index is the \"last\" index. Instead, if the function is provided dimension indices corresponding to the last element, the function will cycle back to the \"first\" index.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {string} order - index iteration order\n* @param {NonNegativeIntegerArray} idx - current dimension indices\n* @param {integer} dim - index of the dimension from which to start incrementing (inclusive)\n* @param {(Array|TypedArray|Object)} out - output array\n* @returns {(Array|TypedArray|Object|null)} output array (or null)\n*\n* @example\n* var shape = [ 12 ];\n* var idx = nextCartesianIndex( shape, 'row-major', [ 2 ], 0, [ 0 ] );\n* // returns [ 3 ]\n*\n* @example\n* var shape = [ 2, 2, 2 ];\n*\n* var out = [ 0, 0, 0 ];\n* var idx = nextCartesianIndex( shape, 'row-major', [ 0, 0, 1 ], -1, out );\n* // returns [ 0, 1, 0 ]\n*\n* idx = nextCartesianIndex( shape, 'row-major', idx, -1, out );\n* // returns [ 0, 1, 1 ]\n*\n* idx = nextCartesianIndex( shape, 'row-major', idx, -1, out );\n* // returns [ 1, 0, 0 ]\n*\n* idx = nextCartesianIndex( shape, 'row-major', idx, -1, out );\n* // returns [ 1, 0, 1 ]\n*\n* idx = nextCartesianIndex( shape, 'row-major', idx, -1, out );\n* // returns [ 1, 1, 0 ]\n*\n* idx = nextCartesianIndex( shape, 'row-major', idx, -1, out );\n* // returns [ 1, 1, 1 ]\n*\n* @example\n* var shape = [];\n* var idx = nextCartesianIndex( shape, 'row-major', [], 0, [] );\n* // returns null\n*\n* @example\n* var shape = [ 12 ];\n* var idx = nextCartesianIndex( shape, 'row-major', [ 2 ], -10, [ 0 ] );\n* // returns null\n*\n* @example\n* var shape = [ 12 ];\n* var idx = nextCartesianIndex( shape, 'column-major', [ 2 ], 10, [ 0 ] );\n* // returns null\n*/\nfunction nextCartesianIndex( shape, order, idx, dim, out ) {\n\tvar ndims = shape.length;\n\tif ( ndims === 0 ) {\n\t\treturn null;\n\t}\n\tif ( dim < 0 ) {\n\t\tdim += ndims;\n\t\tif ( dim < 0 ) {\n\t\t\t// Out-of-bounds:\n\t\t\treturn null;\n\t\t}\n\t} else if ( dim >= ndims ) {\n\t\t// Out-of-bounds:\n\t\treturn null;\n\t}\n\tif ( order === ROW_MAJOR ) {\n\t\treturn rowmajor( ndims, shape, idx, dim, out );\n\t}\n\t// order === 'column-major'\n\treturn columnmajor( ndims, shape, idx, dim, out );\n}\n\n\n// EXPORTS //\n\nmodule.exports = nextCartesianIndex;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar zeros = require( '@stdlib/array/base/zeros' );\nvar assign = require( './assign.js' );\n\n\n// MAIN //\n\n/**\n* Returns the next Cartesian index (i.e., set of subscripts/dimension indices).\n*\n* ## Notes\n*\n* - The function does not check whether the current index is the \"last\" index. Instead, if the function is provided dimension indices corresponding to the last element, the function will cycle back to the \"first\" index.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {string} order - index iteration order\n* @param {NonNegativeIntegerArray} idx - current dimension indices\n* @param {integer} dim - index of the dimension from which to start incrementing (inclusive)\n* @returns {(NonNegativeIntegerArray|null)} updated dimension indices\n*\n* @example\n* var shape = [ 12 ];\n* var idx = nextCartesianIndex( shape, 'row-major', [ 2 ], 0 );\n* // returns [ 3 ]\n*\n* @example\n* var shape = [ 2, 2, 2 ];\n*\n* var idx = nextCartesianIndex( shape, 'row-major', [ 0, 0, 1 ], -1 );\n* // returns [ 0, 1, 0 ]\n*\n* idx = nextCartesianIndex( shape, 'row-major', idx, -1 );\n* // returns [ 0, 1, 1 ]\n*\n* idx = nextCartesianIndex( shape, 'row-major', idx, -1 );\n* // returns [ 1, 0, 0 ]\n*\n* idx = nextCartesianIndex( shape, 'row-major', idx, -1 );\n* // returns [ 1, 0, 1 ]\n*\n* idx = nextCartesianIndex( shape, 'row-major', idx, -1 );\n* // returns [ 1, 1, 0 ]\n*\n* idx = nextCartesianIndex( shape, 'row-major', idx, -1 );\n* // returns [ 1, 1, 1 ]\n*\n* @example\n* var shape = [];\n* var idx = nextCartesianIndex( shape, 'row-major', [], 0 );\n* // returns null\n*\n* @example\n* var shape = [ 12 ];\n* var idx = nextCartesianIndex( shape, 'row-major', [ 2 ], -10 );\n* // returns null\n*\n* @example\n* var shape = [ 12 ];\n* var idx = nextCartesianIndex( shape, 'column-major', [ 2 ], 10 );\n* // returns null\n*/\nfunction nextCartesianIndex( shape, order, idx, dim ) {\n\treturn assign( shape, order, idx, dim, zeros( shape.length ) );\n}\n\n\n// EXPORTS //\n\nmodule.exports = nextCartesianIndex;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the next Cartesian index (i.e., set of subscripts/dimension indices).\n*\n* @module @stdlib/ndarray/base/next-cartesian-index\n*\n* @example\n* var nextCartesianIndex = require( '@stdlib/ndarray/base/next-cartesian-index' );\n*\n* var shape = [ 2, 2, 2 ];\n*\n* var idx = nextCartesianIndex( shape, 'row-major', [ 0, 0, 1 ], -1 );\n* // returns [ 0, 1, 0 ]\n*\n* idx = nextCartesianIndex( shape, 'row-major', idx, -1 );\n* // returns [ 0, 1, 1 ]\n*\n* idx = nextCartesianIndex( shape, 'row-major', idx, -1 );\n* // returns [ 1, 0, 0 ]\n*\n* idx = nextCartesianIndex( shape, 'row-major', idx, -1 );\n* // returns [ 1, 0, 1 ]\n*\n* idx = nextCartesianIndex( shape, 'row-major', idx, -1 );\n* // returns [ 1, 1, 0 ]\n*\n* idx = nextCartesianIndex( shape, 'row-major', idx, -1 );\n* // returns [ 1, 1, 1 ]\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar assign = require( './assign.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the number of non-singleton dimensions.\n*\n* ## Notes\n*\n* - A singleton dimension is a dimension whose size is equal to `1`.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @returns {NonNegativeInteger} number of non-singleton dimensions\n*\n* @example\n* var shape = [ 2, 2, 1 ];\n*\n* var n = nonsingletonDimensions( shape );\n* // returns 2\n*\n* @example\n* var shape = [ 1, 1, 1 ];\n*\n* var n = nonsingletonDimensions( shape );\n* // returns 0\n*/\nfunction nonsingletonDimensions( shape ) {\n\tvar cnt;\n\tvar i;\n\n\tcnt = 0;\n\tfor ( i = 0; i < shape.length; i++ ) {\n\t\tif ( shape[ i ] !== 1 ) {\n\t\t\tcnt += 1;\n\t\t}\n\t}\n\treturn cnt;\n}\n\n\n// EXPORTS //\n\nmodule.exports = nonsingletonDimensions;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the number of non-nonsingleton dimensions.\n*\n* @module @stdlib/ndarray/base/nonsingleton-dimensions\n*\n* @example\n* var nonsingletonDimensions = require( '@stdlib/ndarray/base/nonsingleton-dimensions' );\n*\n* var shape = [ 2, 2, 1 ];\n*\n* var n = nonsingletonDimensions( shape );\n* // returns 2\n*\n* @example\n* var nonsingletonDimensions = require( '@stdlib/ndarray/base/nonsingleton-dimensions' );\n*\n* var shape = [ 1, 1, 1 ];\n*\n* var n = nonsingletonDimensions( shape );\n* // returns 0\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Simultaneously sorts two arrays based on the sort order of the first array using insertion sort.\n*\n* ## Notes\n*\n* - The first array is sorted in increasing order according to absolute value.\n* - The algorithm has space complexity `O(1)` and worst case time complexity `O(N^2)`.\n* - The algorithm is efficient for small arrays (typically `N <= 20``) and is particularly efficient for sorting arrays which are already substantially sorted.\n* - The algorithm is **stable**, meaning that the algorithm does **not** change the order of array elements which are equal or equivalent.\n* - The input arrays are sorted in-place (i.e., the input arrays are mutated).\n*\n* @private\n* @param {Array} x - first array\n* @param {Array} y - second array\n* @returns {void}\n*\n* @example\n* var x = [ -4, -2, 3, 1 ];\n* var y = [ 0, 1, 2, 3 ];\n*\n* sort2ins( x, y );\n*\n* console.log( x );\n* // => [ 1, -2, 3, -4 ]\n*\n* console.log( y );\n* // => [ 3, 1, 2, 0 ]\n*/\nfunction sort2ins( x, y ) {\n\tvar avx;\n\tvar aux;\n\tvar ix;\n\tvar iy;\n\tvar jx;\n\tvar jy;\n\tvar vx;\n\tvar vy;\n\tvar ux;\n\tvar i;\n\n\tix = 1;\n\tiy = 1;\n\n\t// Sort in increasing order...\n\tfor ( i = 1; i < x.length; i++ ) {\n\t\tvx = x[ ix ];\n\t\tavx = ( vx < 0 ) ? -vx : vx;\n\n\t\tvy = y[ iy ];\n\n\t\tjx = ix - 1;\n\t\tjy = iy - 1;\n\n\t\t// Shift all larger values to the left of the current element to the right...\n\t\twhile ( jx >= 0 ) {\n\t\t\tux = x[ jx ];\n\t\t\taux = ( ux < 0 ) ? -ux : ux;\n\t\t\tif ( aux <= avx ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tx[ jx+1 ] = ux;\n\t\t\ty[ jy+1 ] = y[ jy ];\n\t\t\tjx -= 1;\n\t\t\tjy -= 1;\n\t\t}\n\t\tx[ jx+1 ] = vx;\n\t\ty[ jy+1 ] = vy;\n\t\tix += 1;\n\t\tiy += 1;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = sort2ins;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar zeroTo = require( '@stdlib/array/base/zero-to' );\nvar copy = require( '@stdlib/array/base/copy-indexed' );\nvar take = require( '@stdlib/array/base/take' );\nvar sort2ins = require( './sort2ins.js' );\n\n\n// MAIN //\n\n/**\n* Reorders ndarray dimensions and associated strides for loop interchange.\n*\n* ## Notes\n*\n* - The returned object has the following properties:\n*\n* - **sh**: dimensions sorted in loop order.\n* - **sx**: ndarray strides sorted in loop order.\n*\n* @param {NonNegativeIntegerArray} sh - array dimensions\n* @param {IntegerArray} sx - array stride lengths\n* @returns {Object} loop interchange data\n*\n* @example\n* var sh = [ 2, 3, 4 ];\n*\n* var sx = [ 12, 4, 1 ]; // row-major\n*\n* var o = loopOrder( sh, sx );\n* // returns {...}\n*\n* var ssh = o.sh;\n* // returns [ 4, 3, 2 ]\n*\n* var ssx = o.sx;\n* // returns [ 1, 4, 12 ]\n*/\nfunction loopOrder( sh, sx ) {\n\tvar idx;\n\n\t// Initialize a loop interchange index array for generating a loop order permutation:\n\tidx = zeroTo( sh.length );\n\n\t// Sort the array strides in increasing order (of magnitude):\n\tsx = copy( sx );\n\tsort2ins( sx, idx );\n\n\t// Permute the shape based on the sorted array strides:\n\tsh = take( sh, idx );\n\n\treturn {\n\t\t'sh': sh,\n\t\t'sx': sx\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = loopOrder;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Reorder ndarray dimensions and associated strides for loop interchange.\n*\n* @module @stdlib/ndarray/base/nullary-loop-interchange-order\n*\n* @example\n* var nullaryLoopOrder = require( '@stdlib/ndarray/base/nullary-loop-interchange-order' );\n*\n* var sh = [ 2, 3, 4 ];\n*\n* var sx = [ 12, 4, 1 ]; // row-major\n*\n* var o = nullaryLoopOrder( sh, sx );\n* // returns {...}\n*\n* var ssh = o.sh;\n* // returns [ 4, 3, 2 ]\n*\n* var ssx = o.sx;\n* // returns [ 1, 4, 12 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar defaults = {\n\t// Define a default block size (in bytes):\n\t'BLOCK_SIZE_IN_BYTES': 64|0, // 64b is a common cache line size. How applicable the common cache line size is here is debatable, given that, depending on the associated stride(s), the innermost loop may not iterate over adjacent elements. The primary goal is to have a block size in which all data within a block can always fit in (L1) cache, regardless of cache size (i.e., cache-oblivious). For reference, a common L1 cache size is 32kB per core. For best performance, block sizes should be tuned based on system hardware; however, such tuning is not readily available to us here. Without obvious better alternatives, 64b has some theoretical (and practical) underpinning, and it should be good enough for most inputs, especially for ndarrays with near contiguity.\n\n\t// Define a default block size (in elements):\n\t'BLOCK_SIZE_IN_ELEMENTS': 8|0 // 64 bytes / 8 bytes per element (i.e., default element size is same as a double)\n};\n\n\n// EXPORTS //\n\nmodule.exports = defaults;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar bytesPerElement = require( './../../../base/bytes-per-element' );\nvar defaults = require( './defaults.js' );\n\n\n// MAIN //\n\n/**\n* Returns a loop block size for multi-dimensional array tiled loops.\n*\n* @param {string} dtypeX - array data type\n* @returns {integer} block size (in units of elements)\n*\n* @example\n* var bsize = nullaryBlockSize( 'float64' );\n* // returns \n*/\nfunction nullaryBlockSize( dtypeX ) {\n\tvar nbx = bytesPerElement( dtypeX );\n\tif ( nbx === null ) { // e.g., \"generic\" arrays\n\t\treturn defaults.BLOCK_SIZE_IN_ELEMENTS;\n\t}\n\treturn ( defaults.BLOCK_SIZE_IN_BYTES/nbx )|0; // asm type annotation\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullaryBlockSize;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Resolve a loop block size for multi-dimensional array tiled loops.\n*\n* @module @stdlib/ndarray/base/nullary-tiling-block-size\n*\n* @example\n* var nullaryBlockSize = require( '@stdlib/ndarray/base/nullary-tiling-block-size' );\n*\n* var bsize = nullaryBlockSize( 'float64' );\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* blockednullary2d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction blockednullary2d( x, fcn ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar ox1;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar j0;\n\tvar j1;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tset = x.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\tif ( j1 < bsize ) {\n\t\t\ts1 = j1;\n\t\t\tj1 = 0;\n\t\t} else {\n\t\t\ts1 = bsize;\n\t\t\tj1 -= bsize;\n\t\t}\n\t\tox1 = ox + ( j1*sx[1] );\n\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\tif ( j0 < bsize ) {\n\t\t\t\ts0 = j0;\n\t\t\t\tj0 = 0;\n\t\t\t} else {\n\t\t\t\ts0 = bsize;\n\t\t\t\tj0 -= bsize;\n\t\t\t}\n\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t// Compute the loop offset increment:\n\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t// Iterate over the ndarray dimensions...\n\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\tset( xbuf, ix, fcn() );\n\t\t\t\t\tix += dx0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary2d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* blockednullary3d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction blockednullary3d( x, fcn ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar ox1;\n\tvar ox2;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tset = x.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\tif ( j2 < bsize ) {\n\t\t\ts2 = j2;\n\t\t\tj2 = 0;\n\t\t} else {\n\t\t\ts2 = bsize;\n\t\t\tj2 -= bsize;\n\t\t}\n\t\tox2 = ox + ( j2*sx[2] );\n\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\tif ( j1 < bsize ) {\n\t\t\t\ts1 = j1;\n\t\t\t\tj1 = 0;\n\t\t\t} else {\n\t\t\t\ts1 = bsize;\n\t\t\t\tj1 -= bsize;\n\t\t\t}\n\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\ts0 = j0;\n\t\t\t\t\tj0 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts0 = bsize;\n\t\t\t\t\tj0 -= bsize;\n\t\t\t\t}\n\t\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t// Compute the loop offset increment:\n\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\tset( xbuf, ix, fcn() );\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary3d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* blockednullary4d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction blockednullary4d( x, fcn ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tset = x.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\tif ( j3 < bsize ) {\n\t\t\ts3 = j3;\n\t\t\tj3 = 0;\n\t\t} else {\n\t\t\ts3 = bsize;\n\t\t\tj3 -= bsize;\n\t\t}\n\t\tox3 = ox + ( j3*sx[3] );\n\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\tif ( j2 < bsize ) {\n\t\t\t\ts2 = j2;\n\t\t\t\tj2 = 0;\n\t\t\t} else {\n\t\t\t\ts2 = bsize;\n\t\t\t\tj2 -= bsize;\n\t\t\t}\n\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\ts1 = j1;\n\t\t\t\t\tj1 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts1 = bsize;\n\t\t\t\t\tj1 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\tset( xbuf, ix, fcn() );\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary4d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* blockednullary5d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction blockednullary5d( x, fcn ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tset = x.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\tif ( j4 < bsize ) {\n\t\t\ts4 = j4;\n\t\t\tj4 = 0;\n\t\t} else {\n\t\t\ts4 = bsize;\n\t\t\tj4 -= bsize;\n\t\t}\n\t\tox4 = ox + ( j4*sx[4] );\n\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\tif ( j3 < bsize ) {\n\t\t\t\ts3 = j3;\n\t\t\t\tj3 = 0;\n\t\t\t} else {\n\t\t\t\ts3 = bsize;\n\t\t\t\tj3 -= bsize;\n\t\t\t}\n\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\ts2 = j2;\n\t\t\t\t\tj2 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts2 = bsize;\n\t\t\t\t\tj2 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tset( xbuf, ix, fcn() );\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary5d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* blockednullary6d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction blockednullary6d( x, fcn ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tset = x.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\tif ( j5 < bsize ) {\n\t\t\ts5 = j5;\n\t\t\tj5 = 0;\n\t\t} else {\n\t\t\ts5 = bsize;\n\t\t\tj5 -= bsize;\n\t\t}\n\t\tox5 = ox + ( j5*sx[5] );\n\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\tif ( j4 < bsize ) {\n\t\t\t\ts4 = j4;\n\t\t\t\tj4 = 0;\n\t\t\t} else {\n\t\t\t\ts4 = bsize;\n\t\t\t\tj4 -= bsize;\n\t\t\t}\n\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\ts3 = j3;\n\t\t\t\t\tj3 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts3 = bsize;\n\t\t\t\t\tj3 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tset( xbuf, ix, fcn() );\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary6d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var real = require( '@stdlib/complex/real' );\n* var imag = require( '@stdlib/complex/imag' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* blockednullary7d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = real( v );\n* // returns 10.0\n*\n* var im = imag( v );\n* // returns -10.0\n*/\nfunction blockednullary7d( x, fcn ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tset = x.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\tif ( j6 < bsize ) {\n\t\t\ts6 = j6;\n\t\t\tj6 = 0;\n\t\t} else {\n\t\t\ts6 = bsize;\n\t\t\tj6 -= bsize;\n\t\t}\n\t\tox6 = ox + ( j6*sx[6] );\n\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\tif ( j5 < bsize ) {\n\t\t\t\ts5 = j5;\n\t\t\t\tj5 = 0;\n\t\t\t} else {\n\t\t\t\ts5 = bsize;\n\t\t\t\tj5 -= bsize;\n\t\t\t}\n\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\ts4 = j4;\n\t\t\t\t\tj4 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts4 = bsize;\n\t\t\t\t\tj4 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tset( xbuf, ix, fcn() );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary7d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* blockednullary8d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction blockednullary8d( x, fcn ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tset = x.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\tif ( j7 < bsize ) {\n\t\t\ts7 = j7;\n\t\t\tj7 = 0;\n\t\t} else {\n\t\t\ts7 = bsize;\n\t\t\tj7 -= bsize;\n\t\t}\n\t\tox7 = ox + ( j7*sx[7] );\n\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\tif ( j6 < bsize ) {\n\t\t\t\ts6 = j6;\n\t\t\t\tj6 = 0;\n\t\t\t} else {\n\t\t\t\ts6 = bsize;\n\t\t\t\tj6 -= bsize;\n\t\t\t}\n\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\ts5 = j5;\n\t\t\t\t\tj5 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts5 = bsize;\n\t\t\t\t\tj5 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tset( xbuf, ix, fcn() );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary8d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* blockednullary9d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction blockednullary9d( x, fcn ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tset = x.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\tif ( j8 < bsize ) {\n\t\t\ts8 = j8;\n\t\t\tj8 = 0;\n\t\t} else {\n\t\t\ts8 = bsize;\n\t\t\tj8 -= bsize;\n\t\t}\n\t\tox8 = ox + ( j8*sx[8] );\n\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\tif ( j7 < bsize ) {\n\t\t\t\ts7 = j7;\n\t\t\t\tj7 = 0;\n\t\t\t} else {\n\t\t\t\ts7 = bsize;\n\t\t\t\tj7 -= bsize;\n\t\t\t}\n\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\ts6 = j6;\n\t\t\t\t\tj6 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts6 = bsize;\n\t\t\t\t\tj6 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tset( xbuf, ix, fcn() );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx8;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary9d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* blockednullary10d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction blockednullary10d( x, fcn ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar ox9;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar s9;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar j9;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Cache accessor:\n\tset = x.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j9 = sh[9]; j9 > 0; ) {\n\t\tif ( j9 < bsize ) {\n\t\t\ts9 = j9;\n\t\t\tj9 = 0;\n\t\t} else {\n\t\t\ts9 = bsize;\n\t\t\tj9 -= bsize;\n\t\t}\n\t\tox9 = ox + ( j9*sx[9] );\n\t\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\t\tif ( j8 < bsize ) {\n\t\t\t\ts8 = j8;\n\t\t\t\tj8 = 0;\n\t\t\t} else {\n\t\t\t\ts8 = bsize;\n\t\t\t\tj8 -= bsize;\n\t\t\t}\n\t\t\tdx9 = sx[9] - ( s8*sx[8] );\n\t\t\tox8 = ox9 + ( j8*sx[8] );\n\t\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\t\tif ( j7 < bsize ) {\n\t\t\t\t\ts7 = j7;\n\t\t\t\t\tj7 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts7 = bsize;\n\t\t\t\t\tj7 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\t\ts6 = j6;\n\t\t\t\t\t\tj6 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts6 = bsize;\n\t\t\t\t\t\tj6 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\t\tfor ( i9 = 0; i9 < s9; i9++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i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t\t\t\t\t\t\t\t\t\t\t\tix += dx9;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary10d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* blockednullary2d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction blockednullary2d( x, fcn ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar ox1;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar j0;\n\tvar j1;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Iterate over blocks...\n\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\tif ( j1 < bsize ) {\n\t\t\ts1 = j1;\n\t\t\tj1 = 0;\n\t\t} else {\n\t\t\ts1 = bsize;\n\t\t\tj1 -= bsize;\n\t\t}\n\t\tox1 = ox + ( j1*sx[1] );\n\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\tif ( j0 < bsize ) {\n\t\t\t\ts0 = j0;\n\t\t\t\tj0 = 0;\n\t\t\t} else {\n\t\t\t\ts0 = bsize;\n\t\t\t\tj0 -= bsize;\n\t\t\t}\n\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t// Compute the loop offset increment:\n\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t// Iterate over the ndarray dimensions...\n\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\txbuf[ ix ] = fcn();\n\t\t\t\t\tix += dx0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary2d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* blockednullary3d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction blockednullary3d( x, fcn ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar ox1;\n\tvar ox2;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Iterate over blocks...\n\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\tif ( j2 < bsize ) {\n\t\t\ts2 = j2;\n\t\t\tj2 = 0;\n\t\t} else {\n\t\t\ts2 = bsize;\n\t\t\tj2 -= bsize;\n\t\t}\n\t\tox2 = ox + ( j2*sx[2] );\n\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\tif ( j1 < bsize ) {\n\t\t\t\ts1 = j1;\n\t\t\t\tj1 = 0;\n\t\t\t} else {\n\t\t\t\ts1 = bsize;\n\t\t\t\tj1 -= bsize;\n\t\t\t}\n\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\ts0 = j0;\n\t\t\t\t\tj0 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts0 = bsize;\n\t\t\t\t\tj0 -= bsize;\n\t\t\t\t}\n\t\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t// Compute the loop offset increment:\n\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\txbuf[ ix ] = fcn();\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary3d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* blockednullary4d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction blockednullary4d( x, fcn ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Iterate over blocks...\n\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\tif ( j3 < bsize ) {\n\t\t\ts3 = j3;\n\t\t\tj3 = 0;\n\t\t} else {\n\t\t\ts3 = bsize;\n\t\t\tj3 -= bsize;\n\t\t}\n\t\tox3 = ox + ( j3*sx[3] );\n\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\tif ( j2 < bsize ) {\n\t\t\t\ts2 = j2;\n\t\t\t\tj2 = 0;\n\t\t\t} else {\n\t\t\t\ts2 = bsize;\n\t\t\t\tj2 -= bsize;\n\t\t\t}\n\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\ts1 = j1;\n\t\t\t\t\tj1 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts1 = bsize;\n\t\t\t\t\tj1 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\txbuf[ ix ] = fcn();\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary4d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* blockednullary5d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction blockednullary5d( x, fcn ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Iterate over blocks...\n\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\tif ( j4 < bsize ) {\n\t\t\ts4 = j4;\n\t\t\tj4 = 0;\n\t\t} else {\n\t\t\ts4 = bsize;\n\t\t\tj4 -= bsize;\n\t\t}\n\t\tox4 = ox + ( j4*sx[4] );\n\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\tif ( j3 < bsize ) {\n\t\t\t\ts3 = j3;\n\t\t\t\tj3 = 0;\n\t\t\t} else {\n\t\t\t\ts3 = bsize;\n\t\t\t\tj3 -= bsize;\n\t\t\t}\n\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\ts2 = j2;\n\t\t\t\t\tj2 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts2 = bsize;\n\t\t\t\t\tj2 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\txbuf[ ix ] = fcn();\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary5d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* blockednullary6d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction blockednullary6d( x, fcn ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Iterate over blocks...\n\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\tif ( j5 < bsize ) {\n\t\t\ts5 = j5;\n\t\t\tj5 = 0;\n\t\t} else {\n\t\t\ts5 = bsize;\n\t\t\tj5 -= bsize;\n\t\t}\n\t\tox5 = ox + ( j5*sx[5] );\n\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\tif ( j4 < bsize ) {\n\t\t\t\ts4 = j4;\n\t\t\t\tj4 = 0;\n\t\t\t} else {\n\t\t\t\ts4 = bsize;\n\t\t\t\tj4 -= bsize;\n\t\t\t}\n\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\ts3 = j3;\n\t\t\t\t\tj3 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts3 = bsize;\n\t\t\t\t\tj3 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\txbuf[ ix ] = fcn();\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary6d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* blockednullary7d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction blockednullary7d( x, fcn ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Iterate over blocks...\n\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\tif ( j6 < bsize ) {\n\t\t\ts6 = j6;\n\t\t\tj6 = 0;\n\t\t} else {\n\t\t\ts6 = bsize;\n\t\t\tj6 -= bsize;\n\t\t}\n\t\tox6 = ox + ( j6*sx[6] );\n\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\tif ( j5 < bsize ) {\n\t\t\t\ts5 = j5;\n\t\t\t\tj5 = 0;\n\t\t\t} else {\n\t\t\t\ts5 = bsize;\n\t\t\t\tj5 -= bsize;\n\t\t\t}\n\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\ts4 = j4;\n\t\t\t\t\tj4 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts4 = bsize;\n\t\t\t\t\tj4 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\txbuf[ ix ] = fcn();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary7d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* blockednullary8d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction blockednullary8d( x, fcn ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Iterate over blocks...\n\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\tif ( j7 < bsize ) {\n\t\t\ts7 = j7;\n\t\t\tj7 = 0;\n\t\t} else {\n\t\t\ts7 = bsize;\n\t\t\tj7 -= bsize;\n\t\t}\n\t\tox7 = ox + ( j7*sx[7] );\n\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\tif ( j6 < bsize ) {\n\t\t\t\ts6 = j6;\n\t\t\t\tj6 = 0;\n\t\t\t} else {\n\t\t\t\ts6 = bsize;\n\t\t\t\tj6 -= bsize;\n\t\t\t}\n\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\ts5 = j5;\n\t\t\t\t\tj5 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts5 = bsize;\n\t\t\t\t\tj5 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\txbuf[ ix ] = fcn();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary8d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* blockednullary9d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction blockednullary9d( x, fcn ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Iterate over blocks...\n\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\tif ( j8 < bsize ) {\n\t\t\ts8 = j8;\n\t\t\tj8 = 0;\n\t\t} else {\n\t\t\ts8 = bsize;\n\t\t\tj8 -= bsize;\n\t\t}\n\t\tox8 = ox + ( j8*sx[8] );\n\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\tif ( j7 < bsize ) {\n\t\t\t\ts7 = j7;\n\t\t\t\tj7 = 0;\n\t\t\t} else {\n\t\t\t\ts7 = bsize;\n\t\t\t\tj7 -= bsize;\n\t\t\t}\n\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\ts6 = j6;\n\t\t\t\t\tj6 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts6 = bsize;\n\t\t\t\t\tj6 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n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}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary9d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/nullary-loop-interchange-order' );\nvar blockSize = require( './../../../base/nullary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* blockednullary10d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction blockednullary10d( x, fcn ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar ox9;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar s9;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar j9;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype );\n\n\t// Set a pointer to the first indexed element:\n\tox = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache the offset increment for the innermost loop:\n\tdx0 = sx[0];\n\n\t// Iterate over blocks...\n\tfor ( j9 = sh[9]; j9 > 0; ) {\n\t\tif ( j9 < bsize ) {\n\t\t\ts9 = j9;\n\t\t\tj9 = 0;\n\t\t} else {\n\t\t\ts9 = bsize;\n\t\t\tj9 -= bsize;\n\t\t}\n\t\tox9 = ox + ( j9*sx[9] );\n\t\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\t\tif ( j8 < bsize ) {\n\t\t\t\ts8 = j8;\n\t\t\t\tj8 = 0;\n\t\t\t} else {\n\t\t\t\ts8 = bsize;\n\t\t\t\tj8 -= bsize;\n\t\t\t}\n\t\t\tdx9 = sx[9] - ( s8*sx[8] );\n\t\t\tox8 = ox9 + ( j8*sx[8] );\n\t\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\t\tif ( j7 < bsize ) {\n\t\t\t\t\ts7 = j7;\n\t\t\t\t\tj7 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts7 = bsize;\n\t\t\t\t\tj7 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\t\ts6 = j6;\n\t\t\t\t\t\tj6 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts6 = bsize;\n\t\t\t\t\t\tj6 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// Compute the index offset for the first output ndarray element in the current block:\n\t\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Compute the loop offset increment:\n\t\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\t\tfor ( i9 = 0; i9 < s9; i9++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4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\t\t\t\t\t\t\tix += dx9;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockednullary10d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary function and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 4 );\n*\n* // Define the shape of the output array:\n* var shape = [];\n*\n* // Define the array strides:\n* var sx = [ 0 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* nullary0d( x, fcn );\n*\n* var v = x.data.get( 1 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction nullary0d( x, fcn ) {\n\tx.accessors[ 1 ]( x.data, x.offset, fcn() );\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary0d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 4 ];\n*\n* // Define the array strides:\n* var sx = [ 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* nullary1d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction nullary1d( x, fcn ) {\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar S0;\n\tvar ix;\n\tvar i0;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables: dimensions and loop offset (pointer) increments...\n\tS0 = x.shape[ 0 ];\n\tdx0 = x.strides[ 0 ];\n\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tset = x.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\tset( xbuf, ix, fcn() );\n\t\tix += dx0;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary1d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* nullary2d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction nullary2d( x, fcn ) {\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 1 ];\n\t\tS1 = sh[ 0 ];\n\t\tdx0 = sx[ 1 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 0 ] - ( S0*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tset = x.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\tset( xbuf, ix, fcn() );\n\t\t\tix += dx0;\n\t\t}\n\t\tix += dx1;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary2d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* nullary3d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction nullary3d( x, fcn ) {\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 2 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 0 ];\n\t\tdx0 = sx[ 2 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[2] );\n\t\tdx2 = sx[ 0 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tset = x.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\tset( xbuf, ix, fcn() );\n\t\t\t\tix += dx0;\n\t\t\t}\n\t\t\tix += dx1;\n\t\t}\n\t\tix += dx2;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary3d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* nullary4d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction nullary4d( x, fcn ) {\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 3 ];\n\t\tS1 = sh[ 2 ];\n\t\tS2 = sh[ 1 ];\n\t\tS3 = sh[ 0 ];\n\t\tdx0 = sx[ 3 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 2 ] - ( S0*sx[3] );\n\t\tdx2 = sx[ 1 ] - ( S1*sx[2] );\n\t\tdx3 = sx[ 0 ] - ( S2*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tset = x.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\tset( xbuf, ix, fcn() );\n\t\t\t\t\tix += dx0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t}\n\t\t\tix += dx2;\n\t\t}\n\t\tix += dx3;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary4d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* nullary5d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction nullary5d( x, fcn ) {\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 4 ];\n\t\tS1 = sh[ 3 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 1 ];\n\t\tS4 = sh[ 0 ];\n\t\tdx0 = sx[ 4 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 3 ] - ( S0*sx[4] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[3] );\n\t\tdx3 = sx[ 1 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 0 ] - ( S3*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tset = x.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\tset( xbuf, ix, fcn() );\n\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx1;\n\t\t\t\t}\n\t\t\t\tix += dx2;\n\t\t\t}\n\t\t\tix += dx3;\n\t\t}\n\t\tix += dx4;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary5d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* nullary6d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction nullary6d( x, fcn ) {\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 5 ];\n\t\tS1 = sh[ 4 ];\n\t\tS2 = sh[ 3 ];\n\t\tS3 = sh[ 2 ];\n\t\tS4 = sh[ 1 ];\n\t\tS5 = sh[ 0 ];\n\t\tdx0 = sx[ 5 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 4 ] - ( S0*sx[5] );\n\t\tdx2 = sx[ 3 ] - ( S1*sx[4] );\n\t\tdx3 = sx[ 2 ] - ( S2*sx[3] );\n\t\tdx4 = sx[ 1 ] - ( S3*sx[2] );\n\t\tdx5 = sx[ 0 ] - ( S4*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tset = x.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\tset( xbuf, ix, fcn() );\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t}\n\t\t\t\tix += dx3;\n\t\t\t}\n\t\t\tix += dx4;\n\t\t}\n\t\tix += dx5;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary6d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var real = require( '@stdlib/complex/real' );\n* var imag = require( '@stdlib/complex/imag' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* nullary7d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = real( v );\n* // returns 10.0\n*\n* var im = imag( v );\n* // returns -10.0\n*/\nfunction nullary7d( x, fcn ) {\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 6 ];\n\t\tS1 = sh[ 5 ];\n\t\tS2 = sh[ 4 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 2 ];\n\t\tS5 = sh[ 1 ];\n\t\tS6 = sh[ 0 ];\n\t\tdx0 = sx[ 6 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 5 ] - ( S0*sx[6] );\n\t\tdx2 = sx[ 4 ] - ( S1*sx[5] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[4] );\n\t\tdx4 = sx[ 2 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 1 ] - ( S4*sx[2] );\n\t\tdx6 = sx[ 0 ] - ( S5*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tset = x.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\tset( xbuf, ix, fcn() );\n\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx3;\n\t\t\t\t}\n\t\t\t\tix += dx4;\n\t\t\t}\n\t\t\tix += dx5;\n\t\t}\n\t\tix += dx6;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary7d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* nullary8d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction nullary8d( x, fcn ) {\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 7 ];\n\t\tS1 = sh[ 6 ];\n\t\tS2 = sh[ 5 ];\n\t\tS3 = sh[ 4 ];\n\t\tS4 = sh[ 3 ];\n\t\tS5 = sh[ 2 ];\n\t\tS6 = sh[ 1 ];\n\t\tS7 = sh[ 0 ];\n\t\tdx0 = sx[ 7 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 6 ] - ( S0*sx[7] );\n\t\tdx2 = sx[ 5 ] - ( S1*sx[6] );\n\t\tdx3 = sx[ 4 ] - ( S2*sx[5] );\n\t\tdx4 = sx[ 3 ] - ( S3*sx[4] );\n\t\tdx5 = sx[ 2 ] - ( S4*sx[3] );\n\t\tdx6 = sx[ 1 ] - ( S5*sx[2] );\n\t\tdx7 = sx[ 0 ] - ( S6*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tset = x.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\tset( xbuf, ix, fcn() );\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx4;\n\t\t\t\t}\n\t\t\t\tix += dx5;\n\t\t\t}\n\t\t\tix += dx6;\n\t\t}\n\t\tix += dx7;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary8d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* nullary9d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction nullary9d( x, fcn ) {\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 8 ];\n\t\tS1 = sh[ 7 ];\n\t\tS2 = sh[ 6 ];\n\t\tS3 = sh[ 5 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 3 ];\n\t\tS6 = sh[ 2 ];\n\t\tS7 = sh[ 1 ];\n\t\tS8 = sh[ 0 ];\n\t\tdx0 = sx[ 8 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 7 ] - ( S0*sx[8] );\n\t\tdx2 = sx[ 6 ] - ( S1*sx[7] );\n\t\tdx3 = sx[ 5 ] - ( S2*sx[6] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[5] );\n\t\tdx5 = sx[ 3 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 2 ] - ( S5*sx[3] );\n\t\tdx7 = sx[ 1 ] - ( S6*sx[2] );\n\t\tdx8 = sx[ 0 ] - ( S7*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tset = x.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\tset( xbuf, ix, fcn() );\n\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx5;\n\t\t\t\t}\n\t\t\t\tix += dx6;\n\t\t\t}\n\t\t\tix += dx7;\n\t\t}\n\t\tix += dx8;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary9d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* nullary10d( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction nullary10d( x, fcn ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar S9;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 9 ];\n\t\tS1 = sh[ 8 ];\n\t\tS2 = sh[ 7 ];\n\t\tS3 = sh[ 6 ];\n\t\tS4 = sh[ 5 ];\n\t\tS5 = sh[ 4 ];\n\t\tS6 = sh[ 3 ];\n\t\tS7 = sh[ 2 ];\n\t\tS8 = sh[ 1 ];\n\t\tS9 = sh[ 0 ];\n\t\tdx0 = sx[ 9 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 8 ] - ( S0*sx[9] );\n\t\tdx2 = sx[ 7 ] - ( S1*sx[8] );\n\t\tdx3 = sx[ 6 ] - ( S2*sx[7] );\n\t\tdx4 = sx[ 5 ] - ( S3*sx[6] );\n\t\tdx5 = sx[ 4 ] - ( S4*sx[5] );\n\t\tdx6 = sx[ 3 ] - ( S5*sx[4] );\n\t\tdx7 = sx[ 2 ] - ( S6*sx[3] );\n\t\tdx8 = sx[ 1 ] - ( S7*sx[2] );\n\t\tdx9 = sx[ 0 ] - ( S8*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tS9 = sh[ 9 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] );\n\t\tdx9 = sx[ 9 ] - ( S8*sx[8] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Cache accessor:\n\tset = x.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i9 = 0; i9 < S9; i9++ ) {\n\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tset( xbuf, ix, fcn() );\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx6;\n\t\t\t\t}\n\t\t\t\tix += dx7;\n\t\t\t}\n\t\t\tix += dx8;\n\t\t}\n\t\tix += dx9;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary10d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Converts a linear index in an array view to a linear index in an underlying data buffer.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - location of the first indexed value **based** on the stride array\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {integer} idx - linear index in an array view\n* @param {string} mode - specifies how to handle a linear index which exceeds array dimensions\n* @throws {RangeError} linear index must not exceed array dimensions\n* @returns {NonNegativeInteger} linear index in an underlying data buffer\n*\n* @example\n* var shape = [ 3, 3 ];\n* var strides = [ -3, 1 ];\n* var offset = 6;\n* var order = 'row-major';\n* var mode = 'throw';\n*\n* var ind = vind2bind( shape, strides, offset, order, 1, mode );\n* // returns 7\n*/\nfunction vind2bind( shape, strides, offset, order, idx, mode ) {\n\tvar ndims;\n\tvar len;\n\tvar ind;\n\tvar s;\n\tvar i;\n\n\tndims = shape.length;\n\tlen = 1;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tlen *= shape[ i ];\n\t}\n\tif ( mode === 'clamp' ) {\n\t\tif ( idx < 0 ) {\n\t\t\tidx = 0;\n\t\t} else if ( idx >= len ) {\n\t\t\tidx = len - 1;\n\t\t}\n\t} else if ( mode === 'wrap' ) {\n\t\tif ( idx < 0 ) {\n\t\t\tidx += len; // slight optimization to avoid modulo arithmetic when |idx| <= len\n\t\t\tif ( idx < 0 ) {\n\t\t\t\tidx %= len;\n\t\t\t\tif ( idx !== 0 ) {\n\t\t\t\t\tidx += len;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( idx >= len ) {\n\t\t\tidx -= len; // slight optimization to avoid modulo arithmetic when len < idx <= 2*len\n\t\t\tif ( idx >= len ) {\n\t\t\t\tidx %= len;\n\t\t\t}\n\t\t}\n\t} else if ( idx < 0 || idx >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.', len, idx ) );\n\t}\n\t// The approach which follows is to resolve a view index to its subscripts and then plug the subscripts into the standard formula for computing the linear index in the underlying data buffer...\n\tind = offset;\n\tif ( order === 'column-major' ) {\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\ts = idx % shape[ i ];\n\t\t\tidx -= s;\n\t\t\tidx /= shape[ i ];\n\t\t\tind += s * strides[ i ];\n\t\t}\n\t\treturn ind;\n\t}\n\t// Case: row-major\n\tfor ( i = ndims-1; i >= 0; i-- ) {\n\t\ts = idx % shape[ i ];\n\t\tidx -= s;\n\t\tidx /= shape[ i ];\n\t\tind += s * strides[ i ];\n\t}\n\treturn ind;\n}\n\n\n// EXPORTS //\n\nmodule.exports = vind2bind;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a linear index in an array view to a linear index in an underlying data buffer.\n*\n* @module @stdlib/ndarray/base/vind2bind\n*\n* @example\n* var vind2bind = require( '@stdlib/ndarray/base/vind2bind' );\n*\n* var shape = [ 3, 3 ];\n* var strides = [ -3, 1 ];\n* var offset = 6;\n* var order = 'row-major';\n* var mode = 'throw';\n*\n* var ind = vind2bind( shape, strides, offset, order, 1, mode );\n* // returns 7\n*/\n\n// MODULES //\n\nvar vind2bind = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = vind2bind;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar numel = require( './../../../base/numel' );\nvar vind2bind = require( './../../../base/vind2bind' );\n\n\n// VARIABLES //\n\nvar MODE = 'throw';\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function fcn() {\n* return new Complex64( 10.0, -10.0 );\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Complex64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 1 ];\n*\n* // Define the index offset:\n* var ox = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the nullary function:\n* nullarynd( x, fcn );\n*\n* var v = x.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns -10.0\n*/\nfunction nullarynd( x, fcn ) {\n\tvar xbuf;\n\tvar ordx;\n\tvar len;\n\tvar set;\n\tvar sh;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i;\n\n\tsh = x.shape;\n\n\t// Compute the total number of elements over which to iterate:\n\tlen = numel( sh );\n\n\t// Cache a reference to the output ndarray data buffer:\n\txbuf = x.data;\n\n\t// Cache a reference to the stride array:\n\tsx = x.strides;\n\n\t// Cache the index of the first indexed element:\n\tox = x.offset;\n\n\t// Cache the array order:\n\tordx = x.order;\n\n\t// Cache accessor:\n\tset = x.accessors[ 1 ];\n\n\t// Iterate over each element based on the linear **view** index, regardless as to how the data is stored in memory...\n\tfor ( i = 0; i < len; i++ ) {\n\t\tix = vind2bind( sh, sx, ox, ordx, i, MODE );\n\t\tset( xbuf, ix, fcn() );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullarynd;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary function and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 2 );\n*\n* // Define the shape of the output array:\n* var shape = [];\n*\n* // Define the array strides:\n* var sx = [ 0 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* nullary0d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0 ]\n*/\nfunction nullary0d( x, fcn ) {\n\tx.data[ x.offset ] = fcn();\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary0d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary function and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 4 ];\n*\n* // Define the array strides:\n* var sx = [ 2 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* nullary1d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 0.0, 10.0, 0.0, 10.0, 0.0, 10.0 ]\n*/\nfunction nullary1d( x, fcn ) {\n\tvar xbuf;\n\tvar dx0;\n\tvar S0;\n\tvar ix;\n\tvar i0;\n\n\t// Note on variable naming convention: S#, dx#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables: dimensions and loop offset (pointer) increments:\n\tS0 = x.shape[ 0 ];\n\tdx0 = x.strides[ 0 ];\n\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\txbuf[ ix ] = fcn();\n\t\tix += dx0;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary1d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* nullary2d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction nullary2d( x, fcn ) {\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 1 ];\n\t\tS1 = sh[ 0 ];\n\t\tdx0 = sx[ 1 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 0 ] - ( S0*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\txbuf[ ix ] = fcn();\n\t\t\tix += dx0;\n\t\t}\n\t\tix += dx1;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary2d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* nullary3d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction nullary3d( x, fcn ) {\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 2 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 0 ];\n\t\tdx0 = sx[ 2 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[2] );\n\t\tdx2 = sx[ 0 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\txbuf[ ix ] = fcn();\n\t\t\t\tix += dx0;\n\t\t\t}\n\t\t\tix += dx1;\n\t\t}\n\t\tix += dx2;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary3d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* nullary4d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction nullary4d( x, fcn ) {\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 3 ];\n\t\tS1 = sh[ 2 ];\n\t\tS2 = sh[ 1 ];\n\t\tS3 = sh[ 0 ];\n\t\tdx0 = sx[ 3 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 2 ] - ( S0*sx[3] );\n\t\tdx2 = sx[ 1 ] - ( S1*sx[2] );\n\t\tdx3 = sx[ 0 ] - ( S2*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\txbuf[ ix ] = fcn();\n\t\t\t\t\tix += dx0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t}\n\t\t\tix += dx2;\n\t\t}\n\t\tix += dx3;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary4d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* nullary5d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction nullary5d( x, fcn ) {\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 4 ];\n\t\tS1 = sh[ 3 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 1 ];\n\t\tS4 = sh[ 0 ];\n\t\tdx0 = sx[ 4 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 3 ] - ( S0*sx[4] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[3] );\n\t\tdx3 = sx[ 1 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 0 ] - ( S3*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\txbuf[ ix ] = fcn();\n\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx1;\n\t\t\t\t}\n\t\t\t\tix += dx2;\n\t\t\t}\n\t\t\tix += dx3;\n\t\t}\n\t\tix += dx4;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary5d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* nullary6d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction nullary6d( x, fcn ) {\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 5 ];\n\t\tS1 = sh[ 4 ];\n\t\tS2 = sh[ 3 ];\n\t\tS3 = sh[ 2 ];\n\t\tS4 = sh[ 1 ];\n\t\tS5 = sh[ 0 ];\n\t\tdx0 = sx[ 5 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 4 ] - ( S0*sx[5] );\n\t\tdx2 = sx[ 3 ] - ( S1*sx[4] );\n\t\tdx3 = sx[ 2 ] - ( S2*sx[3] );\n\t\tdx4 = sx[ 1 ] - ( S3*sx[2] );\n\t\tdx5 = sx[ 0 ] - ( S4*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\txbuf[ ix ] = fcn();\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t}\n\t\t\t\tix += dx3;\n\t\t\t}\n\t\t\tix += dx4;\n\t\t}\n\t\tix += dx5;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary6d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* nullary7d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction nullary7d( x, fcn ) {\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 6 ];\n\t\tS1 = sh[ 5 ];\n\t\tS2 = sh[ 4 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 2 ];\n\t\tS5 = sh[ 1 ];\n\t\tS6 = sh[ 0 ];\n\t\tdx0 = sx[ 6 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 5 ] - ( S0*sx[6] );\n\t\tdx2 = sx[ 4 ] - ( S1*sx[5] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[4] );\n\t\tdx4 = sx[ 2 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 1 ] - ( S4*sx[2] );\n\t\tdx6 = sx[ 0 ] - ( S5*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\txbuf[ ix ] = fcn();\n\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx3;\n\t\t\t\t}\n\t\t\t\tix += dx4;\n\t\t\t}\n\t\t\tix += dx5;\n\t\t}\n\t\tix += dx6;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary7d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* nullary8d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction nullary8d( x, fcn ) {\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 7 ];\n\t\tS1 = sh[ 6 ];\n\t\tS2 = sh[ 5 ];\n\t\tS3 = sh[ 4 ];\n\t\tS4 = sh[ 3 ];\n\t\tS5 = sh[ 2 ];\n\t\tS6 = sh[ 1 ];\n\t\tS7 = sh[ 0 ];\n\t\tdx0 = sx[ 7 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 6 ] - ( S0*sx[7] );\n\t\tdx2 = sx[ 5 ] - ( S1*sx[6] );\n\t\tdx3 = sx[ 4 ] - ( S2*sx[5] );\n\t\tdx4 = sx[ 3 ] - ( S3*sx[4] );\n\t\tdx5 = sx[ 2 ] - ( S4*sx[3] );\n\t\tdx6 = sx[ 1 ] - ( S5*sx[2] );\n\t\tdx7 = sx[ 0 ] - ( S6*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\txbuf[ ix ] = fcn();\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx4;\n\t\t\t\t}\n\t\t\t\tix += dx5;\n\t\t\t}\n\t\t\tix += dx6;\n\t\t}\n\t\tix += dx7;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary8d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* nullary9d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction nullary9d( x, fcn ) {\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 8 ];\n\t\tS1 = sh[ 7 ];\n\t\tS2 = sh[ 6 ];\n\t\tS3 = sh[ 5 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 3 ];\n\t\tS6 = sh[ 2 ];\n\t\tS7 = sh[ 1 ];\n\t\tS8 = sh[ 0 ];\n\t\tdx0 = sx[ 8 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 7 ] - ( S0*sx[8] );\n\t\tdx2 = sx[ 6 ] - ( S1*sx[7] );\n\t\tdx3 = sx[ 5 ] - ( S2*sx[6] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[5] );\n\t\tdx5 = sx[ 3 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 2 ] - ( S5*sx[3] );\n\t\tdx7 = sx[ 1 ] - ( S6*sx[2] );\n\t\tdx8 = sx[ 0 ] - ( S7*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\txbuf[ ix ] = fcn();\n\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx5;\n\t\t\t\t}\n\t\t\t\tix += dx6;\n\t\t\t}\n\t\t\tix += dx7;\n\t\t}\n\t\tix += dx8;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary9d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* nullary10d( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction nullary10d( x, fcn ) {\n\tvar xbuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar S9;\n\tvar sx;\n\tvar ix;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 9 ];\n\t\tS1 = sh[ 8 ];\n\t\tS2 = sh[ 7 ];\n\t\tS3 = sh[ 6 ];\n\t\tS4 = sh[ 5 ];\n\t\tS5 = sh[ 4 ];\n\t\tS6 = sh[ 3 ];\n\t\tS7 = sh[ 2 ];\n\t\tS8 = sh[ 1 ];\n\t\tS9 = sh[ 0 ];\n\t\tdx0 = sx[ 9 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 8 ] - ( S0*sx[9] );\n\t\tdx2 = sx[ 7 ] - ( S1*sx[8] );\n\t\tdx3 = sx[ 6 ] - ( S2*sx[7] );\n\t\tdx4 = sx[ 5 ] - ( S3*sx[6] );\n\t\tdx5 = sx[ 4 ] - ( S4*sx[5] );\n\t\tdx6 = sx[ 3 ] - ( S5*sx[4] );\n\t\tdx7 = sx[ 2 ] - ( S6*sx[3] );\n\t\tdx8 = sx[ 1 ] - ( S7*sx[2] );\n\t\tdx9 = sx[ 0 ] - ( S8*sx[1] ); // offset increment for outermost loop\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tS9 = sh[ 9 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] );\n\t\tdx9 = sx[ 9 ] - ( S8*sx[8] ); // offset increment for outermost loop\n\t}\n\t// Set a pointer to the first indexed element:\n\tix = x.offset;\n\n\t// Cache a reference to the output ndarray buffer:\n\txbuf = x.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i9 = 0; i9 < S9; i9++ ) {\n\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\txbuf[ ix ] = fcn();\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx6;\n\t\t\t\t}\n\t\t\t\tix += dx7;\n\t\t\t}\n\t\t\tix += dx8;\n\t\t}\n\t\tix += dx9;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary10d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar numel = require( './../../../base/numel' );\nvar vind2bind = require( './../../../base/vind2bind' );\n\n\n// VARIABLES //\n\nvar MODE = 'throw';\n\n\n// MAIN //\n\n/**\n* Applies a nullary callback and assigns results to elements in an output ndarray.\n*\n* @private\n* @param {Object} x - object containing ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 8 );\n*\n* // Define the shape of the output array:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the output ndarray-like object:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* nullarynd( x, fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction nullarynd( x, fcn ) {\n\tvar xbuf;\n\tvar ordx;\n\tvar len;\n\tvar sh;\n\tvar sx;\n\tvar ox;\n\tvar ix;\n\tvar i;\n\n\tsh = x.shape;\n\n\t// Compute the total number of elements over which to iterate:\n\tlen = numel( sh );\n\n\t// Cache a reference to the output ndarray data buffer:\n\txbuf = x.data;\n\n\t// Cache a reference to the stride array:\n\tsx = x.strides;\n\n\t// Cache the index of the first indexed element:\n\tox = x.offset;\n\n\t// Cache the array order:\n\tordx = x.order;\n\n\t// Iterate over each element based on the linear **view** index, regardless as to how the data is stored in memory...\n\tfor ( i = 0; i < len; i++ ) {\n\t\tix = vind2bind( sh, sx, ox, ordx, i, MODE );\n\t\txbuf[ ix ] = fcn();\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullarynd;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar iterationOrder = require( './../../../base/iteration-order' );\nvar minmaxViewBufferIndex = require( './../../../base/minmax-view-buffer-index' );\nvar ndarray2object = require( './../../../base/ndarraylike2object' );\nvar blockedaccessornullary2d = require( './2d_blocked_accessors.js' );\nvar blockedaccessornullary3d = require( './3d_blocked_accessors.js' );\nvar blockedaccessornullary4d = require( './4d_blocked_accessors.js' );\nvar blockedaccessornullary5d = require( './5d_blocked_accessors.js' );\nvar blockedaccessornullary6d = require( './6d_blocked_accessors.js' );\nvar blockedaccessornullary7d = require( './7d_blocked_accessors.js' );\nvar blockedaccessornullary8d = require( './8d_blocked_accessors.js' );\nvar blockedaccessornullary9d = require( './9d_blocked_accessors.js' );\nvar blockedaccessornullary10d = require( './10d_blocked_accessors.js' );\nvar blockednullary2d = require( './2d_blocked.js' );\nvar blockednullary3d = require( './3d_blocked.js' );\nvar blockednullary4d = require( './4d_blocked.js' );\nvar blockednullary5d = require( './5d_blocked.js' );\nvar blockednullary6d = require( './6d_blocked.js' );\nvar blockednullary7d = require( './7d_blocked.js' );\nvar blockednullary8d = require( './8d_blocked.js' );\nvar blockednullary9d = require( './9d_blocked.js' );\nvar blockednullary10d = require( './10d_blocked.js' );\nvar accessornullary0d = require( './0d_accessors.js' );\nvar accessornullary1d = require( './1d_accessors.js' );\nvar accessornullary2d = require( './2d_accessors.js' );\nvar accessornullary3d = require( './3d_accessors.js' );\nvar accessornullary4d = require( './4d_accessors.js' );\nvar accessornullary5d = require( './5d_accessors.js' );\nvar accessornullary6d = require( './6d_accessors.js' );\nvar accessornullary7d = require( './7d_accessors.js' );\nvar accessornullary8d = require( './8d_accessors.js' );\nvar accessornullary9d = require( './9d_accessors.js' );\nvar accessornullary10d = require( './10d_accessors.js' );\nvar accessornullarynd = require( './nd_accessors.js' );\nvar nullary0d = require( './0d.js' );\nvar nullary1d = require( './1d.js' );\nvar nullary2d = require( './2d.js' );\nvar nullary3d = require( './3d.js' );\nvar nullary4d = require( './4d.js' );\nvar nullary5d = require( './5d.js' );\nvar nullary6d = require( './6d.js' );\nvar nullary7d = require( './7d.js' );\nvar nullary8d = require( './8d.js' );\nvar nullary9d = require( './9d.js' );\nvar nullary10d = require( './10d.js' );\nvar nullarynd = require( './nd.js' );\n\n\n// VARIABLES //\n\nvar NULLARY = [\n\tnullary0d,\n\tnullary1d,\n\tnullary2d,\n\tnullary3d,\n\tnullary4d,\n\tnullary5d,\n\tnullary6d,\n\tnullary7d,\n\tnullary8d,\n\tnullary9d,\n\tnullary10d\n];\nvar ACCESSOR_NULLARY = [\n\taccessornullary0d,\n\taccessornullary1d,\n\taccessornullary2d,\n\taccessornullary3d,\n\taccessornullary4d,\n\taccessornullary5d,\n\taccessornullary6d,\n\taccessornullary7d,\n\taccessornullary8d,\n\taccessornullary9d,\n\taccessornullary10d\n];\nvar BLOCKED_NULLARY = [\n\tblockednullary2d, // 0\n\tblockednullary3d,\n\tblockednullary4d,\n\tblockednullary5d,\n\tblockednullary6d,\n\tblockednullary7d,\n\tblockednullary8d,\n\tblockednullary9d,\n\tblockednullary10d // 8\n];\nvar BLOCKED_ACCESSOR_NULLARY = [\n\tblockedaccessornullary2d, // 0\n\tblockedaccessornullary3d,\n\tblockedaccessornullary4d,\n\tblockedaccessornullary5d,\n\tblockedaccessornullary6d,\n\tblockedaccessornullary7d,\n\tblockedaccessornullary8d,\n\tblockedaccessornullary9d,\n\tblockedaccessornullary10d // 8\n];\nvar MAX_DIMS = NULLARY.length - 1;\n\n\n// MAIN //\n\n/**\n* Applies a nullary function and assigns results to elements in an output ndarray.\n*\n* ## Notes\n*\n* - A provided ndarray should be an `object` with the following properties:\n*\n* - **dtype**: data type.\n* - **data**: data buffer.\n* - **shape**: dimensions.\n* - **strides**: stride lengths.\n* - **offset**: index offset.\n* - **order**: specifies whether an ndarray is row-major (C-style) or column major (Fortran-style).\n*\n* @param {ArrayLikeObject} arrays - array-like object containing one output array\n* @param {Callback} fcn - nullary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the ioutput ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* nullary( [ x ], fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\nfunction nullary( arrays, fcn ) {\n\tvar ndims;\n\tvar xmmv;\n\tvar shx;\n\tvar iox;\n\tvar len;\n\tvar sx;\n\tvar ox;\n\tvar ns;\n\tvar x;\n\tvar d;\n\tvar i;\n\n\t// Unpack the ndarray and standardize ndarray meta data:\n\tx = ndarray2object( arrays[ 0 ] );\n\tshx = x.shape;\n\tndims = shx.length;\n\n\t// Determine whether we can avoid iteration altogether...\n\tif ( ndims === 0 ) {\n\t\tif ( x.accessorProtocol ) {\n\t\t\treturn ACCESSOR_NULLARY[ ndims ]( x, fcn );\n\t\t}\n\t\treturn NULLARY[ ndims ]( x, fcn );\n\t}\n\t// Compute the number of elements and the number of singleton dimensions...\n\tlen = 1; // number of elements\n\tns = 0; // number of singleton dimensions\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\td = shx[ i ];\n\n\t\t// Note that, if one of the dimensions is `0`, the length will be `0`...\n\t\tlen *= d;\n\n\t\t// Check whether the current dimension is a singleton dimension...\n\t\tif ( d === 1 ) {\n\t\t\tns += 1;\n\t\t}\n\t}\n\t// Check whether we were provided an empty ndarray...\n\tif ( len === 0 ) {\n\t\treturn;\n\t}\n\t// Determine whether the ndarray is one-dimensional and thus readily translates to a one-dimensional strided array...\n\tif ( ndims === 1 ) {\n\t\tif ( x.accessorProtocol ) {\n\t\t\treturn ACCESSOR_NULLARY[ ndims ]( x, fcn );\n\t\t}\n\t\treturn NULLARY[ ndims ]( x, fcn );\n\t}\n\tsx = x.strides;\n\n\t// Determine whether the ndarray has only **one** non-singleton dimension (e.g., ndims=4, shape=[10,1,1,1]) so that we can treat an ndarray as being equivalent to a one-dimensional strided array...\n\tif ( ns === ndims-1 ) {\n\t\t// Get the index of the non-singleton dimension...\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\tif ( shx[ i ] !== 1 ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tx.shape = [ shx[i] ];\n\t\tx.strides = [ sx[i] ];\n\t\tif ( x.accessorProtocol ) {\n\t\t\treturn ACCESSOR_NULLARY[ 1 ]( x, fcn );\n\t\t}\n\t\treturn NULLARY[ 1 ]( x, fcn );\n\t}\n\tiox = iterationOrder( sx ); // +/-1\n\n\t// Determine whether we can avoid blocked iteration...\n\tif ( iox !== 0 ) {\n\t\t// Determine the minimum and maximum linear indices which are accessible by the array view:\n\t\txmmv = minmaxViewBufferIndex( shx, sx, x.offset );\n\n\t\t// Determine whether we can ignore shape (and strides) and treat the ndarray as a linear one-dimensional strided array...\n\t\tif ( len === ( xmmv[1]-xmmv[0]+1 ) ) {\n\t\t\t// Note: the above is equivalent to @stdlib/ndarray/base/assert/is-contiguous, but in-lined so we can retain computed values...\n\t\t\tif ( iox === 1 ) {\n\t\t\t\tox = xmmv[ 0 ];\n\t\t\t} else {\n\t\t\t\tox = xmmv[ 1 ];\n\t\t\t}\n\t\t\tx.shape = [ len ];\n\t\t\tx.strides = [ iox ];\n\t\t\tx.offset = ox;\n\t\t\tif ( x.accessorProtocol ) {\n\t\t\t\treturn ACCESSOR_NULLARY[ 1 ]( x, fcn );\n\t\t\t}\n\t\t\treturn NULLARY[ 1 ]( x, fcn );\n\t\t}\n\t\t// The ndarray is non-contiguous, so we cannot directly use one-dimensional array functionality...\n\n\t\t// Determine whether we can use simple nested loops...\n\t\tif ( ndims <= MAX_DIMS ) {\n\t\t\t// So long as iteration always moves in the same direction (i.e., no mixed sign strides), we can leverage cache-optimal (i.e., normal) nested loops without resorting to blocked iteration...\n\t\t\tif ( x.accessorProtocol ) {\n\t\t\t\treturn ACCESSOR_NULLARY[ ndims ]( x, fcn );\n\t\t\t}\n\t\t\treturn NULLARY[ ndims ]( x, fcn );\n\t\t}\n\t\t// Fall-through to blocked iteration...\n\t}\n\t// At this point, we're either dealing with a non-contiguous n-dimensional array or a high dimensional n-dimensional array, so our only hope is that we can still perform blocked iteration...\n\n\t// Determine whether we can perform blocked iteration...\n\tif ( ndims <= MAX_DIMS ) {\n\t\tif ( x.accessorProtocol ) {\n\t\t\treturn BLOCKED_ACCESSOR_NULLARY[ ndims-2 ]( x, fcn );\n\t\t}\n\t\treturn BLOCKED_NULLARY[ ndims-2 ]( x, fcn );\n\t}\n\t// Fall-through to linear view iteration without regard for how data is stored in memory (i.e., take the slow path)...\n\tif ( x.accessorProtocol ) {\n\t\treturn accessornullarynd( x, fcn );\n\t}\n\tnullarynd( x, fcn );\n}\n\n\n// EXPORTS //\n\nmodule.exports = nullary;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Apply a nullary function and assign results to elements in an output ndarray.\n*\n* @module @stdlib/ndarray/base/nullary\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var nullary = require( '@stdlib/ndarray/base/nullary' );\n*\n* function fcn() {\n* return 10.0;\n* }\n*\n* // Create a data buffer:\n* var xbuf = new Float64Array( 12 );\n*\n* // Define the shape of the output array:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n*\n* // Define the index offset:\n* var ox = 1;\n*\n* // Create the ioutput ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n*\n* // Apply the nullary function:\n* nullary( [ x ], fcn );\n*\n* console.log( x.data );\n* // => [ 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 10.0, 10.0, 0.0 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "[\n \"same\",\n \"promoted\",\n \"bool\",\n\t\"signed_integer\",\n \"unsigned_integer\",\n \"integer\",\n \"floating_point\",\n \"real_floating_point\",\n \"complex_floating_point\",\n \"real\",\n \"numeric\",\n \"default\"\n]\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar POLICIES = require( './policies.json' );\n\n\n// MAIN //\n\n/**\n* Returns a list of output ndarray data type policies.\n*\n* @returns {StringArray} list of ndarray data type policies\n*\n* @example\n* var list = policies();\n* // returns [...]\n*/\nfunction policies() {\n\treturn POLICIES.slice();\n}\n\n\n// EXPORTS //\n\nmodule.exports = policies;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns an object mapping supported data type policy strings to enumeration constants.\n*\n* ## Notes\n*\n* - Downstream consumers of this mapping should **not** rely on specific integer values (e.g., `SAME == 0`). Instead, the object should be used in an opaque manner.\n* - The main purpose of this function is JavaScript and C inter-operation of ndarray objects.\n*\n* @private\n* @returns {Object} object mapping supported dtype policies to enumeration constants\n*\n* @example\n* var table = enumeration();\n* // returns \n*/\nfunction enumeration() {\n\t// NOTE: the following should match the C `output_dtype_policies.h` enumeration!!!!\n\treturn {\n\t\t'same': 0,\n\t\t'promoted': 1,\n\t\t'bool': 2,\n\t\t'signed_integer': 3,\n\t\t'unsigned_integer': 4,\n\t\t'integer': 5,\n\t\t'floating_point': 6,\n\t\t'real_floating_point': 7,\n\t\t'complex_floating_point': 8,\n\t\t'real': 9,\n\t\t'numeric': 10,\n\t\t'default': 11\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = enumeration;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-read-only-property' );\nvar objectKeys = require( '@stdlib/utils/keys' );\n\n\n// MAIN //\n\n/**\n* Copies all enumerable own properties from a source object to a target object as enumerable read-only properties.\n*\n* @private\n* @param {Object} target - target object\n* @param {Object} source - source object\n* @returns {Object} modified target object\n*\n* @example\n* var source = {\n* 'beep': 'boop'\n* };\n* var target = {};\n*\n* var out = assign( target, source );\n* // returns \n*\n* var bool = ( out === target );\n* // returns true\n*\n* var v = target.beep;\n* // returns 'boop'\n*/\nfunction assign( target, source ) {\n\tvar keys;\n\tvar k;\n\tvar i;\n\n\tkeys = objectKeys( source );\n\tfor ( i = 0; i < keys.length; i++ ) {\n\t\tk = keys[ i ];\n\t\tsetReadOnly( target, k, source[ k ] );\n\t}\n\treturn target;\n}\n\n\n// EXPORTS //\n\nmodule.exports = assign;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a list of output ndarray data type policies.\n*\n* @module @stdlib/ndarray/output-dtype-policies\n*\n* @example\n* var policies = require( '@stdlib/ndarray/output-dtype-policies' );\n*\n* var list = policies();\n* // returns [...]\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar enumeration = require( './enum.js' );\nvar assign = require( './assign.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'enum', enumeration );\nassign( main, enumeration() );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar objectInverse = require( '@stdlib/utils/object-inverse' );\nvar enumeration = require( './../../../output-dtype-policies' ).enum;\n\n\n// VARIABLES //\n\nvar hash = objectInverse( enumeration(), {\n\t'duplicates': false\n});\n\n\n// MAIN //\n\n/**\n* Returns the policy string associated with an output ndarray data type policy enumeration constant.\n*\n* @param {integer} policy - policy enumeration constant\n* @returns {(string|null)} policy string or null\n*\n* @example\n* var str2enum = require( '@stdlib/ndarray/base/output-policy-str2enum' );\n*\n* var v = str2enum( 'same' );\n* // returns \n*\n* var policy = enum2str( v );\n* // returns 'same'\n*/\nfunction enum2str( policy ) {\n\tvar v = hash[ policy ];\n\treturn ( typeof v === 'string' ) ? v : null; // note: we include this guard to prevent walking the prototype chain\n}\n\n\n// EXPORTS //\n\nmodule.exports = enum2str;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the policy string associated with an output ndarray data type policy enumeration constant.\n*\n* @module @stdlib/ndarray/base/output-policy-enum2str\n*\n* @example\n* var str2enum = require( '@stdlib/ndarray/base/output-policy-str2enum' );\n* var enum2str = require( '@stdlib/ndarray/base/output-policy-enum2str' );\n*\n* var v = str2enum( 'same' );\n* // returns \n*\n* var policy = enum2str( v );\n* // returns 'same'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar enumeration = require( './../../../output-dtype-policies' ).enum;\n\n\n// VARIABLES //\n\nvar ENUM = enumeration();\n\n\n// MAIN //\n\n/**\n* Returns the enumeration constant associated with an output ndarray data type policy string.\n*\n* ## Notes\n*\n* - Downstream consumers of this function should **not** rely on specific integer values (e.g., `SAME == 0`). Instead, the function should be used in an opaque manner.\n*\n* @param {string} policy - policy string\n* @returns {(integer|null)} integer value or null\n*\n* @example\n* var v = str2enum( 'same' );\n* // returns \n*/\nfunction str2enum( policy ) {\n\tvar v = ENUM[ policy ];\n\treturn ( typeof v === 'number' ) ? v : null; // note: we include this guard to prevent walking the prototype chain\n}\n\n\n// EXPORTS //\n\nmodule.exports = str2enum;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the enumeration constant associated with an output ndarray data type policy string.\n*\n* @module @stdlib/ndarray/base/output-policy-str2enum\n*\n* @example\n* var str2enum = require( '@stdlib/ndarray/base/output-policy-str2enum' );\n*\n* var v = str2enum( 'same' );\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar enum2str = require( './../../../base/output-policy-enum2str' );\nvar str2enum = require( './../../../base/output-policy-str2enum' );\n\n\n// MAIN //\n\n/**\n* Returns the enumeration constant associated with a supported ndarray data type policy value.\n*\n* ## Notes\n*\n* - Downstream consumers of this function should **not** rely on specific integer values (e.g., `SAME == 0`). Instead, the function should be used in an opaque manner.\n*\n* @param {*} policy - policy value\n* @returns {(integer|null)} enumeration constant or null\n*\n* @example\n* var v = resolve( 'same' );\n* // returns \n*/\nfunction resolve( policy ) {\n\tvar t = ( typeof policy );\n\tif ( t === 'number' ) {\n\t\treturn ( enum2str( policy ) ) ? policy : null;\n\t}\n\tif ( t === 'string' ) {\n\t\treturn str2enum( policy );\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = resolve;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the enumeration constant associated with a supported ndarray data type policy value.\n*\n* @module @stdlib/ndarray/base/output-policy-resolve-enum\n*\n* @example\n* var resolve = require( '@stdlib/ndarray/base/output-policy-resolve-enum' );\n*\n* var v = resolve( 'same' );\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar enum2str = require( './../../../base/output-policy-enum2str' );\nvar str2enum = require( './../../../base/output-policy-str2enum' );\n\n\n// MAIN //\n\n/**\n* Returns the policy string associated with a supported ndarray data type policy value.\n*\n* @param {*} policy - policy value\n* @returns {(string|null)} policy string or null\n*\n* @example\n* var str2enum = require( '@stdlib/ndarray/base/output-policy-str2enum' );\n*\n* var v = resolve( str2enum( 'same' ) );\n* // returns 'same'\n*/\nfunction resolve( policy ) {\n\tvar t = ( typeof policy );\n\tif ( t === 'string' ) {\n\t\treturn ( str2enum( policy ) === null ) ? null : policy;\n\t}\n\tif ( t === 'number' ) {\n\t\treturn enum2str( policy );\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = resolve;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the policy string associated with a supported ndarray data type policy value.\n*\n* @module @stdlib/ndarray/base/output-policy-resolve-str\n*\n* @example\n* var str2enum = require( '@stdlib/ndarray/base/output-policy-str2enum' );\n* var resolve = require( '@stdlib/ndarray/base/output-policy-resolve-str' );\n*\n* var v = resolve( str2enum( 'same' ) );\n* // returns 'same'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isReadOnly = require( './../../../base/assert/is-read-only' );\nvar getDType = require( './../../../base/dtype' );\nvar getShape = require( './../../../base/shape' );\nvar getStrides = require( './../../../base/strides' );\nvar getOffset = require( './../../../base/offset' );\nvar getOrder = require( './../../../base/order' );\nvar getData = require( './../../../base/data-buffer' );\n\n\n// MAIN //\n\n/**\n* Returns an array with a specified number of prepended singleton dimensions.\n*\n* @param {ndarray} x - input array\n* @param {NonNegativeInteger} n - number of singleton dimensions to prepend\n* @returns {ndarray} output array\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var shx = x.shape;\n* // returns [ 2, 2 ]\n*\n* var y = prependSingletonDimensions( x, 3 );\n* // returns \n*\n* var shy = y.shape;\n* // returns [ 1, 1, 1, 2, 2 ]\n*\n* var v = y.get( 0, 0, 0, 0, 0 );\n* // returns 1\n*\n* v = y.get( 0, 0, 0, 0, 1 );\n* // returns 2\n*\n* v = y.get( 0, 0, 0, 1, 0 );\n* // returns 3\n*\n* v = y.get( 0, 0, 0, 1, 1 );\n* // returns 4\n*/\nfunction prependSingletonDimensions( x, n ) { // eslint-disable-line id-length\n\tvar strides;\n\tvar shape;\n\tvar sh;\n\tvar st;\n\tvar N;\n\tvar i;\n\n\tsh = getShape( x, false );\n\tst = getStrides( x, false );\n\tN = sh.length;\n\n\tstrides = [];\n\tshape = [];\n\n\t// Prepend singleton dimensions...\n\tfor ( i = 0; i < n; i++ ) {\n\t\tshape.push( 1 );\n\t\tstrides.push( st[ 0 ] );\n\t}\n\t// Copy remaining dimensions...\n\tfor ( i = 0; i < N; i++ ) {\n\t\tshape.push( sh[ i ] );\n\t\tstrides.push( st[ i ] );\n\t}\n\tif ( isReadOnly( x ) ) {\n\t\t// If provided a read-only view, the returned array should also be read-only...\n\t\treturn new x.constructor( getDType( x ), getData( x ), shape, strides, getOffset( x ), getOrder( x ), { // eslint-disable-line max-len\n\t\t\t'readonly': true\n\t\t});\n\t}\n\treturn new x.constructor( getDType( x ), getData( x ), shape, strides, getOffset( x ), getOrder( x ) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = prependSingletonDimensions;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Prepend singleton dimensions.\n*\n* @module @stdlib/ndarray/base/prepend-singleton-dimensions\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var prependSingletonDimensions = require( '@stdlib/ndarray/base/prepend-singleton-dimensions' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var shx = x.shape;\n* // returns [ 2, 2 ]\n*\n* var y = prependSingletonDimensions( x, 3 );\n* // returns \n*\n* var shy = y.shape;\n* // returns [ 1, 1, 1, 2, 2 ]\n*\n* var v = y.get( 0, 0, 0, 0, 0 );\n* // returns 1\n*\n* v = y.get( 0, 0, 0, 0, 1 );\n* // returns 2\n*\n* v = y.get( 0, 0, 0, 1, 0 );\n* // returns 3\n*\n* v = y.get( 0, 0, 0, 1, 1 );\n* // returns 4\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isReadOnly = require( './../../../base/assert/is-read-only' );\nvar getDType = require( './../../../base/dtype' );\nvar getShape = require( './../../../base/shape' );\nvar getStrides = require( './../../../base/strides' );\nvar getOffset = require( './../../../base/offset' );\nvar getOrder = require( './../../../base/order' );\nvar getData = require( './../../../base/data-buffer' );\n\n\n// MAIN //\n\n/**\n* Returns an array without singleton dimensions.\n*\n* ## Notes\n*\n* - If a provided ndarray does not have any singleton dimensions, the function returns the provided ndarray unchanged.\n* - If a provided ndarray does have singleton dimensions, the function returns a new ndarray view.\n*\n* @param {ndarray} x - input array\n* @returns {ndarray} squeezed array\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ], {\n* 'ndmin': 5\n* });\n* // returns \n*\n* var shx = x.shape;\n* // returns [ 1, 1, 1, 2, 2 ]\n*\n* var y = removeSingletonDimensions( x );\n* // returns \n*\n* var shy = y.shape;\n* // returns [ 2, 2 ]\n*\n* var v = y.get( 0, 0 );\n* // returns 1\n*\n* v = y.get( 0, 1 );\n* // returns 2\n*\n* v = y.get( 1, 0 );\n* // returns 3\n*\n* v = y.get( 1, 1 );\n* // returns 4\n*/\nfunction removeSingletonDimensions( x ) {\n\tvar strides;\n\tvar shape;\n\tvar sh;\n\tvar st;\n\tvar N;\n\tvar i;\n\n\tsh = getShape( x, false );\n\tst = getStrides( x, false );\n\tN = sh.length;\n\n\tstrides = [];\n\tshape = [];\n\n\t// Check for singleton dimensions...\n\tfor ( i = 0; i < N; i++ ) {\n\t\tif ( sh[ i ] !== 1 ) {\n\t\t\tshape.push( sh[ i ] );\n\t\t\tstrides.push( st[ i ] );\n\t\t}\n\t}\n\tif ( shape.length === N ) {\n\t\t// We did not find any singleton dimensions...\n\t\treturn x;\n\t}\n\tif ( isReadOnly( x ) ) {\n\t\t// If provided a read-only view, the returned array should also be read-only...\n\t\treturn new x.constructor( getDType( x ), getData( x ), shape, strides, getOffset( x ), getOrder( x ), { // eslint-disable-line max-len\n\t\t\t'readonly': true\n\t\t});\n\t}\n\treturn new x.constructor( getDType( x ), getData( x ), shape, strides, getOffset( x ), getOrder( x ) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = removeSingletonDimensions;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Remove singleton dimensions.\n*\n* @module @stdlib/ndarray/base/remove-singleton-dimensions\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var removeSingletonDimensions = require( '@stdlib/ndarray/base/remove-singleton-dimensions' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ], {\n* 'ndmin': 5\n* });\n* // returns \n*\n* var shx = x.shape;\n* // returns [ 1, 1, 1, 2, 2 ]\n*\n* var y = removeSingletonDimensions( x );\n* // returns \n*\n* var shy = y.shape;\n* // returns [ 2, 2 ]\n*\n* var v = y.get( 0, 0 );\n* // returns 1\n*\n* v = y.get( 0, 1 );\n* // returns 2\n*\n* v = y.get( 1, 0 );\n* // returns 3\n*\n* v = y.get( 1, 1 );\n* // returns 4\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar IS_LITTLE_ENDIAN = require( '@stdlib/assert/is-little-endian' );\nvar ArrayBuffer = require( '@stdlib/array/buffer' );\nvar DataView = require( '@stdlib/array/dataview' );\nvar BigInt = require( '@stdlib/bigint/ctor' );\nvar bytesPerElement = require( './../../../base/bytes-per-element' );\nvar dtypes = require( './../../../dtypes' ).enum;\nvar orders = require( './../../../orders' ).enum;\nvar modes = require( './../../../index-modes' ).enum;\nvar getDType = require( './../../../base/dtype' );\nvar getShape = require( './../../../base/shape' );\nvar getStrides = require( './../../../base/strides' );\nvar getOffset = require( './../../../base/offset' );\nvar getOrder = require( './../../../base/order' );\n\n\n// VARIABLES //\n\nvar DTYPES = dtypes();\nvar ORDERS = orders();\nvar MODES = modes();\n\n\n// MAIN //\n\n/**\n* Serializes ndarray meta data.\n*\n* ## Notes\n*\n* - This function takes into account ndarray-like objects which may support index modes.\n*\n* - Serialization is performed according to host byte order (endianness).\n*\n* - Meta data format:\n*\n* ```text\n* | endianness (1 byte) | (2 bytes) | (8 bytes) | (ndims*8 bytes) | (ndims*8 bytes) | (8 bytes) | (1 byte) | (1 byte) | (8 bytes) | (nsubmodes*1 bytes) | (4 bytes) |\n* ```\n*\n* which translates to the following `ArrayBuffer` layout:\n*\n* ```text\n* ArrayBuffer[\n* [int8],\n* [int16],\n* [int64],\n* [ndims*int64],\n* [ndims*int64],\n* [int64],\n* [int8],\n* [int8],\n* [int64],\n* [nsubmodes*int8],\n* [int32]\n* ]\n* ```\n*\n* where `strides` and `offset` are in units of bytes.\n*\n* - If the endianness is `1`, the byte order is little endian. If the endianness is `0`, the byte order is big endian.\n*\n* - Buffer length:\n*\n* ```text\n* 1 + 2 + 8 + (ndims*8) + (ndims*8) + 8 + 1 + 1 + 8 + (nsubmodes*1) + 4 = 33 + (ndims*16) + nsubmodes\n* ```\n*\n* For example, consider a three-dimensional ndarray with one subscript index mode (submode):\n*\n* ```text\n* 33 + (3*16) + 1 = 82 bytes\n* ```\n*\n* - Views:\n*\n* - endianness: `Int8Array( buf, 0, 1 )`\n* - dtype: `Int16Array( buf, 1, 1 )`\n* - ndims: `Int64Array( buf, 3, 1 )`\n* - shape: `Int64Array( buf, 11, ndims )`\n* - strides: `Int64Array( buf, 11+(ndims*8), ndims )`\n* - offset: `Int64Array( buf, 11+(ndims*16), 1 )`\n* - order: `Int8Array( buf, 19+(ndims*16), 1 )`\n* - mode: `Int8Array( buf, 20+(ndims*16), 1 )`\n* - nsubmodes: `Int64Array( buf, 21+(ndims*16), 1 )`\n* - submodes: `Int8Array( buf, 29+(ndims*16), nsubmodes )`\n* - flags: `Int32Array( buf, 29+(ndims*16)+nsubmodes, 1 )`\n*\n* @param {ndarrayLike} x - input array\n* @param {string} x.dtype - array data type\n* @param {NonNegativeIntegerArray} x.shape - array shape\n* @param {IntegerArray} x.strides - array strides\n* @param {NonNegativeInteger} x.offset - array index offset\n* @param {string} x.order - array order\n* @param {string} [x.mode='throw'] - array index mode\n* @param {StringArray} [x.submode=[x.mode]] - array subscript index modes\n* @param {Object} [x.flags={}] - array flags\n* @returns {DataView} serialized meta data\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n*\n* var dv = serialize( x );\n* // returns \n*/\nfunction serialize( x ) {\n\tvar nbytes;\n\tvar flgs;\n\tvar len;\n\tvar dt;\n\tvar sh;\n\tvar st;\n\tvar sm;\n\tvar v;\n\tvar m;\n\tvar o;\n\tvar s;\n\tvar N;\n\tvar M;\n\tvar i;\n\n\t// Check for interface which does the work of serializing to a DataView for us...\n\tif ( x.__array_meta_dataview__ ) { // eslint-disable-line no-underscore-dangle\n\t\treturn x.__array_meta_dataview__(); // eslint-disable-line no-underscore-dangle\n\t}\n\t// Extract meta data known to be attached to ndarray-like objects:\n\tdt = getDType( x );\n\tsh = getShape( x, false );\n\tst = getStrides( x, false );\n\tN = sh.length; // ndims\n\n\t// Extract meta data which may be available on ndarray-like objects (e.g., stdlib ndarray instances):\n\tm = x.mode || 'throw';\n\tsm = x.submode || [ m ];\n\tM = sm.length;\n\n\t// Determine number of bytes per element according to the ndarray dtype:\n\tnbytes = bytesPerElement( dt );\n\n\t// Compute the amount of memory we need to allocate for storing meta data:\n\tlen = 33 + (N*16) + M;\n\n\t// Allocate raw memory and create a view for interfacing with the allocated memory:\n\tv = new DataView( new ArrayBuffer( len ) );\n\n\t// Endianness: (byteoffset: 0; bytelength: 1)\n\to = 0;\n\tv.setInt8( o, ( IS_LITTLE_ENDIAN ) ? 1 : 0 );\n\n\t// Data type: (byteoffset: 1; bytelength: 2)\n\to += 1;\n\tv.setInt16( o, DTYPES[ dt ], IS_LITTLE_ENDIAN );\n\n\t// Number of dimensions: (byteoffset: 3; bytelength: 8)\n\to += 2;\n\tv.setBigInt64( o, BigInt( N ), IS_LITTLE_ENDIAN );\n\n\t// Shape and strides: (byteoffset: 11 and 11+(ndims*8), respectively; bytelength: ndims*8 for both shape and strides, and, thus, ndims*16 total)\n\ts = N * 8; // stride length between a dimension (shape[i]) and its associated stride\n\to += 8;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tv.setBigInt64( o, BigInt( sh[i] ), IS_LITTLE_ENDIAN );\n\t\tv.setBigInt64( o+s, BigInt( st[i]*nbytes ), IS_LITTLE_ENDIAN );\n\t\to += 8;\n\t}\n\t// Offset: (byteoffset: 11+(ndims*16); bytelength: 8)\n\to += s;\n\tv.setBigInt64( o, BigInt( getOffset( x )*nbytes ), IS_LITTLE_ENDIAN );\n\n\t// Order: (byteoffset: 19+(ndims*16); bytelength: 1)\n\to += 8;\n\tv.setInt8( o, ORDERS[ getOrder( x ) ] );\n\n\t// Index mode: (byteoffset: 20+(ndims*16); bytelength: 1)\n\to += 1;\n\tv.setInt8( o, MODES[ m ] );\n\n\t// Number of index submodes: (byteoffset: 21+(ndims*16); bytelength: 8)\n\to += 1;\n\tv.setBigInt64( o, BigInt( M ), IS_LITTLE_ENDIAN );\n\n\t// Submodes: (byteoffset: 29+(ndims*16); bytelength: nsubmodes*1)\n\to += 8;\n\tfor ( i = 0; i < M; i++ ) {\n\t\tv.setInt8( o, MODES[ sm[i] ] );\n\t\to += 1;\n\t}\n\t// Flags: (byteoffset: 29+(ndims*16)+nsubmodes; bytelength: 4)\n\tflgs = 0|0;\n\tif ( x.flags ) {\n\t\tflgs |= ( x.flags.READONLY ) ? 4 : 0; // 00000000 00000000 00000000 00000100\n\t}\n\tv.setInt32( o, flgs, IS_LITTLE_ENDIAN );\n\n\treturn v;\n}\n\n\n// EXPORTS //\n\nmodule.exports = serialize;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar IS_LITTLE_ENDIAN = require( '@stdlib/assert/is-little-endian' );\nvar float64ToInt64Bytes = require( '@stdlib/number/float64/base/to-int64-bytes' ).assign;\nvar ArrayBuffer = require( '@stdlib/array/buffer' );\nvar Uint8Array = require( '@stdlib/array/uint8' );\nvar DataView = require( '@stdlib/array/dataview' );\nvar bytesPerElement = require( './../../../base/bytes-per-element' );\nvar dtypes = require( './../../../dtypes' ).enum;\nvar orders = require( './../../../orders' ).enum;\nvar modes = require( './../../../index-modes' ).enum;\nvar getDType = require( './../../../base/dtype' );\nvar getShape = require( './../../../base/shape' );\nvar getStrides = require( './../../../base/strides' );\nvar getOffset = require( './../../../base/offset' );\nvar getOrder = require( './../../../base/order' );\n\n\n// VARIABLES //\n\nvar DTYPES = dtypes();\nvar ORDERS = orders();\nvar MODES = modes();\n\n\n// MAIN //\n\n/**\n* Serializes ndarray meta data.\n*\n* ## Notes\n*\n* - This function takes into account ndarray-like objects which may support index modes.\n*\n* - Serialization is performed according to host byte order (endianness).\n*\n* - Meta data format:\n*\n* ```text\n* | endianness (1 byte) | (2 bytes) | (8 bytes) | (ndims*8 bytes) | (ndims*8 bytes) | (8 bytes) | (1 byte) | (1 byte) | (8 bytes) | (nsubmodes*1 bytes) | (4 bytes) |\n* ```\n*\n* which translates to the following `ArrayBuffer` layout:\n*\n* ```text\n* ArrayBuffer[\n* [int8],\n* [int16],\n* [int64],\n* [ndims*int64],\n* [ndims*int64],\n* [int64],\n* [int8],\n* [int8],\n* [int64],\n* [nsubmodes*int8],\n* [int32]\n* ]\n* ```\n*\n* where `strides` and `offset` are in units of bytes.\n*\n* - If the endianness is `1`, the byte order is little endian. If the endianness is `0`, the byte order is big endian.\n*\n* - Buffer length:\n*\n* ```text\n* 1 + 2 + 8 + (ndims*8) + (ndims*8) + 8 + 1 + 1 + 8 + (nsubmodes*1) = 33 + (ndims*16) + nsubmodes\n* ```\n*\n* For example, consider a three-dimensional ndarray with one subscript index mode (submode):\n*\n* ```text\n* 33 + (3*16) + 1 = 82 bytes\n* ```\n*\n* - Views:\n*\n* - endianness: `Int8Array( buf, 0, 1 )`\n* - dtype: `Int16Array( buf, 1, 1 )`\n* - ndims: `Int64Array( buf, 3, 1 )`\n* - shape: `Int64Array( buf, 11, ndims )`\n* - strides: `Int64Array( buf, 11+(ndims*8), ndims )`\n* - offset: `Int64Array( buf, 11+(ndims*16), 1 )`\n* - order: `Int8Array( buf, 19+(ndims*16), 1 )`\n* - mode: `Int8Array( buf, 20+(ndims*16), 1 )`\n* - nsubmodes: `Int64Array( buf, 21+(ndims*16), 1 )`\n* - submodes: `Int8Array( buf, 29+(ndims*16), nsubmodes )`\n* - flags: `Int32Array( buf, 29+(ndims*16)+nsubmodes, 1 )`\n*\n* @private\n* @param {ndarrayLike} x - input array\n* @param {string} x.dtype - array data type\n* @param {NonNegativeIntegerArray} x.shape - array shape\n* @param {IntegerArray} x.strides - array strides\n* @param {NonNegativeInteger} x.offset - array index offset\n* @param {string} x.order - array order\n* @param {string} [x.mode='throw'] - array index mode\n* @param {StringArray} [x.submode=[x.mode]] - array subscript index modes\n* @param {Object} [x.flags={}] - array flags\n* @returns {DataView} serialized meta data\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n*\n* var dv = serialize( x );\n* // returns \n*/\nfunction serialize( x ) {\n\tvar nbytes;\n\tvar bytes;\n\tvar flgs;\n\tvar len;\n\tvar dt;\n\tvar sh;\n\tvar st;\n\tvar sm;\n\tvar v;\n\tvar m;\n\tvar o;\n\tvar s;\n\tvar N;\n\tvar M;\n\tvar i;\n\n\t// Check for interface which does the work of serializing to a DataView for us...\n\tif ( x.__array_meta_dataview__ ) { // eslint-disable-line no-underscore-dangle\n\t\treturn x.__array_meta_dataview__(); // eslint-disable-line no-underscore-dangle\n\t}\n\t// Extract meta data known to be attached to ndarray-like objects:\n\tdt = getDType( x);\n\tsh = getShape( x, false );\n\tst = getStrides( x, false );\n\tN = sh.length; // ndims\n\n\t// Extract meta data which may be available on ndarray-like objects (e.g., stdlib ndarray instances):\n\tm = x.mode || 'throw';\n\tsm = x.submode || [ m ];\n\tM = sm.length;\n\n\t// Determine number of bytes per element according to the ndarray dtype:\n\tnbytes = bytesPerElement( dt );\n\n\t// Compute the amount of memory we need to allocate for storing meta data:\n\tlen = 33 + (N*16) + M;\n\n\t// Allocate raw memory and create a view for interfacing with the allocated memory:\n\tv = new DataView( new ArrayBuffer( len ) );\n\tbytes = new Uint8Array( v.buffer );\n\n\t// Endianness: (byteoffset: 0; bytelength: 1)\n\to = 0;\n\tv.setInt8( o, ( IS_LITTLE_ENDIAN ) ? 1 : 0 );\n\n\t// Data type: (byteoffset: 1; bytelength: 2)\n\to += 1;\n\tv.setInt16( o, DTYPES[ dt ], IS_LITTLE_ENDIAN );\n\n\t// Number of dimensions: (byteoffset: 3; bytelength: 8)\n\to += 2;\n\tfloat64ToInt64Bytes( N, bytes, 1, o );\n\n\t// Shape and strides: (byteoffset: 11 and 11+(ndims*8), respectively; bytelength: ndims*8 for both shape and strides, and, thus, ndims*16 total)\n\ts = N * 8; // stride length between a dimension (shape[i]) and its associated stride\n\to += 8;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tfloat64ToInt64Bytes( sh[i], bytes, 1, o );\n\t\tfloat64ToInt64Bytes( st[i]*nbytes, bytes, 1, o+s );\n\t\to += 8;\n\t}\n\t// Offset: (byteoffset: 11+(ndims*16); bytelength: 8)\n\to += s;\n\tfloat64ToInt64Bytes( getOffset( x )*nbytes, bytes, 1, o );\n\n\t// Order: (byteoffset: 19+(ndims*16); bytelength: 1)\n\to += 8;\n\tv.setInt8( o, ORDERS[ getOrder( x ) ] );\n\n\t// Index mode: (byteoffset: 20+(ndims*16); bytelength: 1)\n\to += 1;\n\tv.setInt8( o, MODES[ m ] );\n\n\t// Number of index submodes: (byteoffset: 21+(ndims*16); bytelength: 8)\n\to += 1;\n\tfloat64ToInt64Bytes( M, bytes, 1, o );\n\n\t// Submodes: (byteoffset: 29+(ndims*16); bytelength: nsubmodes*1)\n\to += 8;\n\tfor ( i = 0; i < M; i++ ) {\n\t\tv.setInt8( o, MODES[ sm[i] ] );\n\t\to += 1;\n\t}\n\t// Flags: (byteoffset: 29+(ndims*16)+nsubmodes; bytelength: 4)\n\tflgs = 0|0;\n\tif ( x.flags ) {\n\t\tflgs |= ( x.flags.READONLY ) ? 4 : 0; // 00000000 00000000 00000000 00000100\n\t}\n\tv.setInt32( o, flgs, IS_LITTLE_ENDIAN );\n\n\treturn v;\n}\n\n\n// EXPORTS //\n\nmodule.exports = serialize;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Serialize ndarray meta data.\n*\n* @module @stdlib/ndarray/base/serialize-meta-data\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var serialize = require( '@stdlib/ndarray/base/serialize-meta-data' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n*\n* var dv = serialize( x );\n* // returns \n*/\n\n// MODULES //\n\nvar hasBigIntSupport = require( '@stdlib/assert/has-bigint-support' );\nvar builtin = require( './main.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar main;\nif ( hasBigIntSupport() ) {\n\tmain = builtin;\n} else {\n\tmain = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Returns the number of singleton dimensions.\n*\n* ## Notes\n*\n* - A singleton dimension is a dimension whose size is equal to `1`.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @returns {NonNegativeInteger} number of singleton dimensions\n*\n* @example\n* var shape = [ 2, 1, 1 ];\n*\n* var n = singletonDimensions( shape );\n* // returns 2\n*\n* @example\n* var shape = [ 2, 2, 2 ];\n*\n* var n = singletonDimensions( shape );\n* // returns 0\n*/\nfunction singletonDimensions( shape ) {\n\tvar cnt;\n\tvar i;\n\n\tcnt = 0;\n\tfor ( i = 0; i < shape.length; i++ ) {\n\t\tif ( shape[ i ] === 1 ) {\n\t\t\tcnt += 1;\n\t\t}\n\t}\n\treturn cnt;\n}\n\n\n// EXPORTS //\n\nmodule.exports = singletonDimensions;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the number of singleton dimensions.\n*\n* @module @stdlib/ndarray/base/singleton-dimensions\n*\n* @example\n* var singletonDimensions = require( '@stdlib/ndarray/base/singleton-dimensions' );\n*\n* var shape = [ 2, 1, 1 ];\n*\n* var n = singletonDimensions( shape );\n* // returns 2\n*\n* @example\n* var singletonDimensions = require( '@stdlib/ndarray/base/singleton-dimensions' );\n*\n* var shape = [ 2, 2, 2 ];\n*\n* var n = singletonDimensions( shape );\n* // returns 0\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Resolves the index offset of the first element indexed by a normalized multi-slice.\n*\n* @private\n* @param {MultiSlice} slice - normalized multi-slice object\n* @param {IntegerArray} strides - array strides\n* @param {NonNegativeInteger} offset - array index offset\n* @returns {NonNegativeInteger} index offset of the first element indexed by a normalized multi-slice object\n*/\nfunction sliceStart( slice, strides, offset ) {\n\tvar data;\n\tvar idx;\n\tvar i;\n\n\tdata = slice.data;\n\tidx = offset;\n\tfor ( i = 0; i < data.length; i++ ) {\n\t\tidx += strides[ i ] * data[ i ].start;\n\t}\n\treturn idx;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sliceStart;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Resolves slice strides for a provided normalized multi-slice object.\n*\n* @private\n* @param {MultiSlice} slice - normalized multi-slice object\n* @param {IntegerArray} strides - array strides\n* @param {NonNegativeIntegerArray} rdims - indices of non-reduced dimensions\n* @returns {IntegerArray} slice strides\n*\n* @example\n* var Slice = require( '@stdlib/slice/ctor' );\n* var MultiSlice = require( '@stdlib/slice/multi' );\n*\n* var s = new MultiSlice( new Slice( 2, 3, 1 ), new Slice( 10, null, -2 ) );\n* // returns \n*\n* var strides = slice2strides( s, [ 8, 2 ], [ 1 ] );\n* // returns [ -4 ]\n*/\nfunction slice2strides( slice, strides, rdims ) {\n\tvar data;\n\tvar out;\n\tvar i;\n\tvar j;\n\n\tdata = slice.data;\n\tout = [];\n\tfor ( i = 0; i < rdims.length; i++ ) {\n\t\tj = rdims[ i ];\n\t\tout.push( strides[j] * data[j].step );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = slice2strides;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar buffer = require( './../../../base/buffer' );\nvar zeros = require( '@stdlib/array/base/zeros' );\n\n\n// MAIN //\n\n/**\n* Returns an empty n-dimensional ndarray.\n*\n* @private\n* @param {Function} ctor - ndarray constructor\n* @param {string} dtype - array data type\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {string} order - layout order\n* @param {boolean} readonly - boolean indicating whether a returned array should be read-only\n* @returns {ndarray} empty ndarray\n*/\nfunction empty( ctor, dtype, shape, order, readonly ) {\n\tvar strides;\n\tvar ndims;\n\n\tndims = shape.length;\n\tif ( ndims === 0 ) {\n\t\tstrides = [ 0 ];\n\t} else {\n\t\tstrides = zeros( ndims );\n\t}\n\treturn new ctor( dtype, buffer( dtype, 0 ), shape, strides, 0, order, {\n\t\t'readonly': readonly\n\t});\n}\n\n\n// EXPORTS //\n\nmodule.exports = empty;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar normalizeMultiSlice = require( '@stdlib/slice/base/normalize-multi-slice' );\nvar nonreducedDimensions = require( '@stdlib/slice/base/nonreduced-dimensions' );\nvar sliceShape = require( '@stdlib/slice/base/shape' );\nvar take = require( '@stdlib/array/base/take' );\nvar zeros = require( '@stdlib/array/base/zeros' );\nvar numel = require( './../../../base/numel' );\nvar getDType = require( './../../../base/dtype' );\nvar getShape = require( './../../../base/shape' );\nvar getStrides = require( './../../../base/strides' );\nvar getOffset = require( './../../../base/offset' );\nvar getOrder = require( './../../../base/order' );\nvar getData = require( './../../../base/data-buffer' );\nvar format = require( '@stdlib/string/format' );\nvar sliceStart = require( './slice_start.js' );\nvar slice2strides = require( './slice_strides.js' );\nvar empty = require( './empty.js' );\n\n\n// MAIN //\n\n/**\n* Returns a view of an input ndarray.\n*\n* @param {ndarray} x - input array\n* @param {MultiSlice} s - multi-slice object\n* @param {boolean} strict - boolean indicating whether to enforce strict bounds checking\n* @param {boolean} writable - boolean indicating whether a returned array should be writable\n* @throws {RangeError} number of slice dimensions must match the number of array dimensions\n* @throws {RangeError} slice exceeds array bounds\n* @returns {ndarray} ndarray view\n*\n* @example\n* var Slice = require( '@stdlib/slice/ctor' );\n* var MultiSlice = require( '@stdlib/slice/multi' );\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n*\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n* // returns \n*\n* var sh = x.shape;\n* // returns [ 3, 2 ]\n*\n* var arr = ndarray2array( x );\n* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]\n*\n* var s = new MultiSlice( new Slice( null, null, -2 ), new Slice( null, null, -1 ) );\n* // returns \n*\n* var y = slice( x, s, false, false );\n* // returns \n*\n* sh = y.shape;\n* // returns [ 2, 2 ]\n*\n* arr = ndarray2array( y );\n* // returns [ [ 6.0, 5.0 ], [ 2.0, 1.0 ] ]\n*/\nfunction slice( x, s, strict, writable ) {\n\tvar strides;\n\tvar offset;\n\tvar dtype;\n\tvar shape;\n\tvar order;\n\tvar sdims;\n\tvar ndims;\n\tvar ctor;\n\tvar sh;\n\tvar ns;\n\n\t// Retrieve array meta data:\n\tdtype = getDType( x );\n\tshape = getShape( x, true );\n\tstrides = getStrides( x, true );\n\toffset = getOffset( x );\n\torder = getOrder( x );\n\tndims = shape.length;\n\n\t// Ensure that the number of array dimensions matches the number of slices:\n\tif ( s.ndims !== ndims ) {\n\t\tthrow new RangeError( format( 'invalid argument. Number of slice dimensions does not match the number of array dimensions. Array shape: (%s). Slice dimensions: %u.', shape.join( ',' ), s.ndims ) );\n\t}\n\t// Resolve the output array constructor:\n\tctor = x.constructor;\n\n\t// If provided a zero-dimensional input array, return a zero-dimensional array view...\n\tif ( ndims === 0 ) {\n\t\treturn new ctor( dtype, getData( x ), shape, strides, offset, order, {\n\t\t\t'readonly': !writable\n\t\t});\n\t}\n\t// Resolve the indices of the non-reduced dimensions:\n\tsdims = nonreducedDimensions( s );\n\n\t// Normalize the slice object based on the array shape:\n\tns = normalizeMultiSlice( s, shape, true );\n\n\t// Check whether the slice exceeds array bounds...\n\tif ( ns.code ) {\n\t\tif ( strict ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Slice exceeds array bounds. Array shape: (%s).', shape.join( ',' ) ) );\n\t\t}\n\t\t// Normalize again, this time allowing for out-of-bounds indices:\n\t\tns = normalizeMultiSlice( s, shape, false );\n\n\t\t// Compute the slice shape:\n\t\tsh = sliceShape( ns );\n\n\t\t// If the non-reduced dimensions contain elements, this means that at least one reduced dimension exceeded array bounds; in which case, we generate a shape containing zeros:\n\t\tif ( numel( take( sh, sdims ) ) > 0 ) {\n\t\t\tsh = zeros( sh.length );\n\t\t}\n\t} else {\n\t\t// Compute the slice shape:\n\t\tsh = sliceShape( ns );\n\t}\n\t// If the slice does not contain any elements, return an empty array...\n\tif ( numel( sh ) === 0 ) {\n\t\treturn empty( ctor, dtype, take( sh, sdims ), order, !writable );\n\t}\n\t// Resolve the index offset of the first element indexed by the slice:\n\toffset = sliceStart( ns, strides, offset ); // TODO: @stdlib/ndarray/base/sind2bind\n\n\t// Remove reduced dimensions from the slice shape:\n\tsh = take( sh, sdims );\n\n\t// If all dimensions were reduced, return a zero-dimensional array...\n\tif ( sh.length === 0 ) {\n\t\treturn new ctor( dtype, getData( x ), [], [ 0 ], offset, order, {\n\t\t\t'readonly': !writable\n\t\t});\n\t}\n\t// Update strides according to slice steps:\n\tstrides = slice2strides( ns, strides, sdims ); // TODO: @stdlib/ndarray/base/slice2strides???\n\n\t// Return a slice view:\n\treturn new ctor( dtype, getData( x ), sh, strides, offset, order, {\n\t\t'readonly': !writable\n\t});\n}\n\n\n// EXPORTS //\n\nmodule.exports = slice;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a view of an input ndarray.\n*\n* @module @stdlib/ndarray/base/slice\n*\n* @example\n* var Slice = require( '@stdlib/slice/ctor' );\n* var MultiSlice = require( '@stdlib/slice/multi' );\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n* var slice = require( '@stdlib/ndarray/base/slice' );\n*\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n* // returns \n*\n* var sh = x.shape;\n* // returns [ 3, 2 ]\n*\n* var arr = ndarray2array( x );\n* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]\n*\n* var s = new MultiSlice( new Slice( null, null, -2 ), new Slice( null, null, -1 ) );\n* // returns \n*\n* var y = slice( x, s, false, false );\n* // returns \n*\n* sh = y.shape;\n* // returns [ 2, 2 ]\n*\n* arr = ndarray2array( y );\n* // returns [ [ 6.0, 5.0 ], [ 2.0, 1.0 ] ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Simultaneously sorts two arrays based on the sort order of the first array using insertion sort.\n*\n* ## Notes\n*\n* - The first array is sorted in increasing order according to absolute value.\n* - The algorithm has space complexity `O(1)` and worst case time complexity `O(N^2)`.\n* - The algorithm is efficient for small arrays (typically `N <= 20``) and is particularly efficient for sorting arrays which are already substantially sorted.\n* - The algorithm is **stable**, meaning that the algorithm does **not** change the order of array elements which are equal or equivalent.\n* - The input arrays are sorted in-place (i.e., the input arrays are mutated).\n*\n* @private\n* @param {Array} x - first array\n* @param {Array} y - second array\n* @returns {void}\n*\n* @example\n* var x = [ -4, -2, 3, 1 ];\n* var y = [ 0, 1, 2, 3 ];\n*\n* sort2ins( x, y );\n*\n* console.log( x );\n* // => [ 1, -2, 3, -4 ]\n*\n* console.log( y );\n* // => [ 3, 1, 2, 0 ]\n*/\nfunction sort2ins( x, y ) {\n\tvar avx;\n\tvar aux;\n\tvar ix;\n\tvar iy;\n\tvar jx;\n\tvar jy;\n\tvar vx;\n\tvar vy;\n\tvar ux;\n\tvar i;\n\n\tix = 1;\n\tiy = 1;\n\n\t// Sort in increasing order...\n\tfor ( i = 1; i < x.length; i++ ) {\n\t\tvx = x[ ix ];\n\t\tavx = ( vx < 0 ) ? -vx : vx;\n\n\t\tvy = y[ iy ];\n\n\t\tjx = ix - 1;\n\t\tjy = iy - 1;\n\n\t\t// Shift all larger values to the left of the current element to the right...\n\t\twhile ( jx >= 0 ) {\n\t\t\tux = x[ jx ];\n\t\t\taux = ( ux < 0 ) ? -ux : ux;\n\t\t\tif ( aux <= avx ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tx[ jx+1 ] = ux;\n\t\t\ty[ jy+1 ] = y[ jy ];\n\t\t\tjx -= 1;\n\t\t\tjy -= 1;\n\t\t}\n\t\tx[ jx+1 ] = vx;\n\t\ty[ jy+1 ] = vy;\n\t\tix += 1;\n\t\tiy += 1;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = sort2ins;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar zeroTo = require( '@stdlib/array/base/zero-to' );\nvar copy = require( '@stdlib/array/base/copy-indexed' );\nvar take = require( '@stdlib/array/base/take' );\nvar sort2ins = require( './sort2ins.js' );\n\n\n// MAIN //\n\n/**\n* Reorders ndarray dimensions and associated strides for loop interchange.\n*\n* ## Notes\n*\n* - The returned object has the following properties:\n*\n* - **sh**: dimensions sorted in loop order.\n* - **sx**: input ndarray strides sorted in loop order.\n* - **sy**: output ndarray strides sorted in loop order.\n*\n* @param {NonNegativeIntegerArray} sh - array dimensions\n* @param {IntegerArray} sx - input array stride lengths\n* @param {IntegerArray} sy - output array stride lengths\n* @returns {Object} loop interchange data\n*\n* @example\n* var sh = [ 2, 3, 4 ];\n*\n* var sx = [ 12, 4, 1 ]; // row-major\n* var sy = [ 1, -2, 6 ]; // column-major\n*\n* var o = loopOrder( sh, sx, sy );\n* // returns {...}\n*\n* var ssh = o.sh;\n* // returns [ 4, 3, 2 ]\n*\n* var ssx = o.sx;\n* // returns [ 1, 4, 12 ]\n*\n* var ssy = o.sy;\n* // returns [ 6, -2, 1 ]\n*/\nfunction loopOrder( sh, sx, sy ) {\n\tvar idx;\n\n\t// Initialize a loop interchange index array for generating a loop order permutation:\n\tidx = zeroTo( sh.length );\n\n\t// Sort the input array strides in increasing order (of magnitude):\n\tsx = copy( sx );\n\tsort2ins( sx, idx );\n\n\t// Permute the shape and output array strides based on the sorted input array strides:\n\tsh = take( sh, idx );\n\tsy = take( sy, idx );\n\n\treturn {\n\t\t'sh': sh,\n\t\t'sx': sx,\n\t\t'sy': sy\n\t};\n}\n\n\n// EXPORTS //\n\nmodule.exports = loopOrder;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Reorder ndarray dimensions and associated strides for loop interchange.\n*\n* @module @stdlib/ndarray/base/unary-loop-interchange-order\n*\n* @example\n* var unaryLoopOrder = require( '@stdlib/ndarray/base/unary-loop-interchange-order' );\n*\n* var sh = [ 2, 3, 4 ];\n*\n* var sx = [ 12, 4, 1 ]; // row-major\n* var sy = [ 1, -2, 6 ]; // column-major\n*\n* var o = unaryLoopOrder( sh, sx, sy );\n* // returns {...}\n*\n* var ssh = o.sh;\n* // returns [ 4, 3, 2 ]\n*\n* var ssx = o.sx;\n* // returns [ 1, 4, 12 ]\n*\n* var ssy = o.sy;\n* // returns [ 6, -2, 1 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar defaults = {\n\t// Define a default block size (in bytes):\n\t'BLOCK_SIZE_IN_BYTES': 64|0, // 64b is a common cache line size. How applicable the common cache line size is here is debatable, given that, depending on the associated stride(s), the innermost loop may not iterate over adjacent elements. The primary goal is to have a block size in which all data within a block can always fit in (L1) cache, regardless of cache size (i.e., cache-oblivious). For reference, a common L1 cache size is 32kB per core. For best performance, block sizes should be tuned based on system hardware; however, such tuning is not readily available to us here. Without obvious better alternatives, 64b has some theoretical (and practical) underpinning, and it should be good enough for most inputs, especially for ndarrays with near contiguity.\n\n\t// Define a default block size (in elements):\n\t'BLOCK_SIZE_IN_ELEMENTS': 8|0 // 64 bytes / 8 bytes per element (i.e., default element size is same as a double)\n};\n\n\n// EXPORTS //\n\nmodule.exports = defaults;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar bytesPerElement = require( './../../../base/bytes-per-element' );\nvar defaults = require( './defaults.js' );\n\n\n// MAIN //\n\n/**\n* Returns a loop block size for multi-dimensional array tiled loops.\n*\n* @param {string} dtypeX - input array data type\n* @param {string} dtypeY - output array data type\n* @returns {integer} block size (in units of elements)\n*\n* @example\n* var bsize = unaryBlockSize( 'float64', 'float64' );\n* // returns \n*/\nfunction unaryBlockSize( dtypeX, dtypeY ) {\n\tvar nbx;\n\tvar nby;\n\n\tnbx = bytesPerElement( dtypeX );\n\tnby = bytesPerElement( dtypeY );\n\tif ( nbx === null || nby === null ) { // e.g., \"generic\" arrays\n\t\treturn defaults.BLOCK_SIZE_IN_ELEMENTS;\n\t}\n\tif ( nbx > nby ) {\n\t\treturn ( defaults.BLOCK_SIZE_IN_BYTES/nbx )|0; // asm type annotation\n\t}\n\treturn ( defaults.BLOCK_SIZE_IN_BYTES/nby )|0; // asm type annotation\n}\n\n\n// EXPORTS //\n\nmodule.exports = unaryBlockSize;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Resolve a loop block size for multi-dimensional array tiled loops.\n*\n* @module @stdlib/ndarray/base/unary-tiling-block-size\n*\n* @example\n* var unaryBlockSize = require( '@stdlib/ndarray/base/unary-tiling-block-size' );\n*\n* var bsize = unaryBlockSize( 'float64', 'float64' );\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a two-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary2d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary2d( x, y, fcn ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dy0;\n\tvar dy1;\n\tvar ox1;\n\tvar oy1;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar j0;\n\tvar j1;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\tif ( j1 < bsize ) {\n\t\t\ts1 = j1;\n\t\t\tj1 = 0;\n\t\t} else {\n\t\t\ts1 = bsize;\n\t\t\tj1 -= bsize;\n\t\t}\n\t\tox1 = ox + ( j1*sx[1] );\n\t\toy1 = oy + ( j1*sy[1] );\n\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\tif ( j0 < bsize ) {\n\t\t\t\ts0 = j0;\n\t\t\t\tj0 = 0;\n\t\t\t} else {\n\t\t\t\ts0 = bsize;\n\t\t\t\tj0 -= bsize;\n\t\t\t}\n\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t// Compute loop offset increments...\n\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t// Iterate over the ndarray dimensions...\n\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) );\n\t\t\t\t\tix += dx0;\n\t\t\t\t\tiy += dy0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t\tiy += dy1;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary2d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a three-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 1 ];\n* var sy = [ 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary3d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary3d( x, y, fcn ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar ox1;\n\tvar ox2;\n\tvar oy1;\n\tvar oy2;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\tif ( j2 < bsize ) {\n\t\t\ts2 = j2;\n\t\t\tj2 = 0;\n\t\t} else {\n\t\t\ts2 = bsize;\n\t\t\tj2 -= bsize;\n\t\t}\n\t\tox2 = ox + ( j2*sx[2] );\n\t\toy2 = oy + ( j2*sy[2] );\n\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\tif ( j1 < bsize ) {\n\t\t\t\ts1 = j1;\n\t\t\t\tj1 = 0;\n\t\t\t} else {\n\t\t\t\ts1 = bsize;\n\t\t\t\tj1 -= bsize;\n\t\t\t}\n\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\ts0 = j0;\n\t\t\t\t\tj0 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts0 = bsize;\n\t\t\t\t\tj0 -= bsize;\n\t\t\t\t}\n\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t// Compute loop offset increments...\n\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) );\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t\tiy += dy2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary3d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a four-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary4d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary4d( x, y, fcn ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\tif ( j3 < bsize ) {\n\t\t\ts3 = j3;\n\t\t\tj3 = 0;\n\t\t} else {\n\t\t\ts3 = bsize;\n\t\t\tj3 -= bsize;\n\t\t}\n\t\tox3 = ox + ( j3*sx[3] );\n\t\toy3 = oy + ( j3*sy[3] );\n\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\tif ( j2 < bsize ) {\n\t\t\t\ts2 = j2;\n\t\t\t\tj2 = 0;\n\t\t\t} else {\n\t\t\t\ts2 = bsize;\n\t\t\t\tj2 -= bsize;\n\t\t\t}\n\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\ts1 = j1;\n\t\t\t\t\tj1 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts1 = bsize;\n\t\t\t\t\tj1 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) );\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary4d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a five-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary5d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary5d( x, y, fcn ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\tif ( j4 < bsize ) {\n\t\t\ts4 = j4;\n\t\t\tj4 = 0;\n\t\t} else {\n\t\t\ts4 = bsize;\n\t\t\tj4 -= bsize;\n\t\t}\n\t\tox4 = ox + ( j4*sx[4] );\n\t\toy4 = oy + ( j4*sy[4] );\n\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\tif ( j3 < bsize ) {\n\t\t\t\ts3 = j3;\n\t\t\t\tj3 = 0;\n\t\t\t} else {\n\t\t\t\ts3 = bsize;\n\t\t\t\tj3 -= bsize;\n\t\t\t}\n\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\ts2 = j2;\n\t\t\t\t\tj2 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts2 = bsize;\n\t\t\t\t\tj2 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) ); // eslint-disable-line max-len\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary5d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a six-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary6d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary6d( x, y, fcn ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\tif ( j5 < bsize ) {\n\t\t\ts5 = j5;\n\t\t\tj5 = 0;\n\t\t} else {\n\t\t\ts5 = bsize;\n\t\t\tj5 -= bsize;\n\t\t}\n\t\tox5 = ox + ( j5*sx[5] );\n\t\toy5 = oy + ( j5*sy[5] );\n\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\tif ( j4 < bsize ) {\n\t\t\t\ts4 = j4;\n\t\t\t\tj4 = 0;\n\t\t\t} else {\n\t\t\t\ts4 = bsize;\n\t\t\t\tj4 -= bsize;\n\t\t\t}\n\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\ts3 = j3;\n\t\t\t\t\tj3 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts3 = bsize;\n\t\t\t\t\tj3 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary6d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a seven-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary7d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary7d( x, y, fcn ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\tif ( j6 < bsize ) {\n\t\t\ts6 = j6;\n\t\t\tj6 = 0;\n\t\t} else {\n\t\t\ts6 = bsize;\n\t\t\tj6 -= bsize;\n\t\t}\n\t\tox6 = ox + ( j6*sx[6] );\n\t\toy6 = oy + ( j6*sy[6] );\n\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\tif ( j5 < bsize ) {\n\t\t\t\ts5 = j5;\n\t\t\t\tj5 = 0;\n\t\t\t} else {\n\t\t\t\ts5 = bsize;\n\t\t\t\tj5 -= bsize;\n\t\t\t}\n\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\tdy6 = sy[6] - ( s5*sy[5] );\n\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\ts4 = j4;\n\t\t\t\t\tj4 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts4 = bsize;\n\t\t\t\t\tj4 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary7d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in an eight-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary8d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary8d( x, y, fcn ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\tif ( j7 < bsize ) {\n\t\t\ts7 = j7;\n\t\t\tj7 = 0;\n\t\t} else {\n\t\t\ts7 = bsize;\n\t\t\tj7 -= bsize;\n\t\t}\n\t\tox7 = ox + ( j7*sx[7] );\n\t\toy7 = oy + ( j7*sy[7] );\n\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\tif ( j6 < bsize ) {\n\t\t\t\ts6 = j6;\n\t\t\t\tj6 = 0;\n\t\t\t} else {\n\t\t\t\ts6 = bsize;\n\t\t\t\tj6 -= bsize;\n\t\t\t}\n\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\tdy7 = sy[7] - ( s6*sy[6] );\n\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\ts5 = j5;\n\t\t\t\t\tj5 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts5 = bsize;\n\t\t\t\t\tj5 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\tdy6 = sy[6] - ( s5*sy[5] );\n\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\tiy += dy7;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary8d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a nine-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary9d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary9d( x, y, fcn ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar oy8;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\tif ( j8 < bsize ) {\n\t\t\ts8 = j8;\n\t\t\tj8 = 0;\n\t\t} else {\n\t\t\ts8 = bsize;\n\t\t\tj8 -= bsize;\n\t\t}\n\t\tox8 = ox + ( j8*sx[8] );\n\t\toy8 = oy + ( j8*sy[8] );\n\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\tif ( j7 < bsize ) {\n\t\t\t\ts7 = j7;\n\t\t\t\tj7 = 0;\n\t\t\t} else {\n\t\t\t\ts7 = bsize;\n\t\t\t\tj7 -= bsize;\n\t\t\t}\n\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\tdy8 = sy[8] - ( s7*sy[7] );\n\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\toy7 = oy8 + ( j7*sy[7] );\n\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\ts6 = j6;\n\t\t\t\t\tj6 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts6 = bsize;\n\t\t\t\t\tj6 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\tdy7 = sy[7] - ( s6*sy[6] );\n\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\tdy6 = sy[6] - ( s5*sy[5] );\n\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t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+= dx8;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy8;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary9d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a ten-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary10d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary10d( x, y, fcn ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar dy9;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar ox9;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar oy8;\n\tvar oy9;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar s9;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar j9;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\tfor ( j9 = sh[9]; j9 > 0; ) {\n\t\tif ( j9 < bsize ) {\n\t\t\ts9 = j9;\n\t\t\tj9 = 0;\n\t\t} else {\n\t\t\ts9 = bsize;\n\t\t\tj9 -= bsize;\n\t\t}\n\t\tox9 = ox + ( j9*sx[9] );\n\t\toy9 = oy + ( j9*sy[9] );\n\t\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\t\tif ( j8 < bsize ) {\n\t\t\t\ts8 = j8;\n\t\t\t\tj8 = 0;\n\t\t\t} else {\n\t\t\t\ts8 = bsize;\n\t\t\t\tj8 -= bsize;\n\t\t\t}\n\t\t\tdx9 = sx[9] - ( s8*sx[8] );\n\t\t\tdy9 = sy[9] - ( s8*sy[8] );\n\t\t\tox8 = ox9 + ( j8*sx[8] );\n\t\t\toy8 = oy9 + ( j8*sy[8] );\n\t\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\t\tif ( j7 < bsize ) {\n\t\t\t\t\ts7 = j7;\n\t\t\t\t\tj7 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts7 = bsize;\n\t\t\t\t\tj7 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\t\tdy8 = sy[8] - ( s7*sy[7] );\n\t\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\t\toy7 = oy8 + ( j7*sy[7] );\n\t\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\t\ts6 = j6;\n\t\t\t\t\t\tj6 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts6 = bsize;\n\t\t\t\t\t\tj6 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\t\tdy7 = sy[7] - ( s6*sy[6] );\n\t\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\t\tdy6 = sy[6] - ( s5*sy[5] );\n\t\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\t\tfor ( i9 = 0; i9 < s9; i9++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tf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\t\t\t\t\t\t\t\t\t\tiy += dy7;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx8;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy8;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx9;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy9;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary10d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a two-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Float64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary2d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0 ]\n*/\nfunction blockedunary2d( x, y, fcn ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dy0;\n\tvar dy1;\n\tvar ox1;\n\tvar oy1;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar j0;\n\tvar j1;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\tif ( j1 < bsize ) {\n\t\t\ts1 = j1;\n\t\t\tj1 = 0;\n\t\t} else {\n\t\t\ts1 = bsize;\n\t\t\tj1 -= bsize;\n\t\t}\n\t\tox1 = ox + ( j1*sx[1] );\n\t\toy1 = oy + ( j1*sy[1] );\n\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\tif ( j0 < bsize ) {\n\t\t\t\ts0 = j0;\n\t\t\t\tj0 = 0;\n\t\t\t} else {\n\t\t\t\ts0 = bsize;\n\t\t\t\tj0 -= bsize;\n\t\t\t}\n\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t// Compute loop offset increments...\n\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t// Iterate over the ndarray dimensions...\n\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\t\t\tix += dx0;\n\t\t\t\t\tiy += dy0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t\tiy += dy1;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary2d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a three-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n* var sy = [ 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary3d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction blockedunary3d( x, y, fcn ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar ox1;\n\tvar ox2;\n\tvar oy1;\n\tvar oy2;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\tif ( j2 < bsize ) {\n\t\t\ts2 = j2;\n\t\t\tj2 = 0;\n\t\t} else {\n\t\t\ts2 = bsize;\n\t\t\tj2 -= bsize;\n\t\t}\n\t\tox2 = ox + ( j2*sx[2] );\n\t\toy2 = oy + ( j2*sy[2] );\n\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\tif ( j1 < bsize ) {\n\t\t\t\ts1 = j1;\n\t\t\t\tj1 = 0;\n\t\t\t} else {\n\t\t\t\ts1 = bsize;\n\t\t\t\tj1 -= bsize;\n\t\t\t}\n\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\ts0 = j0;\n\t\t\t\t\tj0 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts0 = bsize;\n\t\t\t\t\tj0 -= bsize;\n\t\t\t\t}\n\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t// Compute loop offset increments...\n\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t\tiy += dy2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary3d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a four-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 4, 1 ];\n* var sy = [ 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary4d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction blockedunary4d( x, y, fcn ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\tif ( j3 < bsize ) {\n\t\t\ts3 = j3;\n\t\t\tj3 = 0;\n\t\t} else {\n\t\t\ts3 = bsize;\n\t\t\tj3 -= bsize;\n\t\t}\n\t\tox3 = ox + ( j3*sx[3] );\n\t\toy3 = oy + ( j3*sy[3] );\n\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\tif ( j2 < bsize ) {\n\t\t\t\ts2 = j2;\n\t\t\t\tj2 = 0;\n\t\t\t} else {\n\t\t\t\ts2 = bsize;\n\t\t\t\tj2 -= bsize;\n\t\t\t}\n\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\ts1 = j1;\n\t\t\t\t\tj1 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts1 = bsize;\n\t\t\t\t\tj1 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary4d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a five-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary5d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction blockedunary5d( x, y, fcn ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\tif ( j4 < bsize ) {\n\t\t\ts4 = j4;\n\t\t\tj4 = 0;\n\t\t} else {\n\t\t\ts4 = bsize;\n\t\t\tj4 -= bsize;\n\t\t}\n\t\tox4 = ox + ( j4*sx[4] );\n\t\toy4 = oy + ( j4*sy[4] );\n\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\tif ( j3 < bsize ) {\n\t\t\t\ts3 = j3;\n\t\t\t\tj3 = 0;\n\t\t\t} else {\n\t\t\t\ts3 = bsize;\n\t\t\t\tj3 -= bsize;\n\t\t\t}\n\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\ts2 = j2;\n\t\t\t\t\tj2 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts2 = bsize;\n\t\t\t\t\tj2 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary5d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a six-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary6d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction blockedunary6d( x, y, fcn ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\tif ( j5 < bsize ) {\n\t\t\ts5 = j5;\n\t\t\tj5 = 0;\n\t\t} else {\n\t\t\ts5 = bsize;\n\t\t\tj5 -= bsize;\n\t\t}\n\t\tox5 = ox + ( j5*sx[5] );\n\t\toy5 = oy + ( j5*sy[5] );\n\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\tif ( j4 < bsize ) {\n\t\t\t\ts4 = j4;\n\t\t\t\tj4 = 0;\n\t\t\t} else {\n\t\t\t\ts4 = bsize;\n\t\t\t\tj4 -= bsize;\n\t\t\t}\n\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\ts3 = j3;\n\t\t\t\t\tj3 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts3 = bsize;\n\t\t\t\t\tj3 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary6d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a seven-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary7d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction blockedunary7d( x, y, fcn ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\tif ( j6 < bsize ) {\n\t\t\ts6 = j6;\n\t\t\tj6 = 0;\n\t\t} else {\n\t\t\ts6 = bsize;\n\t\t\tj6 -= bsize;\n\t\t}\n\t\tox6 = ox + ( j6*sx[6] );\n\t\toy6 = oy + ( j6*sy[6] );\n\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\tif ( j5 < bsize ) {\n\t\t\t\ts5 = j5;\n\t\t\t\tj5 = 0;\n\t\t\t} else {\n\t\t\t\ts5 = bsize;\n\t\t\t\tj5 -= bsize;\n\t\t\t}\n\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\tdy6 = sy[6] - ( s5*sy[5] );\n\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\ts4 = j4;\n\t\t\t\t\tj4 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts4 = bsize;\n\t\t\t\t\tj4 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary7d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in an eight-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary8d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction blockedunary8d( x, y, fcn ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\tif ( j7 < bsize ) {\n\t\t\ts7 = j7;\n\t\t\tj7 = 0;\n\t\t} else {\n\t\t\ts7 = bsize;\n\t\t\tj7 -= bsize;\n\t\t}\n\t\tox7 = ox + ( j7*sx[7] );\n\t\toy7 = oy + ( j7*sy[7] );\n\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\tif ( j6 < bsize ) {\n\t\t\t\ts6 = j6;\n\t\t\t\tj6 = 0;\n\t\t\t} else {\n\t\t\t\ts6 = bsize;\n\t\t\t\tj6 -= bsize;\n\t\t\t}\n\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\tdy7 = sy[7] - ( s6*sy[6] );\n\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\ts5 = j5;\n\t\t\t\t\tj5 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts5 = bsize;\n\t\t\t\t\tj5 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\tdy6 = sy[6] - ( s5*sy[5] );\n\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\tiy += dy7;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary8d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a nine-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary9d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction blockedunary9d( x, y, fcn ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar oy8;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\tif ( j8 < bsize ) {\n\t\t\ts8 = j8;\n\t\t\tj8 = 0;\n\t\t} else {\n\t\t\ts8 = bsize;\n\t\t\tj8 -= bsize;\n\t\t}\n\t\tox8 = ox + ( j8*sx[8] );\n\t\toy8 = oy + ( j8*sy[8] );\n\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\tif ( j7 < bsize ) {\n\t\t\t\ts7 = j7;\n\t\t\t\tj7 = 0;\n\t\t\t} else {\n\t\t\t\ts7 = bsize;\n\t\t\t\tj7 -= bsize;\n\t\t\t}\n\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\tdy8 = sy[8] - ( s7*sy[7] );\n\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\toy7 = oy8 + ( j7*sy[7] );\n\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\ts6 = j6;\n\t\t\t\t\tj6 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts6 = bsize;\n\t\t\t\t\tj6 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\tdy7 = sy[7] - ( s6*sy[6] );\n\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\tdy6 = sy[6] - ( s5*sy[5] );\n\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy7;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx8;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy8;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary9d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a ten-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary10d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction blockedunary10d( x, y, fcn ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar dy9;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar ox9;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar oy8;\n\tvar oy9;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar s9;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar j9;\n\tvar o;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\tfor ( j9 = sh[9]; j9 > 0; ) {\n\t\tif ( j9 < bsize ) {\n\t\t\ts9 = j9;\n\t\t\tj9 = 0;\n\t\t} else {\n\t\t\ts9 = bsize;\n\t\t\tj9 -= bsize;\n\t\t}\n\t\tox9 = ox + ( j9*sx[9] );\n\t\toy9 = oy + ( j9*sy[9] );\n\t\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\t\tif ( j8 < bsize ) {\n\t\t\t\ts8 = j8;\n\t\t\t\tj8 = 0;\n\t\t\t} else {\n\t\t\t\ts8 = bsize;\n\t\t\t\tj8 -= bsize;\n\t\t\t}\n\t\t\tdx9 = sx[9] - ( s8*sx[8] );\n\t\t\tdy9 = sy[9] - ( s8*sy[8] );\n\t\t\tox8 = ox9 + ( j8*sx[8] );\n\t\t\toy8 = oy9 + ( j8*sy[8] );\n\t\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\t\tif ( j7 < bsize ) {\n\t\t\t\t\ts7 = j7;\n\t\t\t\t\tj7 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts7 = bsize;\n\t\t\t\t\tj7 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\t\tdy8 = sy[8] - ( s7*sy[7] );\n\t\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\t\toy7 = oy8 + ( j7*sy[7] );\n\t\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\t\ts6 = j6;\n\t\t\t\t\t\tj6 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts6 = bsize;\n\t\t\t\t\t\tj6 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\t\tdy7 = sy[7] - ( s6*sy[6] );\n\t\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\t\tdy6 = sy[6] - ( s5*sy[5] );\n\t\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\t\tfor ( i9 = 0; i9 < s9; i9++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++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x4;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy7;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx8;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy8;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx9;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy9;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary10d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a zero-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0 ] );\n* var ybuf = new Complex64Array( 2 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [];\n*\n* // Define the array strides:\n* var sx = [ 0 ];\n* var sy = [ 0 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary0d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 30.0\n*\n* var im = imagf( v );\n* // returns 40.0\n*/\nfunction unary0d( x, y, fcn ) {\n\ty.accessors[ 1 ]( y.data, y.offset, fcn( x.accessors[ 0 ]( x.data, x.offset ) ) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary0d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a one-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 4 ];\n*\n* // Define the array strides:\n* var sx = [ 1 ];\n* var sy = [ 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary1d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary1d( x, y, fcn ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dy0;\n\tvar S0;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables: dimensions and loop offset (pointer) increments...\n\tS0 = x.shape[ 0 ];\n\tdx0 = x.strides[ 0 ];\n\tdy0 = y.strides[ 0 ];\n\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) );\n\t\tix += dx0;\n\t\tiy += dy0;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary1d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a two-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary2d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary2d( x, y, fcn ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dy0;\n\tvar dy1;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 1 ];\n\t\tS1 = sh[ 0 ];\n\t\tdx0 = sx[ 1 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 0 ] - ( S0*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 1 ];\n\t\tdy1 = sy[ 0 ] - ( S0*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) );\n\t\t\tix += dx0;\n\t\t\tiy += dy0;\n\t\t}\n\t\tix += dx1;\n\t\tiy += dy1;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary2d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a three-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 1 ];\n* var sy = [ 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary3d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary3d( x, y, fcn ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 2 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 0 ];\n\t\tdx0 = sx[ 2 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[2] );\n\t\tdx2 = sx[ 0 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 2 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[2] );\n\t\tdy2 = sy[ 0 ] - ( S1*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) );\n\t\t\t\tix += dx0;\n\t\t\t\tiy += dy0;\n\t\t\t}\n\t\t\tix += dx1;\n\t\t\tiy += dy1;\n\t\t}\n\t\tix += dx2;\n\t\tiy += dy2;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary3d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a four-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary4d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary4d( x, y, fcn ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 3 ];\n\t\tS1 = sh[ 2 ];\n\t\tS2 = sh[ 1 ];\n\t\tS3 = sh[ 0 ];\n\t\tdx0 = sx[ 3 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 2 ] - ( S0*sx[3] );\n\t\tdx2 = sx[ 1 ] - ( S1*sx[2] );\n\t\tdx3 = sx[ 0 ] - ( S2*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 3 ];\n\t\tdy1 = sy[ 2 ] - ( S0*sy[3] );\n\t\tdy2 = sy[ 1 ] - ( S1*sy[2] );\n\t\tdy3 = sy[ 0 ] - ( S2*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) );\n\t\t\t\t\tix += dx0;\n\t\t\t\t\tiy += dy0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t\tiy += dy1;\n\t\t\t}\n\t\t\tix += dx2;\n\t\t\tiy += dy2;\n\t\t}\n\t\tix += dx3;\n\t\tiy += dy3;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary4d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a five-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary5d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary5d( x, y, fcn ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 4 ];\n\t\tS1 = sh[ 3 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 1 ];\n\t\tS4 = sh[ 0 ];\n\t\tdx0 = sx[ 4 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 3 ] - ( S0*sx[4] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[3] );\n\t\tdx3 = sx[ 1 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 0 ] - ( S3*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 4 ];\n\t\tdy1 = sy[ 3 ] - ( S0*sy[4] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[3] );\n\t\tdy3 = sy[ 1 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 0 ] - ( S3*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) );\n\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx1;\n\t\t\t\t\tiy += dy1;\n\t\t\t\t}\n\t\t\t\tix += dx2;\n\t\t\t\tiy += dy2;\n\t\t\t}\n\t\t\tix += dx3;\n\t\t\tiy += dy3;\n\t\t}\n\t\tix += dx4;\n\t\tiy += dy4;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary5d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a six-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary6d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary6d( x, y, fcn ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 5 ];\n\t\tS1 = sh[ 4 ];\n\t\tS2 = sh[ 3 ];\n\t\tS3 = sh[ 2 ];\n\t\tS4 = sh[ 1 ];\n\t\tS5 = sh[ 0 ];\n\t\tdx0 = sx[ 5 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 4 ] - ( S0*sx[5] );\n\t\tdx2 = sx[ 3 ] - ( S1*sx[4] );\n\t\tdx3 = sx[ 2 ] - ( S2*sx[3] );\n\t\tdx4 = sx[ 1 ] - ( S3*sx[2] );\n\t\tdx5 = sx[ 0 ] - ( S4*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 5 ];\n\t\tdy1 = sy[ 4 ] - ( S0*sy[5] );\n\t\tdy2 = sy[ 3 ] - ( S1*sy[4] );\n\t\tdy3 = sy[ 2 ] - ( S2*sy[3] );\n\t\tdy4 = sy[ 1 ] - ( S3*sy[2] );\n\t\tdy5 = sy[ 0 ] - ( S4*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) );\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t\tiy += dy2;\n\t\t\t\t}\n\t\t\t\tix += dx3;\n\t\t\t\tiy += dy3;\n\t\t\t}\n\t\t\tix += dx4;\n\t\t\tiy += dy4;\n\t\t}\n\t\tix += dx5;\n\t\tiy += dy5;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary6d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a seven-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary7d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary7d( x, y, fcn ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 6 ];\n\t\tS1 = sh[ 5 ];\n\t\tS2 = sh[ 4 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 2 ];\n\t\tS5 = sh[ 1 ];\n\t\tS6 = sh[ 0 ];\n\t\tdx0 = sx[ 6 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 5 ] - ( S0*sx[6] );\n\t\tdx2 = sx[ 4 ] - ( S1*sx[5] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[4] );\n\t\tdx4 = sx[ 2 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 1 ] - ( S4*sx[2] );\n\t\tdx6 = sx[ 0 ] - ( S5*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 6 ];\n\t\tdy1 = sy[ 5 ] - ( S0*sy[6] );\n\t\tdy2 = sy[ 4 ] - ( S1*sy[5] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[4] );\n\t\tdy4 = sy[ 2 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 1 ] - ( S4*sy[2] );\n\t\tdy6 = sy[ 0 ] - ( S5*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) );\n\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx3;\n\t\t\t\t\tiy += dy3;\n\t\t\t\t}\n\t\t\t\tix += dx4;\n\t\t\t\tiy += dy4;\n\t\t\t}\n\t\t\tix += dx5;\n\t\t\tiy += dy5;\n\t\t}\n\t\tix += dx6;\n\t\tiy += dy6;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary7d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in an eight-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary8d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary8d( x, y, fcn ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 7 ];\n\t\tS1 = sh[ 6 ];\n\t\tS2 = sh[ 5 ];\n\t\tS3 = sh[ 4 ];\n\t\tS4 = sh[ 3 ];\n\t\tS5 = sh[ 2 ];\n\t\tS6 = sh[ 1 ];\n\t\tS7 = sh[ 0 ];\n\t\tdx0 = sx[ 7 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 6 ] - ( S0*sx[7] );\n\t\tdx2 = sx[ 5 ] - ( S1*sx[6] );\n\t\tdx3 = sx[ 4 ] - ( S2*sx[5] );\n\t\tdx4 = sx[ 3 ] - ( S3*sx[4] );\n\t\tdx5 = sx[ 2 ] - ( S4*sx[3] );\n\t\tdx6 = sx[ 1 ] - ( S5*sx[2] );\n\t\tdx7 = sx[ 0 ] - ( S6*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 7 ];\n\t\tdy1 = sy[ 6 ] - ( S0*sy[7] );\n\t\tdy2 = sy[ 5 ] - ( S1*sy[6] );\n\t\tdy3 = sy[ 4 ] - ( S2*sy[5] );\n\t\tdy4 = sy[ 3 ] - ( S3*sy[4] );\n\t\tdy5 = sy[ 2 ] - ( S4*sy[3] );\n\t\tdy6 = sy[ 1 ] - ( S5*sy[2] );\n\t\tdy7 = sy[ 0 ] - ( S6*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) );\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx4;\n\t\t\t\t\tiy += dy4;\n\t\t\t\t}\n\t\t\t\tix += dx5;\n\t\t\t\tiy += dy5;\n\t\t\t}\n\t\t\tix += dx6;\n\t\t\tiy += dy6;\n\t\t}\n\t\tix += dx7;\n\t\tiy += dy7;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary8d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a nine-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary9d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary9d( x, y, fcn ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 8 ];\n\t\tS1 = sh[ 7 ];\n\t\tS2 = sh[ 6 ];\n\t\tS3 = sh[ 5 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 3 ];\n\t\tS6 = sh[ 2 ];\n\t\tS7 = sh[ 1 ];\n\t\tS8 = sh[ 0 ];\n\t\tdx0 = sx[ 8 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 7 ] - ( S0*sx[8] );\n\t\tdx2 = sx[ 6 ] - ( S1*sx[7] );\n\t\tdx3 = sx[ 5 ] - ( S2*sx[6] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[5] );\n\t\tdx5 = sx[ 3 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 2 ] - ( S5*sx[3] );\n\t\tdx7 = sx[ 1 ] - ( S6*sx[2] );\n\t\tdx8 = sx[ 0 ] - ( S7*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 8 ];\n\t\tdy1 = sy[ 7 ] - ( S0*sy[8] );\n\t\tdy2 = sy[ 6 ] - ( S1*sy[7] );\n\t\tdy3 = sy[ 5 ] - ( S2*sy[6] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[5] );\n\t\tdy5 = sy[ 3 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 2 ] - ( S5*sy[3] );\n\t\tdy7 = sy[ 1 ] - ( S6*sy[2] );\n\t\tdy8 = sy[ 0 ] - ( S7*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t\tdy8 = sy[ 8 ] - ( S7*sy[7] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) );\n\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx5;\n\t\t\t\t\tiy += dy5;\n\t\t\t\t}\n\t\t\t\tix += dx6;\n\t\t\t\tiy += dy6;\n\t\t\t}\n\t\t\tix += dx7;\n\t\t\tiy += dy7;\n\t\t}\n\t\tix += dx8;\n\t\tiy += dy8;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary9d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a ten-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary10d( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary10d( x, y, fcn ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar dy9;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar S9;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 9 ];\n\t\tS1 = sh[ 8 ];\n\t\tS2 = sh[ 7 ];\n\t\tS3 = sh[ 6 ];\n\t\tS4 = sh[ 5 ];\n\t\tS5 = sh[ 4 ];\n\t\tS6 = sh[ 3 ];\n\t\tS7 = sh[ 2 ];\n\t\tS8 = sh[ 1 ];\n\t\tS9 = sh[ 0 ];\n\t\tdx0 = sx[ 9 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 8 ] - ( S0*sx[9] );\n\t\tdx2 = sx[ 7 ] - ( S1*sx[8] );\n\t\tdx3 = sx[ 6 ] - ( S2*sx[7] );\n\t\tdx4 = sx[ 5 ] - ( S3*sx[6] );\n\t\tdx5 = sx[ 4 ] - ( S4*sx[5] );\n\t\tdx6 = sx[ 3 ] - ( S5*sx[4] );\n\t\tdx7 = sx[ 2 ] - ( S6*sx[3] );\n\t\tdx8 = sx[ 1 ] - ( S7*sx[2] );\n\t\tdx9 = sx[ 0 ] - ( S8*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 9 ];\n\t\tdy1 = sy[ 8 ] - ( S0*sy[9] );\n\t\tdy2 = sy[ 7 ] - ( S1*sy[8] );\n\t\tdy3 = sy[ 6 ] - ( S2*sy[7] );\n\t\tdy4 = sy[ 5 ] - ( S3*sy[6] );\n\t\tdy5 = sy[ 4 ] - ( S4*sy[5] );\n\t\tdy6 = sy[ 3 ] - ( S5*sy[4] );\n\t\tdy7 = sy[ 2 ] - ( S6*sy[3] );\n\t\tdy8 = sy[ 1 ] - ( S7*sy[2] );\n\t\tdy9 = sy[ 0 ] - ( S8*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tS9 = sh[ 9 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] );\n\t\tdx9 = sx[ 9 ] - ( S8*sx[8] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t\tdy8 = sy[ 8 ] - ( S7*sy[7] );\n\t\tdy9 = sy[ 9 ] - ( S8*sy[8] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i9 = 0; i9 < S9; i9++ ) {\n\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) ); // eslint-disable-line max-len\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx6;\n\t\t\t\t\tiy += dy6;\n\t\t\t\t}\n\t\t\t\tix += dx7;\n\t\t\t\tiy += dy7;\n\t\t\t}\n\t\t\tix += dx8;\n\t\t\tiy += dy8;\n\t\t}\n\t\tix += dx9;\n\t\tiy += dy9;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary10d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar numel = require( './../../../base/numel' );\nvar vind2bind = require( './../../../base/vind2bind' );\n\n\n// VARIABLES //\n\nvar MODE = 'throw';\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in an n-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unarynd( x, y, scale );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unarynd( x, y, fcn ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar ordx;\n\tvar ordy;\n\tvar len;\n\tvar get;\n\tvar set;\n\tvar sh;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i;\n\n\tsh = x.shape;\n\n\t// Compute the total number of elements over which to iterate:\n\tlen = numel( sh );\n\n\t// Cache references to the input and output ndarray data buffers:\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache references to the respective stride arrays:\n\tsx = x.strides;\n\tsy = y.strides;\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays:\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache the respective array orders:\n\tordx = x.order;\n\tordy = y.order;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over each element based on the linear **view** index, regardless as to how the data is stored in memory...\n\tfor ( i = 0; i < len; i++ ) {\n\t\tix = vind2bind( sh, sx, ox, ordx, i, MODE );\n\t\tiy = vind2bind( sh, sy, oy, ordy, i, MODE );\n\t\tset( ybuf, iy, fcn( get( xbuf, ix ) ) );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unarynd;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a zero-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0 ] );\n* var ybuf = new Float64Array( 1 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [];\n*\n* // Define the array strides:\n* var sx = [ 0 ];\n* var sy = [ 0 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary0d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0 ]\n*/\nfunction unary0d( x, y, fcn ) {\n\ty.data[ y.offset ] = fcn( x.data[ x.offset ] );\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary0d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a one-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Float64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 4 ];\n*\n* // Define the array strides:\n* var sx = [ 2 ];\n* var sy = [ 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary1d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 40.0, 60.0, 80.0 ]\n*/\nfunction unary1d( x, y, fcn ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dy0;\n\tvar S0;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables: dimensions and loop offset (pointer) increments...\n\tS0 = x.shape[ 0 ];\n\tdx0 = x.strides[ 0 ];\n\tdy0 = y.strides[ 0 ];\n\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\tix += dx0;\n\t\tiy += dy0;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary1d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a two-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Float64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary2d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0 ]\n*/\nfunction unary2d( x, y, fcn ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dy0;\n\tvar dy1;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 1 ];\n\t\tS1 = sh[ 0 ];\n\t\tdx0 = sx[ 1 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 0 ] - ( S0*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 1 ];\n\t\tdy1 = sy[ 0 ] - ( S0*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\tix += dx0;\n\t\t\tiy += dy0;\n\t\t}\n\t\tix += dx1;\n\t\tiy += dy1;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary2d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a three-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n* var sy = [ 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary3d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction unary3d( x, y, fcn ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 2 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 0 ];\n\t\tdx0 = sx[ 2 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[2] );\n\t\tdx2 = sx[ 0 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 2 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[2] );\n\t\tdy2 = sy[ 0 ] - ( S1*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\t\tix += dx0;\n\t\t\t\tiy += dy0;\n\t\t\t}\n\t\t\tix += dx1;\n\t\t\tiy += dy1;\n\t\t}\n\t\tix += dx2;\n\t\tiy += dy2;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary3d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a four-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 4, 1 ];\n* var sy = [ 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary4d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction unary4d( x, y, fcn ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 3 ];\n\t\tS1 = sh[ 2 ];\n\t\tS2 = sh[ 1 ];\n\t\tS3 = sh[ 0 ];\n\t\tdx0 = sx[ 3 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 2 ] - ( S0*sx[3] );\n\t\tdx2 = sx[ 1 ] - ( S1*sx[2] );\n\t\tdx3 = sx[ 0 ] - ( S2*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 3 ];\n\t\tdy1 = sy[ 2 ] - ( S0*sy[3] );\n\t\tdy2 = sy[ 1 ] - ( S1*sy[2] );\n\t\tdy3 = sy[ 0 ] - ( S2*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\t\t\tix += dx0;\n\t\t\t\t\tiy += dy0;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t\tiy += dy1;\n\t\t\t}\n\t\t\tix += dx2;\n\t\t\tiy += dy2;\n\t\t}\n\t\tix += dx3;\n\t\tiy += dy3;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary4d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a five-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary5d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction unary5d( x, y, fcn ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 4 ];\n\t\tS1 = sh[ 3 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 1 ];\n\t\tS4 = sh[ 0 ];\n\t\tdx0 = sx[ 4 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 3 ] - ( S0*sx[4] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[3] );\n\t\tdx3 = sx[ 1 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 0 ] - ( S3*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 4 ];\n\t\tdy1 = sy[ 3 ] - ( S0*sy[4] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[3] );\n\t\tdy3 = sy[ 1 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 0 ] - ( S3*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx1;\n\t\t\t\t\tiy += dy1;\n\t\t\t\t}\n\t\t\t\tix += dx2;\n\t\t\t\tiy += dy2;\n\t\t\t}\n\t\t\tix += dx3;\n\t\t\tiy += dy3;\n\t\t}\n\t\tix += dx4;\n\t\tiy += dy4;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary5d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a six-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary6d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction unary6d( x, y, fcn ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 5 ];\n\t\tS1 = sh[ 4 ];\n\t\tS2 = sh[ 3 ];\n\t\tS3 = sh[ 2 ];\n\t\tS4 = sh[ 1 ];\n\t\tS5 = sh[ 0 ];\n\t\tdx0 = sx[ 5 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 4 ] - ( S0*sx[5] );\n\t\tdx2 = sx[ 3 ] - ( S1*sx[4] );\n\t\tdx3 = sx[ 2 ] - ( S2*sx[3] );\n\t\tdx4 = sx[ 1 ] - ( S3*sx[2] );\n\t\tdx5 = sx[ 0 ] - ( S4*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 5 ];\n\t\tdy1 = sy[ 4 ] - ( S0*sy[5] );\n\t\tdy2 = sy[ 3 ] - ( S1*sy[4] );\n\t\tdy3 = sy[ 2 ] - ( S2*sy[3] );\n\t\tdy4 = sy[ 1 ] - ( S3*sy[2] );\n\t\tdy5 = sy[ 0 ] - ( S4*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t\tiy += dy2;\n\t\t\t\t}\n\t\t\t\tix += dx3;\n\t\t\t\tiy += dy3;\n\t\t\t}\n\t\t\tix += dx4;\n\t\t\tiy += dy4;\n\t\t}\n\t\tix += dx5;\n\t\tiy += dy5;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary6d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a seven-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary7d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction unary7d( x, y, fcn ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 6 ];\n\t\tS1 = sh[ 5 ];\n\t\tS2 = sh[ 4 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 2 ];\n\t\tS5 = sh[ 1 ];\n\t\tS6 = sh[ 0 ];\n\t\tdx0 = sx[ 6 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 5 ] - ( S0*sx[6] );\n\t\tdx2 = sx[ 4 ] - ( S1*sx[5] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[4] );\n\t\tdx4 = sx[ 2 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 1 ] - ( S4*sx[2] );\n\t\tdx6 = sx[ 0 ] - ( S5*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 6 ];\n\t\tdy1 = sy[ 5 ] - ( S0*sy[6] );\n\t\tdy2 = sy[ 4 ] - ( S1*sy[5] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[4] );\n\t\tdy4 = sy[ 2 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 1 ] - ( S4*sy[2] );\n\t\tdy6 = sy[ 0 ] - ( S5*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx3;\n\t\t\t\t\tiy += dy3;\n\t\t\t\t}\n\t\t\t\tix += dx4;\n\t\t\t\tiy += dy4;\n\t\t\t}\n\t\t\tix += dx5;\n\t\t\tiy += dy5;\n\t\t}\n\t\tix += dx6;\n\t\tiy += dy6;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary7d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in an eight-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary8d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction unary8d( x, y, fcn ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 7 ];\n\t\tS1 = sh[ 6 ];\n\t\tS2 = sh[ 5 ];\n\t\tS3 = sh[ 4 ];\n\t\tS4 = sh[ 3 ];\n\t\tS5 = sh[ 2 ];\n\t\tS6 = sh[ 1 ];\n\t\tS7 = sh[ 0 ];\n\t\tdx0 = sx[ 7 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 6 ] - ( S0*sx[7] );\n\t\tdx2 = sx[ 5 ] - ( S1*sx[6] );\n\t\tdx3 = sx[ 4 ] - ( S2*sx[5] );\n\t\tdx4 = sx[ 3 ] - ( S3*sx[4] );\n\t\tdx5 = sx[ 2 ] - ( S4*sx[3] );\n\t\tdx6 = sx[ 1 ] - ( S5*sx[2] );\n\t\tdx7 = sx[ 0 ] - ( S6*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 7 ];\n\t\tdy1 = sy[ 6 ] - ( S0*sy[7] );\n\t\tdy2 = sy[ 5 ] - ( S1*sy[6] );\n\t\tdy3 = sy[ 4 ] - ( S2*sy[5] );\n\t\tdy4 = sy[ 3 ] - ( S3*sy[4] );\n\t\tdy5 = sy[ 2 ] - ( S4*sy[3] );\n\t\tdy6 = sy[ 1 ] - ( S5*sy[2] );\n\t\tdy7 = sy[ 0 ] - ( S6*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx4;\n\t\t\t\t\tiy += dy4;\n\t\t\t\t}\n\t\t\t\tix += dx5;\n\t\t\t\tiy += dy5;\n\t\t\t}\n\t\t\tix += dx6;\n\t\t\tiy += dy6;\n\t\t}\n\t\tix += dx7;\n\t\tiy += dy7;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary8d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a nine-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary9d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction unary9d( x, y, fcn ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 8 ];\n\t\tS1 = sh[ 7 ];\n\t\tS2 = sh[ 6 ];\n\t\tS3 = sh[ 5 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 3 ];\n\t\tS6 = sh[ 2 ];\n\t\tS7 = sh[ 1 ];\n\t\tS8 = sh[ 0 ];\n\t\tdx0 = sx[ 8 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 7 ] - ( S0*sx[8] );\n\t\tdx2 = sx[ 6 ] - ( S1*sx[7] );\n\t\tdx3 = sx[ 5 ] - ( S2*sx[6] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[5] );\n\t\tdx5 = sx[ 3 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 2 ] - ( S5*sx[3] );\n\t\tdx7 = sx[ 1 ] - ( S6*sx[2] );\n\t\tdx8 = sx[ 0 ] - ( S7*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 8 ];\n\t\tdy1 = sy[ 7 ] - ( S0*sy[8] );\n\t\tdy2 = sy[ 6 ] - ( S1*sy[7] );\n\t\tdy3 = sy[ 5 ] - ( S2*sy[6] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[5] );\n\t\tdy5 = sy[ 3 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 2 ] - ( S5*sy[3] );\n\t\tdy7 = sy[ 1 ] - ( S6*sy[2] );\n\t\tdy8 = sy[ 0 ] - ( S7*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t\tdy8 = sy[ 8 ] - ( S7*sy[7] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx5;\n\t\t\t\t\tiy += dy5;\n\t\t\t\t}\n\t\t\t\tix += dx6;\n\t\t\t\tiy += dy6;\n\t\t\t}\n\t\t\tix += dx7;\n\t\t\tiy += dy7;\n\t\t}\n\t\tix += dx8;\n\t\tiy += dy8;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary9d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in a ten-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary10d( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction unary10d( x, y, fcn ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar dy9;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar S9;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 9 ];\n\t\tS1 = sh[ 8 ];\n\t\tS2 = sh[ 7 ];\n\t\tS3 = sh[ 6 ];\n\t\tS4 = sh[ 5 ];\n\t\tS5 = sh[ 4 ];\n\t\tS6 = sh[ 3 ];\n\t\tS7 = sh[ 2 ];\n\t\tS8 = sh[ 1 ];\n\t\tS9 = sh[ 0 ];\n\t\tdx0 = sx[ 9 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 8 ] - ( S0*sx[9] );\n\t\tdx2 = sx[ 7 ] - ( S1*sx[8] );\n\t\tdx3 = sx[ 6 ] - ( S2*sx[7] );\n\t\tdx4 = sx[ 5 ] - ( S3*sx[6] );\n\t\tdx5 = sx[ 4 ] - ( S4*sx[5] );\n\t\tdx6 = sx[ 3 ] - ( S5*sx[4] );\n\t\tdx7 = sx[ 2 ] - ( S6*sx[3] );\n\t\tdx8 = sx[ 1 ] - ( S7*sx[2] );\n\t\tdx9 = sx[ 0 ] - ( S8*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 9 ];\n\t\tdy1 = sy[ 8 ] - ( S0*sy[9] );\n\t\tdy2 = sy[ 7 ] - ( S1*sy[8] );\n\t\tdy3 = sy[ 6 ] - ( S2*sy[7] );\n\t\tdy4 = sy[ 5 ] - ( S3*sy[6] );\n\t\tdy5 = sy[ 4 ] - ( S4*sy[5] );\n\t\tdy6 = sy[ 3 ] - ( S5*sy[4] );\n\t\tdy7 = sy[ 2 ] - ( S6*sy[3] );\n\t\tdy8 = sy[ 1 ] - ( S7*sy[2] );\n\t\tdy9 = sy[ 0 ] - ( S8*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tS9 = sh[ 9 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] );\n\t\tdx9 = sx[ 9 ] - ( S8*sx[8] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t\tdy8 = sy[ 8 ] - ( S7*sy[7] );\n\t\tdy9 = sy[ 9 ] - ( S8*sy[8] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\tfor ( i9 = 0; i9 < S9; i9++ ) {\n\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx6;\n\t\t\t\t\tiy += dy6;\n\t\t\t\t}\n\t\t\t\tix += dx7;\n\t\t\t\tiy += dy7;\n\t\t\t}\n\t\t\tix += dx8;\n\t\t\tiy += dy8;\n\t\t}\n\t\tix += dx9;\n\t\tiy += dy9;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary10d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar numel = require( './../../../base/numel' );\nvar vind2bind = require( './../../../base/vind2bind' );\n\n\n// VARIABLES //\n\nvar MODE = 'throw';\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in an n-dimensional input ndarray and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Callback} fcn - unary callback\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Float64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unarynd( x, y, scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0 ]\n*/\nfunction unarynd( x, y, fcn ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar ordx;\n\tvar ordy;\n\tvar len;\n\tvar sh;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i;\n\n\tsh = x.shape;\n\n\t// Compute the total number of elements over which to iterate:\n\tlen = numel( sh );\n\n\t// Cache references to the input and output ndarray data buffers:\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache references to the respective stride arrays:\n\tsx = x.strides;\n\tsy = y.strides;\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays:\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache the respective array orders:\n\tordx = x.order;\n\tordy = y.order;\n\n\t// Iterate over each element based on the linear **view** index, regardless as to how the data is stored in memory...\n\tfor ( i = 0; i < len; i++ ) {\n\t\tix = vind2bind( sh, sx, ox, ordx, i, MODE );\n\t\tiy = vind2bind( sh, sy, oy, ordy, i, MODE );\n\t\tybuf[ iy ] = fcn( xbuf[ ix ] );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unarynd;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar iterationOrder = require( './../../../base/iteration-order' );\nvar minmaxViewBufferIndex = require( './../../../base/minmax-view-buffer-index' );\nvar ndarray2object = require( './../../../base/ndarraylike2object' );\nvar blockedaccessorunary2d = require( './2d_blocked_accessors.js' );\nvar blockedaccessorunary3d = require( './3d_blocked_accessors.js' );\nvar blockedaccessorunary4d = require( './4d_blocked_accessors.js' );\nvar blockedaccessorunary5d = require( './5d_blocked_accessors.js' );\nvar blockedaccessorunary6d = require( './6d_blocked_accessors.js' );\nvar blockedaccessorunary7d = require( './7d_blocked_accessors.js' );\nvar blockedaccessorunary8d = require( './8d_blocked_accessors.js' );\nvar blockedaccessorunary9d = require( './9d_blocked_accessors.js' );\nvar blockedaccessorunary10d = require( './10d_blocked_accessors.js' );\nvar blockedunary2d = require( './2d_blocked.js' );\nvar blockedunary3d = require( './3d_blocked.js' );\nvar blockedunary4d = require( './4d_blocked.js' );\nvar blockedunary5d = require( './5d_blocked.js' );\nvar blockedunary6d = require( './6d_blocked.js' );\nvar blockedunary7d = require( './7d_blocked.js' );\nvar blockedunary8d = require( './8d_blocked.js' );\nvar blockedunary9d = require( './9d_blocked.js' );\nvar blockedunary10d = require( './10d_blocked.js' );\nvar accessorunary0d = require( './0d_accessors.js' );\nvar accessorunary1d = require( './1d_accessors.js' );\nvar accessorunary2d = require( './2d_accessors.js' );\nvar accessorunary3d = require( './3d_accessors.js' );\nvar accessorunary4d = require( './4d_accessors.js' );\nvar accessorunary5d = require( './5d_accessors.js' );\nvar accessorunary6d = require( './6d_accessors.js' );\nvar accessorunary7d = require( './7d_accessors.js' );\nvar accessorunary8d = require( './8d_accessors.js' );\nvar accessorunary9d = require( './9d_accessors.js' );\nvar accessorunary10d = require( './10d_accessors.js' );\nvar accessorunarynd = require( './nd_accessors.js' );\nvar unary0d = require( './0d.js' );\nvar unary1d = require( './1d.js' );\nvar unary2d = require( './2d.js' );\nvar unary3d = require( './3d.js' );\nvar unary4d = require( './4d.js' );\nvar unary5d = require( './5d.js' );\nvar unary6d = require( './6d.js' );\nvar unary7d = require( './7d.js' );\nvar unary8d = require( './8d.js' );\nvar unary9d = require( './9d.js' );\nvar unary10d = require( './10d.js' );\nvar unarynd = require( './nd.js' );\n\n\n// VARIABLES //\n\nvar UNARY = [\n\tunary0d,\n\tunary1d,\n\tunary2d,\n\tunary3d,\n\tunary4d,\n\tunary5d,\n\tunary6d,\n\tunary7d,\n\tunary8d,\n\tunary9d,\n\tunary10d\n];\nvar ACCESSOR_UNARY = [\n\taccessorunary0d,\n\taccessorunary1d,\n\taccessorunary2d,\n\taccessorunary3d,\n\taccessorunary4d,\n\taccessorunary5d,\n\taccessorunary6d,\n\taccessorunary7d,\n\taccessorunary8d,\n\taccessorunary9d,\n\taccessorunary10d\n];\nvar BLOCKED_UNARY = [\n\tblockedunary2d, // 0\n\tblockedunary3d,\n\tblockedunary4d,\n\tblockedunary5d,\n\tblockedunary6d,\n\tblockedunary7d,\n\tblockedunary8d,\n\tblockedunary9d,\n\tblockedunary10d // 8\n];\nvar BLOCKED_ACCESSOR_UNARY = [\n\tblockedaccessorunary2d, // 0\n\tblockedaccessorunary3d,\n\tblockedaccessorunary4d,\n\tblockedaccessorunary5d,\n\tblockedaccessorunary6d,\n\tblockedaccessorunary7d,\n\tblockedaccessorunary8d,\n\tblockedaccessorunary9d,\n\tblockedaccessorunary10d // 8\n];\nvar MAX_DIMS = UNARY.length - 1;\n\n\n// MAIN //\n\n/**\n* Applies a unary callback to elements in an input ndarray and assigns results to elements in an output ndarray.\n*\n* ## Notes\n*\n* - Each provided ndarray should be an `object` with the following properties:\n*\n* - **dtype**: data type.\n* - **data**: data buffer.\n* - **shape**: dimensions.\n* - **strides**: stride lengths.\n* - **offset**: index offset.\n* - **order**: specifies whether an ndarray is row-major (C-style) or column major (Fortran-style).\n*\n* @param {ArrayLikeObject} arrays - array-like object containing one input array and one output array\n* @param {Callback} fcn - unary callback\n* @throws {Error} arrays must have the same number of dimensions\n* @throws {Error} arrays must have the same shape\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n* var sy = [ 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary( [ x, y ], scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\nfunction unary( arrays, fcn ) {\n\tvar ndims;\n\tvar xmmv;\n\tvar ymmv;\n\tvar shx;\n\tvar shy;\n\tvar iox;\n\tvar ioy;\n\tvar len;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ns;\n\tvar x;\n\tvar y;\n\tvar d;\n\tvar i;\n\n\t// Unpack the ndarrays and standardize ndarray meta data:\n\tx = ndarray2object( arrays[ 0 ] );\n\ty = ndarray2object( arrays[ 1 ] );\n\n\t// Verify that the input and output arrays have the same number of dimensions...\n\tshx = x.shape;\n\tshy = y.shape;\n\tndims = shx.length;\n\tif ( ndims !== shy.length ) {\n\t\tthrow new Error( 'invalid arguments. Arrays must have the same number of dimensions (i.e., same rank). ndims(x) == '+ndims+'. ndims(y) == '+shy.length+'.' );\n\t}\n\t// Determine whether we can avoid iteration altogether...\n\tif ( ndims === 0 ) {\n\t\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\t\treturn ACCESSOR_UNARY[ ndims ]( x, y, fcn );\n\t\t}\n\t\treturn UNARY[ ndims ]( x, y, fcn );\n\t}\n\t// Verify that the input and output arrays have the same dimensions...\n\tlen = 1; // number of elements\n\tns = 0; // number of singleton dimensions\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\td = shx[ i ];\n\t\tif ( d !== shy[ i ] ) {\n\t\t\tthrow new Error( 'invalid arguments. Arrays must have the same shape.' );\n\t\t}\n\t\t// Note that, if one of the dimensions is `0`, the length will be `0`...\n\t\tlen *= d;\n\n\t\t// Check whether the current dimension is a singleton dimension...\n\t\tif ( d === 1 ) {\n\t\t\tns += 1;\n\t\t}\n\t}\n\t// Check whether we were provided empty ndarrays...\n\tif ( len === 0 ) {\n\t\treturn;\n\t}\n\t// Determine whether the ndarrays are one-dimensional and thus readily translate to one-dimensional strided arrays...\n\tif ( ndims === 1 ) {\n\t\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\t\treturn ACCESSOR_UNARY[ ndims ]( x, y, fcn );\n\t\t}\n\t\treturn UNARY[ ndims ]( x, y, fcn );\n\t}\n\tsx = x.strides;\n\tsy = y.strides;\n\n\t// Determine whether the ndarray has only **one** non-singleton dimension (e.g., ndims=4, shape=[10,1,1,1]) so that we can treat the ndarrays as being equivalent to one-dimensional strided arrays...\n\tif ( ns === ndims-1 ) {\n\t\t// Get the index of the non-singleton dimension...\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\tif ( shx[ i ] !== 1 ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tx.shape = [ shx[i] ];\n\t\ty.shape = x.shape;\n\t\tx.strides = [ sx[i] ];\n\t\ty.strides = [ sy[i] ];\n\t\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\t\treturn ACCESSOR_UNARY[ 1 ]( x, y, fcn );\n\t\t}\n\t\treturn UNARY[ 1 ]( x, y, fcn );\n\t}\n\tiox = iterationOrder( sx ); // +/-1\n\tioy = iterationOrder( sy ); // +/-1\n\n\t// Determine whether we can avoid blocked iteration...\n\tif ( iox !== 0 && ioy !== 0 && x.order === y.order ) {\n\t\t// Determine the minimum and maximum linear indices which are accessible by the array views:\n\t\txmmv = minmaxViewBufferIndex( shx, sx, x.offset );\n\t\tymmv = minmaxViewBufferIndex( shy, sy, y.offset );\n\n\t\t// Determine whether we can ignore shape (and strides) and treat the ndarrays as linear one-dimensional strided arrays...\n\t\tif ( len === ( xmmv[1]-xmmv[0]+1 ) && len === ( ymmv[1]-ymmv[0]+1 ) ) {\n\t\t\t// Note: the above is equivalent to @stdlib/ndarray/base/assert/is-contiguous, but in-lined so we can retain computed values...\n\t\t\tif ( iox === 1 ) {\n\t\t\t\tox = xmmv[ 0 ];\n\t\t\t} else {\n\t\t\t\tox = xmmv[ 1 ];\n\t\t\t}\n\t\t\tif ( ioy === 1 ) {\n\t\t\t\toy = ymmv[ 0 ];\n\t\t\t} else {\n\t\t\t\toy = ymmv[ 1 ];\n\t\t\t}\n\t\t\tx.shape = [ len ];\n\t\t\ty.shape = x.shape;\n\t\t\tx.strides = [ iox ];\n\t\t\ty.strides = [ ioy ];\n\t\t\tx.offset = ox;\n\t\t\ty.offset = oy;\n\t\t\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\t\t\treturn ACCESSOR_UNARY[ 1 ]( x, y, fcn );\n\t\t\t}\n\t\t\treturn UNARY[ 1 ]( x, y, fcn );\n\t\t}\n\t\t// At least one ndarray is non-contiguous, so we cannot directly use one-dimensional array functionality...\n\n\t\t// Determine whether we can use simple nested loops...\n\t\tif ( ndims <= MAX_DIMS ) {\n\t\t\t// So long as iteration for each respective array always moves in the same direction (i.e., no mixed sign strides), we can leverage cache-optimal (i.e., normal) nested loops without resorting to blocked iteration...\n\t\t\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\t\t\treturn ACCESSOR_UNARY[ ndims ]( x, y, fcn );\n\t\t\t}\n\t\t\treturn UNARY[ ndims ]( x, y, fcn );\n\t\t}\n\t\t// Fall-through to blocked iteration...\n\t}\n\t// At this point, we're either dealing with non-contiguous n-dimensional arrays, high dimensional n-dimensional arrays, and/or arrays having differing memory layouts, so our only hope is that we can still perform blocked iteration...\n\n\t// Determine whether we can perform blocked iteration...\n\tif ( ndims <= MAX_DIMS ) {\n\t\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\t\treturn BLOCKED_ACCESSOR_UNARY[ ndims-2 ]( x, y, fcn );\n\t\t}\n\t\treturn BLOCKED_UNARY[ ndims-2 ]( x, y, fcn );\n\t}\n\t// Fall-through to linear view iteration without regard for how data is stored in memory (i.e., take the slow path)...\n\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\treturn accessorunarynd( x, y, fcn );\n\t}\n\tunarynd( x, y, fcn );\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Apply a unary callback to elements in an input ndarray and assign results to elements in an output ndarray.\n*\n* @module @stdlib/ndarray/base/unary\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var unary = require( '@stdlib/ndarray/base/unary' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n* var sy = [ 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary( [ x, y ], scale );\n*\n* console.log( y.data );\n* // => [ 20.0, 30.0, 60.0, 70.0, 100.0, 110.0 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isSafeCast = require( './../../../base/assert/is-safe-data-type-cast' );\nvar isSameKindCast = require( './../../../base/assert/is-same-kind-data-type-cast' );\nvar isFloatingPointDataType = require( './../../../base/assert/is-floating-point-data-type' );\nvar isComplexDataType = require( './../../../base/assert/is-complex-floating-point-data-type' );\nvar isRealDataType = require( './../../../base/assert/is-real-data-type' );\nvar broadcast = require( './../../../base/broadcast-array' );\nvar unary = require( './../../../base/unary' ); // TODO: replace with `@stdlib/ndarray/base/assign` and add native add-on support\nvar identity = require( '@stdlib/utils/identity-function' ); // TODO: remove once use `@stdlib/ndarray/base/assign`\nvar castReturn = require( '@stdlib/complex/base/cast-return' );\nvar complexCtors = require( '@stdlib/complex/ctors' );\nvar slice = require( './../../../base/slice' );\nvar getDType = require( './../../../base/dtype' );\nvar getShape = require( './../../../base/shape' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Assigns element values from a broadcasted input ndarray to corresponding elements in an output ndarray view.\n*\n* @param {ndarray} x - input array\n* @param {ndarray} y - output array\n* @param {MultiSlice} s - multi-slice object for the output array\n* @param {boolean} strict - boolean indicating whether to enforce strict bounds checking\n* @throws {RangeError} number of slice dimensions must match the number of array dimensions\n* @throws {RangeError} slice exceeds array bounds\n* @throws {Error} input array must be broadcast compatible with an output array view\n* @throws {TypeError} input array cannot be safely cast to the output array data type\n* @returns {ndarray} output array\n*\n* @example\n* var Slice = require( '@stdlib/slice/ctor' );\n* var MultiSlice = require( '@stdlib/slice/multi' );\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n* var ndzeros = require( '@stdlib/ndarray/zeros' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n*\n* // Define an input array:\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n* // returns \n*\n* var sh = x.shape;\n* // returns [ 3, 2 ]\n*\n* var arr = ndarray2array( x );\n* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]\n*\n* // Define an output array:\n* var y = ndzeros( [ 2, 3, 2 ], {\n* 'dtype': x.dtype\n* });\n*\n* // Create a slice:\n* var s0 = null;\n* var s1 = new Slice( null, null, -1 );\n* var s2 = new Slice( null, null, -1 );\n* var s = new MultiSlice( s0, s1, s2 );\n* // returns \n*\n* // Perform assignment:\n* var out = sliceAssign( x, y, s, false );\n* // returns \n*\n* var bool = ( out === y );\n* // returns true\n*\n* arr = ndarray2array( y );\n* // returns [ [ [ 6.0, 5.0 ], [ 4.0, 3.0 ], [ 2.0, 1.0 ] ], [ [ 6.0, 5.0 ], [ 4.0, 3.0 ], [ 2.0, 1.0 ] ] ]\n*/\nfunction sliceAssign( x, y, s, strict ) {\n\tvar view;\n\tvar fcn;\n\tvar xdt;\n\tvar ydt;\n\n\txdt = getDType( x );\n\tydt = getDType( y );\n\n\t// Safe casts are always allowed...\n\tif ( isSafeCast( xdt, ydt ) ) {\n\t\t// Check for real-to-complex conversion...\n\t\tif ( isRealDataType( xdt ) && isComplexDataType( ydt ) ) {\n\t\t\t// Need to cast a real number to a complex number:\n\t\t\tfcn = castReturn( identity, 1, complexCtors( ydt ) );\n\t\t} else {\n\t\t\t// Should only be real->real and complex->complex:\n\t\t\tfcn = identity;\n\t\t}\n\t}\n\t// Allow same kind casts (i.e., downcasts) only when the output data type is floating-point...\n\telse if ( isFloatingPointDataType( ydt ) && isSameKindCast( xdt, ydt ) ) {\n\t\t// At this point, we know that the input data type and output data type are of the same \"kind\" (e.g., real->real and complex->complex), and, thus, we don't need to perform any special conversions:\n\t\tfcn = identity;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. Input array values cannot be safely cast to the output array data type. Data types: [%s, %s].', xdt, ydt ) );\n\t}\n\t// Resolve a writable output array view:\n\tview = slice( y, s, strict, true );\n\n\t// Broadcast the input array:\n\tx = broadcast( x, getShape( view, true ) );\n\n\t// Set elements from `x` in `y`:\n\tunary( [ x, view ], fcn );\n\n\t// Return the original output array:\n\treturn y;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sliceAssign;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Assign element values from a broadcasted input ndarray to corresponding elements in an output ndarray view.\n*\n* @module @stdlib/ndarray/base/slice-assign\n*\n* @example\n* var Slice = require( '@stdlib/slice/ctor' );\n* var MultiSlice = require( '@stdlib/slice/multi' );\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n* var ndzeros = require( '@stdlib/ndarray/zeros' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n* var sliceAssign = require( '@stdlib/ndarray/base/slice-assign' );\n*\n* // Define an input array:\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n* // returns \n*\n* var sh = x.shape;\n* // returns [ 3, 2 ]\n*\n* var arr = ndarray2array( x );\n* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]\n*\n* // Define an output array:\n* var y = ndzeros( [ 2, 3, 2 ], {\n* 'dtype': x.dtype\n* });\n*\n* // Create a slice:\n* var s0 = null;\n* var s1 = new Slice( null, null, -1 );\n* var s2 = new Slice( null, null, -1 );\n* var s = new MultiSlice( s0, s1, s2 );\n* // returns \n*\n* // Perform assignment:\n* var out = sliceAssign( x, y, s, false );\n* // returns \n*\n* var bool = ( out === y );\n* // returns true\n*\n* arr = ndarray2array( y );\n* // returns [ [ [ 6.0, 5.0 ], [ 4.0, 3.0 ], [ 2.0, 1.0 ] ], [ [ 6.0, 5.0 ], [ 4.0, 3.0 ], [ 2.0, 1.0 ] ] ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar MultiSlice = require( '@stdlib/slice/multi' );\nvar ndims = require( './../../../base/ndims' );\nvar slice = require( './../../../base/slice' );\nvar filled = require( '@stdlib/array/base/filled' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns a view of an input ndarray when sliced along a specified dimension.\n*\n* @param {ndarray} x - input array\n* @param {integer} dim - index of dimension to slice\n* @param {(Slice|integer)} s - slice object or an integer\n* @param {boolean} strict - boolean indicating whether to enforce strict bounds checking\n* @param {boolean} writable - boolean indicating whether a returned array should be writable\n* @throws {TypeError} first argument must be an ndarray having one or more dimensions\n* @throws {RangeError} dimension index exceeds the number of dimensions\n* @throws {RangeError} slice exceeds array bounds\n* @returns {ndarray} ndarray view\n*\n* @example\n* var Slice = require( '@stdlib/slice/ctor' );\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n*\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n* // returns \n*\n* var sh = x.shape;\n* // returns [ 3, 2 ]\n*\n* var arr = ndarray2array( x );\n* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]\n*\n* var s = new Slice( null, null, -1 );\n* // returns \n*\n* var y = sliceDimension( x, 0, s, false, false );\n* // returns \n*\n* sh = y.shape;\n* // returns [ 3, 2 ]\n*\n* arr = ndarray2array( y );\n* // returns [ [ 5.0, 6.0 ], [ 3.0, 4.0 ], [ 1.0, 2.0 ] ]\n*/\nfunction sliceDimension( x, dim, s, strict, writable ) {\n\tvar args;\n\tvar N;\n\tvar d;\n\n\t// Retrieve array meta data:\n\tN = ndims( x );\n\n\t// Check whether we were provided a zero-dimensional array...\n\tif ( N === 0 ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ndarray having one or more dimensions. Number of dimensions: %d.', N ) );\n\t}\n\t// Normalize the dimension index...\n\td = dim;\n\tif ( d < 0 ) {\n\t\td += N;\n\t\tif ( d < 0 ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Dimension index exceeds the number of dimensions. Number of dimensions: %d. Value: `%d`.', N, dim ) );\n\t\t}\n\t} else if ( d >= N ) {\n\t\tthrow new RangeError( format( 'invalid argument. Dimension index exceeds the number of dimensions. Number of dimensions: %d. Value: `%d`.', N, dim ) );\n\t}\n\t// Create a multi-slice object...\n\targs = filled( null, N );\n\targs[ d ] = s;\n\ts = MultiSlice.apply( null, args );\n\n\t// Return a new array view:\n\treturn slice( x, s, strict, writable );\n}\n\n\n// EXPORTS //\n\nmodule.exports = sliceDimension;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a view of an input ndarray when sliced along a specified dimension.\n*\n* @module @stdlib/ndarray/base/slice-dimension\n*\n* @example\n* var Slice = require( '@stdlib/slice/ctor' );\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n* var sliceDimension = require( '@stdlib/ndarray/base/slice-dimension' );\n*\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n* // returns \n*\n* var sh = x.shape;\n* // returns [ 3, 2 ]\n*\n* var arr = ndarray2array( x );\n* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]\n*\n* var s = new Slice( null, null, -1 );\n* // returns \n*\n* var y = sliceDimension( x, 0, s, false, false );\n* // returns \n*\n* sh = y.shape;\n* // returns [ 3, 2 ]\n*\n* arr = ndarray2array( y );\n* // returns [ [ 5.0, 6.0 ], [ 3.0, 4.0 ], [ 1.0, 2.0 ] ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Converts subscripts to a linear index.\n*\n* ## Notes\n*\n* - The function accepts the following \"modes\":\n*\n* - `throw`: throws an error when a subscript exceeds array dimensions.\n* - `wrap`: wrap around subscripts exceeding array dimensions using modulo arithmetic.\n* - `clamp`: set subscripts exceeding array dimensions to either `0` (minimum index) or the maximum index along a particular dimension.\n*\n* - When provided fewer modes than dimensions, the function recycles modes using modulo arithmetic.\n*\n* - When provided a stride array containing negative strides, if an `offset` is greater than `0`, the function treats subscripts as mapping to a linear index in an underlying data buffer for the array, thus returning a linear index from the perspective of that buffer. If an `offset` is equal to `0`, the function treats subscripts as mapping to a linear index in an array view, thus returning a linear index from the perspective of that view.\n*\n* ```text\n* Dims: 2x2\n* Buffer: [ 1, 2, 3, 4 ]\n*\n* View = [ a00, a01,\n* a10, a11 ]\n*\n* Strides: 2,1\n* Offset: 0\n*\n* View = [ 1, 2,\n* 3, 4 ]\n*\n* Strides: 2,-1\n* Offset: 1\n*\n* View = [ 2, 1,\n* 4, 3 ]\n*\n* Strides: -2,1\n* Offset: 2\n*\n* View = [ 3, 4,\n* 1, 2 ]\n*\n* Strides: -2,-1\n* Offset: 3\n*\n* View = [ 4, 3,\n* 2, 1 ]\n* ```\n*\n* ```javascript\n* var shape = [ 2, 2 ];\n* var strides = [ -2, 1 ];\n* var offset = 2;\n* var mode = [ 'throw' ];\n*\n* // From the perspective of a view...\n* var idx = sub2ind( shape, strides, 0, 0, 0, mode );\n* // returns 0\n*\n* idx = sub2ind( shape, strides, 0, 0, 1, mode );\n* // returns 1\n*\n* idx = sub2ind( shape, strides, 0, 1, 0, mode );\n* // returns 2\n*\n* idx = sub2ind( shape, strides, 0, 1, 1, mode );\n* // returns 3\n*\n* // From the perspective of an underlying buffer...\n* idx = sub2ind( shape, strides, offset, 0, 0, mode );\n* // returns 2\n*\n* idx = sub2ind( shape, strides, offset, 0, 1, mode );\n* // returns 3\n*\n* idx = sub2ind( shape, strides, offset, 1, 0, mode );\n* // returns 0\n*\n* idx = sub2ind( shape, strides, offset, 1, 1, mode );\n* // returns 1\n* ```\n*\n* In short, from the perspective of a view, view data is always ordered.\n*\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - stride array\n* @param {NonNegativeInteger} offset - location of the first indexed value **based** on the stride array\n* @param {...integer} i - subscripts\n* @param {StringArray} mode - specifies how to handle subscripts which exceed array dimensions\n* @throws {RangeError} must provide subscripts which do not exceed array dimensions\n* @returns {NonNegativeInteger} linear index\n*\n* @example\n* var shape = [ 3, 3, 3 ];\n* var strides = [ 9, 3, 1 ];\n* var offset = 0;\n* var mode = [ 'throw' ]\n*\n* var idx = sub2ind( shape, strides, offset, 1, 2, 2, mode );\n* // returns 17\n*/\nfunction sub2ind() {\n\tvar strides;\n\tvar offset;\n\tvar nmodes;\n\tvar shape;\n\tvar ndims;\n\tvar modes;\n\tvar mode;\n\tvar idx;\n\tvar m;\n\tvar s;\n\tvar j;\n\tvar i;\n\n\tshape = arguments[ 0 ];\n\tstrides = arguments[ 1 ];\n\toffset = arguments[ 2 ];\n\tndims = shape.length;\n\tmodes = arguments[ 3+ndims ]; // last argument\n\tnmodes = modes.length;\n\tidx = offset;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tm = shape[ i ];\n\t\tj = arguments[ i+3 ];\n\t\tmode = modes[ i%nmodes ];\n\t\tif ( mode === 'clamp' ) {\n\t\t\tif ( j < 0 ) {\n\t\t\t\tj = 0;\n\t\t\t} else if ( j >= m ) {\n\t\t\t\tj = m - 1;\n\t\t\t}\n\t\t} else if ( mode === 'wrap' ) {\n\t\t\tif ( j < 0 ) {\n\t\t\t\tj += m; // slight optimization to avoid modulo arithmetic when |j| <= m\n\t\t\t\tif ( j < 0 ) {\n\t\t\t\t\tj %= m;\n\t\t\t\t\tif ( j !== 0 ) {\n\t\t\t\t\t\tj += m;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if ( j >= m ) {\n\t\t\t\tj -= m; // slight optimization to avoid modulo arithmetic when m < j <= 2m\n\t\t\t\tif ( j >= m ) {\n\t\t\t\t\tj %= m;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( j < 0 || j >= m ) { // mode === 'throw'\n\t\t\tthrow new RangeError( format( 'invalid argument. Subscripts must not exceed array dimensions. Subscript: `%u`. Value: `%d`.', i, j ) );\n\t\t}\n\t\ts = strides[ i ];\n\n\t\t// Check if array view...\n\t\tif ( s < 0 && offset === 0 ) {\n\t\t\tidx -= j * s; // increments idx\n\t\t} else {\n\t\t\tidx += j * s; // may increment or decrement idx\n\t\t}\n\t}\n\treturn idx;\n}\n\n\n// EXPORTS //\n\nmodule.exports = sub2ind;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert subscripts to a linear index.\n*\n* @module @stdlib/ndarray/base/sub2ind\n*\n* @example\n* var sub2ind = require( '@stdlib/ndarray/base/sub2ind' );\n*\n* var shape = [ 3, 3, 3 ];\n* var strides = [ 9, 3, 1 ];\n* var offset = 0;\n* var mode = [ 'throw' ];\n*\n* var idx = sub2ind( shape, strides, offset, 1, 2, 2, mode );\n* // returns 17\n*/\n\n// MODULES //\n\nvar sub2ind = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = sub2ind;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Recursively converts an ndarray to a generic array.\n*\n* @private\n* @param {Object} obj - array object\n* @param {(ArrayLikeObject|TypedArray|Buffer)} obj.data - data buffer\n* @param {Array} obj.accessors - element accessors\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - array strides\n* @param {NonNegativeInteger} offset - index offset\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {NonNegativeInteger} dim - dimension\n* @returns {(Array|Array)} output array\n*/\nfunction recurse( obj, shape, strides, offset, order, dim ) {\n\tvar stride;\n\tvar item;\n\tvar out;\n\tvar n;\n\tvar i;\n\n\tif ( dim >= shape.length ) {\n\t\treturn obj.accessors[ 0 ]( obj.data, offset );\n\t}\n\tout = [];\n\n\tn = shape[ dim ];\n\tstride = strides[ dim ];\n\n\tfor ( i = 0; i < n; i++ ) {\n\t\titem = recurse( obj, shape, strides, offset, order, dim+1 );\n\t\tout.push( item );\n\t\toffset += stride;\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = recurse;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar arraylike2object = require( '@stdlib/array/base/arraylike2object' );\nvar recurse = require( './recurse.js' );\n\n\n// MAIN //\n\n/**\n* Converts an ndarray buffer to a generic array (which may include nested arrays).\n*\n* @param {(ArrayLikeObject|TypedArray|Buffer)} buffer - data buffer\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - array strides\n* @param {NonNegativeInteger} offset - index offset\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @returns {(EmptyArray|Array|Array)} array (which may include nested arrays)\n*\n* @example\n* var buffer = [ 1, 2, 3, 4 ];\n* var shape = [ 2, 2 ];\n* var order = 'row-major';\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var out = ndarray2array( buffer, shape, strides, offset, order );\n* // returns [ [ 1, 2 ], [ 3, 4 ] ]\n*/\nfunction ndarray2array( buffer, shape, strides, offset, order ) {\n\tvar i;\n\tif ( shape.length === 0 ) {\n\t\treturn [];\n\t}\n\tfor ( i = 0; i < shape.length; i++ ) {\n\t\tif ( shape[ i ] === 0 ) {\n\t\t\treturn [];\n\t\t}\n\t}\n\treturn recurse( arraylike2object( buffer ), shape, strides, offset, order, 0 ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = ndarray2array;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert an ndarray buffer to a generic array (which may include nested arrays).\n*\n* @module @stdlib/ndarray/base/to-array\n*\n* @example\n* var ndarray2array = require( '@stdlib/ndarray/base/to-array' );\n*\n* var buffer = [ 1, 2, 3, 4 ];\n* var shape = [ 2, 2 ];\n* var order = 'row-major';\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var out = ndarray2array( buffer, shape, strides, offset, order );\n* // returns [ [ 1, 2 ], [ 3, 4 ] ]\n*/\n\n// MODULES //\n\nvar ndarray2array = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = ndarray2array;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar strides2offset = require( './../../../base/strides2offset' );\nvar getDType = require( './../../../base/dtype' );\nvar getShape = require( './../../../base/shape' );\nvar getStrides = require( './../../../base/strides' );\nvar getOrder = require( './../../../base/order' );\nvar getData = require( './../../../base/data-buffer' );\n\n\n// MAIN //\n\n/**\n* Transpose a matrix (or a stack of matrices).\n*\n* @param {ndarray} x - input array\n* @throws {Error} must provide an array with two or more dimensions\n* @returns {ndarray} ndarray\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] );\n* // returns \n*\n* var sh = x.shape;\n* // returns [ 2, 3 ]\n*\n* var y = transpose( x );\n* // returns \n*\n* sh = y.shape;\n* // returns [ 3, 2 ]\n*\n* var bool = ( x.data === y.data );\n* // returns true\n*\n* bool = ( x.get( 0, 1 ) === y.get( 1, 0 ) );\n* // returns true\n*/\nfunction transpose( x ) {\n\tvar tmp;\n\tvar sh;\n\tvar st;\n\tvar N;\n\n\tsh = getShape( x, true );\n\tN = sh.length;\n\tif ( N < 2 ) {\n\t\tthrow new Error( 'invalid argument. Must provide an ndarray having two or more dimensions.' );\n\t}\n\tst = getStrides( x, true );\n\n\ttmp = sh[ N-2 ];\n\tsh[ N-2 ] = sh[ N-1 ];\n\tsh[ N-1 ] = tmp;\n\n\ttmp = st[ N-2 ];\n\tst[ N-2 ] = st[ N-1 ];\n\tst[ N-1 ] = tmp;\n\n\t// FIXME: handling of offset seems incorrect. Should also handle READ-ONLY arrays.\n\treturn new x.constructor( getDType( x ), getData( x ), sh, st, strides2offset( sh, st ), getOrder( x ) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = transpose;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Transpose a matrix (or a stack of matrices).\n*\n* @module @stdlib/ndarray/base/transpose\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var transpose = require( '@stdlib/ndarray/base/transpose' );\n*\n* var x = array( [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] );\n* // returns \n*\n* var sh = x.shape;\n* // returns [ 2, 3 ]\n*\n* var y = transpose( x );\n* // returns \n*\n* sh = y.shape;\n* // returns [ 3, 2 ]\n*\n* var bool = ( x.data === y.data );\n* // returns true\n*\n* bool = ( x.get( 0, 1 ) === y.get( 1, 0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a two-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary2d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary2d( x, y, fcn, clbk, thisArg ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dy0;\n\tvar dy1;\n\tvar ox1;\n\tvar oy1;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar j0;\n\tvar j1;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\tif ( j1 < bsize ) {\n\t\t\ts1 = j1;\n\t\t\tj1 = 0;\n\t\t} else {\n\t\t\ts1 = bsize;\n\t\t\tj1 -= bsize;\n\t\t}\n\t\tox1 = ox + ( j1*sx[1] );\n\t\toy1 = oy + ( j1*sy[1] );\n\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\tif ( j0 < bsize ) {\n\t\t\t\ts0 = j0;\n\t\t\t\tj0 = 0;\n\t\t\t} else {\n\t\t\t\ts0 = bsize;\n\t\t\t\tj0 -= bsize;\n\t\t\t}\n\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t// Compute loop offset increments...\n\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t// Iterate over the ndarray dimensions...\n\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t\t\t}\n\t\t\t\t\tix += dx0;\n\t\t\t\t\tiy += dy0;\n\t\t\t\t\ti += 1;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t\tiy += dy1;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary2d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a three-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 1 ];\n* var sy = [ 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary3d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary3d( x, y, fcn, clbk, thisArg ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar ox1;\n\tvar ox2;\n\tvar oy1;\n\tvar oy2;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\tif ( j2 < bsize ) {\n\t\t\ts2 = j2;\n\t\t\tj2 = 0;\n\t\t} else {\n\t\t\ts2 = bsize;\n\t\t\tj2 -= bsize;\n\t\t}\n\t\tox2 = ox + ( j2*sx[2] );\n\t\toy2 = oy + ( j2*sy[2] );\n\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\tif ( j1 < bsize ) {\n\t\t\t\ts1 = j1;\n\t\t\t\tj1 = 0;\n\t\t\t} else {\n\t\t\t\ts1 = bsize;\n\t\t\t\tj1 -= bsize;\n\t\t\t}\n\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\ts0 = j0;\n\t\t\t\t\tj0 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts0 = bsize;\n\t\t\t\t\tj0 -= bsize;\n\t\t\t\t}\n\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t// Compute loop offset increments...\n\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t\tiy += dy2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary3d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a four-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary4d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary4d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\tif ( j3 < bsize ) {\n\t\t\ts3 = j3;\n\t\t\tj3 = 0;\n\t\t} else {\n\t\t\ts3 = bsize;\n\t\t\tj3 -= bsize;\n\t\t}\n\t\tox3 = ox + ( j3*sx[3] );\n\t\toy3 = oy + ( j3*sy[3] );\n\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\tif ( j2 < bsize ) {\n\t\t\t\ts2 = j2;\n\t\t\t\tj2 = 0;\n\t\t\t} else {\n\t\t\t\ts2 = bsize;\n\t\t\t\tj2 -= bsize;\n\t\t\t}\n\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\ts1 = j1;\n\t\t\t\t\tj1 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts1 = bsize;\n\t\t\t\t\tj1 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary4d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a five-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary5d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary5d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\tif ( j4 < bsize ) {\n\t\t\ts4 = j4;\n\t\t\tj4 = 0;\n\t\t} else {\n\t\t\ts4 = bsize;\n\t\t\tj4 -= bsize;\n\t\t}\n\t\tox4 = ox + ( j4*sx[4] );\n\t\toy4 = oy + ( j4*sy[4] );\n\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\tif ( j3 < bsize ) {\n\t\t\t\ts3 = j3;\n\t\t\t\tj3 = 0;\n\t\t\t} else {\n\t\t\t\ts3 = bsize;\n\t\t\t\tj3 -= bsize;\n\t\t\t}\n\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\ts2 = j2;\n\t\t\t\t\tj2 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts2 = bsize;\n\t\t\t\t\tj2 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary5d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a six-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary6d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary6d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\tif ( j5 < bsize ) {\n\t\t\ts5 = j5;\n\t\t\tj5 = 0;\n\t\t} else {\n\t\t\ts5 = bsize;\n\t\t\tj5 -= bsize;\n\t\t}\n\t\tox5 = ox + ( j5*sx[5] );\n\t\toy5 = oy + ( j5*sy[5] );\n\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\tif ( j4 < bsize ) {\n\t\t\t\ts4 = j4;\n\t\t\t\tj4 = 0;\n\t\t\t} else {\n\t\t\t\ts4 = bsize;\n\t\t\t\tj4 -= bsize;\n\t\t\t}\n\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\ts3 = j3;\n\t\t\t\t\tj3 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts3 = bsize;\n\t\t\t\t\tj3 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary6d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a seven-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var real = require( '@stdlib/complex/real' );\n* var imag = require( '@stdlib/complex/imag' );\n*\n* function scale( z ) {\n* return new Complex64( real(z)*10.0, imag(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary7d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = real( v );\n* // returns 10.0\n*\n* var im = imag( v );\n* // returns 20.0\n*/\nfunction blockedunary7d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\tif ( j6 < bsize ) {\n\t\t\ts6 = j6;\n\t\t\tj6 = 0;\n\t\t} else {\n\t\t\ts6 = bsize;\n\t\t\tj6 -= bsize;\n\t\t}\n\t\tox6 = ox + ( j6*sx[6] );\n\t\toy6 = oy + ( j6*sy[6] );\n\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\tif ( j5 < bsize ) {\n\t\t\t\ts5 = j5;\n\t\t\t\tj5 = 0;\n\t\t\t} else {\n\t\t\t\ts5 = bsize;\n\t\t\t\tj5 -= bsize;\n\t\t\t}\n\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\tdy6 = sy[6] - ( s5*sy[5] );\n\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\ts4 = j4;\n\t\t\t\t\tj4 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts4 = bsize;\n\t\t\t\t\tj4 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary7d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from an eight-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary8d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary8d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\tif ( j7 < bsize ) {\n\t\t\ts7 = j7;\n\t\t\tj7 = 0;\n\t\t} else {\n\t\t\ts7 = bsize;\n\t\t\tj7 -= bsize;\n\t\t}\n\t\tox7 = ox + ( j7*sx[7] );\n\t\toy7 = oy + ( j7*sy[7] );\n\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\tif ( j6 < bsize ) {\n\t\t\t\ts6 = j6;\n\t\t\t\tj6 = 0;\n\t\t\t} else {\n\t\t\t\ts6 = bsize;\n\t\t\t\tj6 -= bsize;\n\t\t\t}\n\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\tdy7 = sy[7] - ( s6*sy[6] );\n\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\ts5 = j5;\n\t\t\t\t\tj5 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts5 = bsize;\n\t\t\t\t\tj5 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\tdy6 = sy[6] - ( s5*sy[5] );\n\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\tiy += dy7;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary8d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a nine-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary9d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary9d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar oy8;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\tif ( j8 < bsize ) {\n\t\t\ts8 = j8;\n\t\t\tj8 = 0;\n\t\t} else {\n\t\t\ts8 = bsize;\n\t\t\tj8 -= bsize;\n\t\t}\n\t\tox8 = ox + ( j8*sx[8] );\n\t\toy8 = oy + ( j8*sy[8] );\n\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\tif ( j7 < bsize ) {\n\t\t\t\ts7 = j7;\n\t\t\t\tj7 = 0;\n\t\t\t} else {\n\t\t\t\ts7 = bsize;\n\t\t\t\tj7 -= bsize;\n\t\t\t}\n\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\tdy8 = sy[8] - ( s7*sy[7] );\n\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\toy7 = oy8 + ( j7*sy[7] );\n\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\ts6 = j6;\n\t\t\t\t\tj6 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts6 = bsize;\n\t\t\t\t\tj6 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\tdy7 = sy[7] - ( s6*sy[6] );\n\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\tdy6 = sy[6] - ( s5*sy[5] );\n\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\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t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy7;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx8;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy8;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary9d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a ten-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* blockedunary10d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction blockedunary10d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar dy9;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar ox9;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar oy8;\n\tvar oy9;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar s9;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar j9;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Cache accessors:\n\tget = x.accessors[0];\n\tset = y.accessors[1];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j9 = sh[9]; j9 > 0; ) {\n\t\tif ( j9 < bsize ) {\n\t\t\ts9 = j9;\n\t\t\tj9 = 0;\n\t\t} else {\n\t\t\ts9 = bsize;\n\t\t\tj9 -= bsize;\n\t\t}\n\t\tox9 = ox + ( j9*sx[9] );\n\t\toy9 = oy + ( j9*sy[9] );\n\t\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\t\tif ( j8 < bsize ) {\n\t\t\t\ts8 = j8;\n\t\t\t\tj8 = 0;\n\t\t\t} else {\n\t\t\t\ts8 = bsize;\n\t\t\t\tj8 -= bsize;\n\t\t\t}\n\t\t\tdx9 = sx[9] - ( s8*sx[8] );\n\t\t\tdy9 = sy[9] - ( s8*sy[8] );\n\t\t\tox8 = ox9 + ( j8*sx[8] );\n\t\t\toy8 = oy9 + ( j8*sy[8] );\n\t\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\t\tif ( j7 < bsize ) {\n\t\t\t\t\ts7 = j7;\n\t\t\t\t\tj7 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts7 = bsize;\n\t\t\t\t\tj7 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\t\tdy8 = sy[8] - ( s7*sy[7] );\n\t\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\t\toy7 = oy8 + ( j7*sy[7] );\n\t\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\t\ts6 = j6;\n\t\t\t\t\t\tj6 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts6 = bsize;\n\t\t\t\t\t\tj6 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\t\tdy7 = sy[7] - ( s6*sy[6] );\n\t\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\t\tdy6 = sy[6] - ( s5*sy[5] );\n\t\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\t\tfor ( i9 = 0; i9 < s9; i9++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\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t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary10d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a two-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Float64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary2d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0 ]\n*/\nfunction blockedunary2d( x, y, fcn, clbk, thisArg ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dy0;\n\tvar dy1;\n\tvar ox1;\n\tvar oy1;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar j0;\n\tvar j1;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\tif ( j1 < bsize ) {\n\t\t\ts1 = j1;\n\t\t\tj1 = 0;\n\t\t} else {\n\t\t\ts1 = bsize;\n\t\t\tj1 -= bsize;\n\t\t}\n\t\tox1 = ox + ( j1*sx[1] );\n\t\toy1 = oy + ( j1*sy[1] );\n\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\tif ( j0 < bsize ) {\n\t\t\t\ts0 = j0;\n\t\t\t\tj0 = 0;\n\t\t\t} else {\n\t\t\t\ts0 = bsize;\n\t\t\t\tj0 -= bsize;\n\t\t\t}\n\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t// Compute loop offset increments...\n\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t// Iterate over the ndarray dimensions...\n\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\tybuf[ iy ] = fcn( v );\n\t\t\t\t\t}\n\t\t\t\t\tix += dx0;\n\t\t\t\t\tiy += dy0;\n\t\t\t\t\ti += 1;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t\tiy += dy1;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary2d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a three-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n* var sy = [ 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary3d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction blockedunary3d( x, y, fcn, clbk, thisArg ) {\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar ox1;\n\tvar ox2;\n\tvar oy1;\n\tvar oy2;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\tif ( j2 < bsize ) {\n\t\t\ts2 = j2;\n\t\t\tj2 = 0;\n\t\t} else {\n\t\t\ts2 = bsize;\n\t\t\tj2 -= bsize;\n\t\t}\n\t\tox2 = ox + ( j2*sx[2] );\n\t\toy2 = oy + ( j2*sy[2] );\n\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\tif ( j1 < bsize ) {\n\t\t\t\ts1 = j1;\n\t\t\t\tj1 = 0;\n\t\t\t} else {\n\t\t\t\ts1 = bsize;\n\t\t\t\tj1 -= bsize;\n\t\t\t}\n\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\ts0 = j0;\n\t\t\t\t\tj0 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts0 = bsize;\n\t\t\t\t\tj0 -= bsize;\n\t\t\t\t}\n\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t// Compute loop offset increments...\n\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( v );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t\tiy += dy2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary3d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a four-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 4, 1 ];\n* var sy = [ 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary4d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction blockedunary4d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\tif ( j3 < bsize ) {\n\t\t\ts3 = j3;\n\t\t\tj3 = 0;\n\t\t} else {\n\t\t\ts3 = bsize;\n\t\t\tj3 -= bsize;\n\t\t}\n\t\tox3 = ox + ( j3*sx[3] );\n\t\toy3 = oy + ( j3*sy[3] );\n\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\tif ( j2 < bsize ) {\n\t\t\t\ts2 = j2;\n\t\t\t\tj2 = 0;\n\t\t\t} else {\n\t\t\t\ts2 = bsize;\n\t\t\t\tj2 -= bsize;\n\t\t\t}\n\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\ts1 = j1;\n\t\t\t\t\tj1 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts1 = bsize;\n\t\t\t\t\tj1 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( v );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary4d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a five-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary5d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction blockedunary5d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\tif ( j4 < bsize ) {\n\t\t\ts4 = j4;\n\t\t\tj4 = 0;\n\t\t} else {\n\t\t\ts4 = bsize;\n\t\t\tj4 -= bsize;\n\t\t}\n\t\tox4 = ox + ( j4*sx[4] );\n\t\toy4 = oy + ( j4*sy[4] );\n\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\tif ( j3 < bsize ) {\n\t\t\t\ts3 = j3;\n\t\t\t\tj3 = 0;\n\t\t\t} else {\n\t\t\t\ts3 = bsize;\n\t\t\t\tj3 -= bsize;\n\t\t\t}\n\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\ts2 = j2;\n\t\t\t\t\tj2 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts2 = bsize;\n\t\t\t\t\tj2 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( v );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary5d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a six-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary6d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction blockedunary6d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\tif ( j5 < bsize ) {\n\t\t\ts5 = j5;\n\t\t\tj5 = 0;\n\t\t} else {\n\t\t\ts5 = bsize;\n\t\t\tj5 -= bsize;\n\t\t}\n\t\tox5 = ox + ( j5*sx[5] );\n\t\toy5 = oy + ( j5*sy[5] );\n\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\tif ( j4 < bsize ) {\n\t\t\t\ts4 = j4;\n\t\t\t\tj4 = 0;\n\t\t\t} else {\n\t\t\t\ts4 = bsize;\n\t\t\t\tj4 -= bsize;\n\t\t\t}\n\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\ts3 = j3;\n\t\t\t\t\tj3 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts3 = bsize;\n\t\t\t\t\tj3 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( v );\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary6d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a seven-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary7d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction blockedunary7d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\tif ( j6 < bsize ) {\n\t\t\ts6 = j6;\n\t\t\tj6 = 0;\n\t\t} else {\n\t\t\ts6 = bsize;\n\t\t\tj6 -= bsize;\n\t\t}\n\t\tox6 = ox + ( j6*sx[6] );\n\t\toy6 = oy + ( j6*sy[6] );\n\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\tif ( j5 < bsize ) {\n\t\t\t\ts5 = j5;\n\t\t\t\tj5 = 0;\n\t\t\t} else {\n\t\t\t\ts5 = bsize;\n\t\t\t\tj5 -= bsize;\n\t\t\t}\n\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\tdy6 = sy[6] - ( s5*sy[5] );\n\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\ts4 = j4;\n\t\t\t\t\tj4 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts4 = bsize;\n\t\t\t\t\tj4 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i3 = 0; i3 < s3; i3++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < s2; i2++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < s1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < s0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( v );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary7d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from an eight-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary8d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction blockedunary8d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\tif ( j7 < bsize ) {\n\t\t\ts7 = j7;\n\t\t\tj7 = 0;\n\t\t} else {\n\t\t\ts7 = bsize;\n\t\t\tj7 -= bsize;\n\t\t}\n\t\tox7 = ox + ( j7*sx[7] );\n\t\toy7 = oy + ( j7*sy[7] );\n\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\tif ( j6 < bsize ) {\n\t\t\t\ts6 = j6;\n\t\t\t\tj6 = 0;\n\t\t\t} else {\n\t\t\t\ts6 = bsize;\n\t\t\t\tj6 -= bsize;\n\t\t\t}\n\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\tdy7 = sy[7] - ( s6*sy[6] );\n\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\ts5 = j5;\n\t\t\t\t\tj5 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts5 = bsize;\n\t\t\t\t\tj5 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\tdy6 = sy[6] - ( s5*sy[5] );\n\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i5 = 0; i5 < s5; i5++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i4 = 0; i4 < s4; i4++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i3 =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t\t\t\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\tiy += dy7;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary8d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a nine-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary9d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction blockedunary9d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar oy8;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\tif ( j8 < bsize ) {\n\t\t\ts8 = j8;\n\t\t\tj8 = 0;\n\t\t} else {\n\t\t\ts8 = bsize;\n\t\t\tj8 -= bsize;\n\t\t}\n\t\tox8 = ox + ( j8*sx[8] );\n\t\toy8 = oy + ( j8*sy[8] );\n\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\tif ( j7 < bsize ) {\n\t\t\t\ts7 = j7;\n\t\t\t\tj7 = 0;\n\t\t\t} else {\n\t\t\t\ts7 = bsize;\n\t\t\t\tj7 -= bsize;\n\t\t\t}\n\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\tdy8 = sy[8] - ( s7*sy[7] );\n\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\toy7 = oy8 + ( j7*sy[7] );\n\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\ts6 = j6;\n\t\t\t\t\tj6 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts6 = bsize;\n\t\t\t\t\tj6 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\tdy7 = sy[7] - ( s6*sy[6] );\n\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\tdy6 = sy[6] - ( s5*sy[5] );\n\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i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}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tix += dx6;\n\t\t\t\t\t\t\t\t\t\t\t\t\tiy += dy6;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tix += dx7;\n\t\t\t\t\t\t\t\t\t\t\t\tiy += dy7;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx8;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy8;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = blockedunary9d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MODULES //\n\nvar loopOrder = require( './../../../base/unary-loop-interchange-order' );\nvar blockSize = require( './../../../base/unary-tiling-block-size' );\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a ten-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray via loop blocking.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* blockedunary10d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction blockedunary10d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements, max-lines-per-function\n\tvar bsize;\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar dy9;\n\tvar ox1;\n\tvar ox2;\n\tvar ox3;\n\tvar ox4;\n\tvar ox5;\n\tvar ox6;\n\tvar ox7;\n\tvar ox8;\n\tvar ox9;\n\tvar oy1;\n\tvar oy2;\n\tvar oy3;\n\tvar oy4;\n\tvar oy5;\n\tvar oy6;\n\tvar oy7;\n\tvar oy8;\n\tvar oy9;\n\tvar sh;\n\tvar s0;\n\tvar s1;\n\tvar s2;\n\tvar s3;\n\tvar s4;\n\tvar s5;\n\tvar s6;\n\tvar s7;\n\tvar s8;\n\tvar s9;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar j0;\n\tvar j1;\n\tvar j2;\n\tvar j3;\n\tvar j4;\n\tvar j5;\n\tvar j6;\n\tvar j7;\n\tvar j8;\n\tvar j9;\n\tvar o;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: s#, dx#, dy#, i#, j# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Resolve the loop interchange order:\n\to = loopOrder( x.shape, x.strides, y.strides );\n\tsh = o.sh;\n\tsx = o.sx;\n\tsy = o.sy;\n\n\t// Determine the block size:\n\tbsize = blockSize( x.dtype, y.dtype );\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays...\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache offset increments for the innermost loop...\n\tdx0 = sx[0];\n\tdy0 = sy[0];\n\n\t// Iterate over blocks...\n\ti = 0;\n\tfor ( j9 = sh[9]; j9 > 0; ) {\n\t\tif ( j9 < bsize ) {\n\t\t\ts9 = j9;\n\t\t\tj9 = 0;\n\t\t} else {\n\t\t\ts9 = bsize;\n\t\t\tj9 -= bsize;\n\t\t}\n\t\tox9 = ox + ( j9*sx[9] );\n\t\toy9 = oy + ( j9*sy[9] );\n\t\tfor ( j8 = sh[8]; j8 > 0; ) {\n\t\t\tif ( j8 < bsize ) {\n\t\t\t\ts8 = j8;\n\t\t\t\tj8 = 0;\n\t\t\t} else {\n\t\t\t\ts8 = bsize;\n\t\t\t\tj8 -= bsize;\n\t\t\t}\n\t\t\tdx9 = sx[9] - ( s8*sx[8] );\n\t\t\tdy9 = sy[9] - ( s8*sy[8] );\n\t\t\tox8 = ox9 + ( j8*sx[8] );\n\t\t\toy8 = oy9 + ( j8*sy[8] );\n\t\t\tfor ( j7 = sh[7]; j7 > 0; ) {\n\t\t\t\tif ( j7 < bsize ) {\n\t\t\t\t\ts7 = j7;\n\t\t\t\t\tj7 = 0;\n\t\t\t\t} else {\n\t\t\t\t\ts7 = bsize;\n\t\t\t\t\tj7 -= bsize;\n\t\t\t\t}\n\t\t\t\tdx8 = sx[8] - ( s7*sx[7] );\n\t\t\t\tdy8 = sy[8] - ( s7*sy[7] );\n\t\t\t\tox7 = ox8 + ( j7*sx[7] );\n\t\t\t\toy7 = oy8 + ( j7*sy[7] );\n\t\t\t\tfor ( j6 = sh[6]; j6 > 0; ) {\n\t\t\t\t\tif ( j6 < bsize ) {\n\t\t\t\t\t\ts6 = j6;\n\t\t\t\t\t\tj6 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts6 = bsize;\n\t\t\t\t\t\tj6 -= bsize;\n\t\t\t\t\t}\n\t\t\t\t\tdx7 = sx[7] - ( s6*sx[6] );\n\t\t\t\t\tdy7 = sy[7] - ( s6*sy[6] );\n\t\t\t\t\tox6 = ox7 + ( j6*sx[6] );\n\t\t\t\t\toy6 = oy7 + ( j6*sy[6] );\n\t\t\t\t\tfor ( j5 = sh[5]; j5 > 0; ) {\n\t\t\t\t\t\tif ( j5 < bsize ) {\n\t\t\t\t\t\t\ts5 = j5;\n\t\t\t\t\t\t\tj5 = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ts5 = bsize;\n\t\t\t\t\t\t\tj5 -= bsize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdx6 = sx[6] - ( s5*sx[5] );\n\t\t\t\t\t\tdy6 = sy[6] - ( s5*sy[5] );\n\t\t\t\t\t\tox5 = ox6 + ( j5*sx[5] );\n\t\t\t\t\t\toy5 = oy6 + ( j5*sy[5] );\n\t\t\t\t\t\tfor ( j4 = sh[4]; j4 > 0; ) {\n\t\t\t\t\t\t\tif ( j4 < bsize ) {\n\t\t\t\t\t\t\t\ts4 = j4;\n\t\t\t\t\t\t\t\tj4 = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts4 = bsize;\n\t\t\t\t\t\t\t\tj4 -= bsize;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdx5 = sx[5] - ( s4*sx[4] );\n\t\t\t\t\t\t\tdy5 = sy[5] - ( s4*sy[4] );\n\t\t\t\t\t\t\tox4 = ox5 + ( j4*sx[4] );\n\t\t\t\t\t\t\toy4 = oy5 + ( j4*sy[4] );\n\t\t\t\t\t\t\tfor ( j3 = sh[3]; j3 > 0; ) {\n\t\t\t\t\t\t\t\tif ( j3 < bsize ) {\n\t\t\t\t\t\t\t\t\ts3 = j3;\n\t\t\t\t\t\t\t\t\tj3 = 0;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts3 = bsize;\n\t\t\t\t\t\t\t\t\tj3 -= bsize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdx4 = sx[4] - ( s3*sx[3] );\n\t\t\t\t\t\t\t\tdy4 = sy[4] - ( s3*sy[3] );\n\t\t\t\t\t\t\t\tox3 = ox4 + ( j3*sx[3] );\n\t\t\t\t\t\t\t\toy3 = oy4 + ( j3*sy[3] );\n\t\t\t\t\t\t\t\tfor ( j2 = sh[2]; j2 > 0; ) {\n\t\t\t\t\t\t\t\t\tif ( j2 < bsize ) {\n\t\t\t\t\t\t\t\t\t\ts2 = j2;\n\t\t\t\t\t\t\t\t\t\tj2 = 0;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts2 = bsize;\n\t\t\t\t\t\t\t\t\t\tj2 -= bsize;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdx3 = sx[3] - ( s2*sx[2] );\n\t\t\t\t\t\t\t\t\tdy3 = sy[3] - ( s2*sy[2] );\n\t\t\t\t\t\t\t\t\tox2 = ox3 + ( j2*sx[2] );\n\t\t\t\t\t\t\t\t\toy2 = oy3 + ( j2*sy[2] );\n\t\t\t\t\t\t\t\t\tfor ( j1 = sh[1]; j1 > 0; ) {\n\t\t\t\t\t\t\t\t\t\tif ( j1 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\ts1 = j1;\n\t\t\t\t\t\t\t\t\t\t\tj1 = 0;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\ts1 = bsize;\n\t\t\t\t\t\t\t\t\t\t\tj1 -= bsize;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdx2 = sx[2] - ( s1*sx[1] );\n\t\t\t\t\t\t\t\t\t\tdy2 = sy[2] - ( s1*sy[1] );\n\t\t\t\t\t\t\t\t\t\tox1 = ox2 + ( j1*sx[1] );\n\t\t\t\t\t\t\t\t\t\toy1 = oy2 + ( j1*sy[1] );\n\t\t\t\t\t\t\t\t\t\tfor ( j0 = sh[0]; j0 > 0; ) {\n\t\t\t\t\t\t\t\t\t\t\tif ( j0 < bsize ) {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = j0;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 = 0;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\ts0 = bsize;\n\t\t\t\t\t\t\t\t\t\t\t\tj0 -= bsize;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t// Compute index offsets for the first input and output ndarray elements in the current block...\n\t\t\t\t\t\t\t\t\t\t\tix = ox1 + ( j0*sx[0] );\n\t\t\t\t\t\t\t\t\t\t\tiy = oy1 + ( j0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Compute loop offset increments...\n\t\t\t\t\t\t\t\t\t\t\tdx1 = sx[1] - ( s0*sx[0] );\n\t\t\t\t\t\t\t\t\t\t\tdy1 = sy[1] - ( s0*sy[0] );\n\n\t\t\t\t\t\t\t\t\t\t\t// Iterate over the ndarray dimensions...\n\t\t\t\t\t\t\t\t\t\t\tfor ( i9 = 0; i9 < s9; i9++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\tfor ( i8 = 0; i8 < s8; i8++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i7 = 0; i7 < s7; i7++ ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ( i6 = 0; i6 < s6; i6++ ) {\n\t\t\t\t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Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a zero-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0 ] );\n* var ybuf = new Complex64Array( 2 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [];\n*\n* // Define the array strides:\n* var sx = [ 0 ];\n* var sy = [ 0 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary0d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 30.0\n*\n* var im = imagf( v );\n* // returns 40.0\n*/\nfunction unary0d( x, y, fcn, clbk, thisArg ) {\n\tvar ox = x.offset;\n\tvar oy = y.offset;\n\tvar v = clbk.call( thisArg, x.accessors[ 0 ]( x.data, ox ), 0, [ ox, oy ], [ x, y ] ); // eslint-disable-line max-len\n\tif ( v !== void 0 ) {\n\t\ty.accessors[ 1 ]( y.data, oy, fcn( v ) );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary0d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a one-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 4 ];\n*\n* // Define the array strides:\n* var sx = [ 1 ];\n* var sy = [ 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary1d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary1d( x, y, fcn, clbk, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dy0;\n\tvar S0;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables: dimensions and loop offset (pointer) increments...\n\tS0 = x.shape[ 0 ];\n\tdx0 = x.strides[ 0 ];\n\tdy0 = y.strides[ 0 ];\n\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\tif ( v !== void 0 ) {\n\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t}\n\t\tix += dx0;\n\t\tiy += dy0;\n\t\ti += 1;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary1d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a two-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary2d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary2d( x, y, fcn, clbk, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dy0;\n\tvar dy1;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 1 ];\n\t\tS1 = sh[ 0 ];\n\t\tdx0 = sx[ 1 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 0 ] - ( S0*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 1 ];\n\t\tdy1 = sy[ 0 ] - ( S0*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\tif ( v !== void 0 ) {\n\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t}\n\t\t\tix += dx0;\n\t\t\tiy += dy0;\n\t\t\ti += 1;\n\t\t}\n\t\tix += dx1;\n\t\tiy += dy1;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary2d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-len */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a three-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 1 ];\n* var sy = [ 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary3d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary3d( x, y, fcn, clbk, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 2 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 0 ];\n\t\tdx0 = sx[ 2 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[2] );\n\t\tdx2 = sx[ 0 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 2 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[2] );\n\t\tdy2 = sy[ 0 ] - ( S1*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t\t}\n\t\t\t\tix += dx0;\n\t\t\t\tiy += dy0;\n\t\t\t\ti += 1;\n\t\t\t}\n\t\t\tix += dx1;\n\t\t\tiy += dy1;\n\t\t}\n\t\tix += dx2;\n\t\tiy += dy2;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary3d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-len */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a four-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary4d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary4d( x, y, fcn, clbk, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 3 ];\n\t\tS1 = sh[ 2 ];\n\t\tS2 = sh[ 1 ];\n\t\tS3 = sh[ 0 ];\n\t\tdx0 = sx[ 3 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 2 ] - ( S0*sx[3] );\n\t\tdx2 = sx[ 1 ] - ( S1*sx[2] );\n\t\tdx3 = sx[ 0 ] - ( S2*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 3 ];\n\t\tdy1 = sy[ 2 ] - ( S0*sy[3] );\n\t\tdy2 = sy[ 1 ] - ( S1*sy[2] );\n\t\tdy3 = sy[ 0 ] - ( S2*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t\t\t}\n\t\t\t\t\tix += dx0;\n\t\t\t\t\tiy += dy0;\n\t\t\t\t\ti += 1;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t\tiy += dy1;\n\t\t\t}\n\t\t\tix += dx2;\n\t\t\tiy += dy2;\n\t\t}\n\t\tix += dx3;\n\t\tiy += dy3;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary4d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a five-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary5d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary5d( x, y, fcn, clbk, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 4 ];\n\t\tS1 = sh[ 3 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 1 ];\n\t\tS4 = sh[ 0 ];\n\t\tdx0 = sx[ 4 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 3 ] - ( S0*sx[4] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[3] );\n\t\tdx3 = sx[ 1 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 0 ] - ( S3*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 4 ];\n\t\tdy1 = sy[ 3 ] - ( S0*sy[4] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[3] );\n\t\tdy3 = sy[ 1 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 0 ] - ( S3*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\ti += 1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx1;\n\t\t\t\t\tiy += dy1;\n\t\t\t\t}\n\t\t\t\tix += dx2;\n\t\t\t\tiy += dy2;\n\t\t\t}\n\t\t\tix += dx3;\n\t\t\tiy += dy3;\n\t\t}\n\t\tix += dx4;\n\t\tiy += dy4;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary5d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a six-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary6d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary6d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 5 ];\n\t\tS1 = sh[ 4 ];\n\t\tS2 = sh[ 3 ];\n\t\tS3 = sh[ 2 ];\n\t\tS4 = sh[ 1 ];\n\t\tS5 = sh[ 0 ];\n\t\tdx0 = sx[ 5 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 4 ] - ( S0*sx[5] );\n\t\tdx2 = sx[ 3 ] - ( S1*sx[4] );\n\t\tdx3 = sx[ 2 ] - ( S2*sx[3] );\n\t\tdx4 = sx[ 1 ] - ( S3*sx[2] );\n\t\tdx5 = sx[ 0 ] - ( S4*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 5 ];\n\t\tdy1 = sy[ 4 ] - ( S0*sy[5] );\n\t\tdy2 = sy[ 3 ] - ( S1*sy[4] );\n\t\tdy3 = sy[ 2 ] - ( S2*sy[3] );\n\t\tdy4 = sy[ 1 ] - ( S3*sy[2] );\n\t\tdy5 = sy[ 0 ] - ( S4*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t\tiy += dy2;\n\t\t\t\t}\n\t\t\t\tix += dx3;\n\t\t\t\tiy += dy3;\n\t\t\t}\n\t\t\tix += dx4;\n\t\t\tiy += dy4;\n\t\t}\n\t\tix += dx5;\n\t\tiy += dy5;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary6d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a seven-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var real = require( '@stdlib/complex/real' );\n* var imag = require( '@stdlib/complex/imag' );\n*\n* function scale( z ) {\n* return new Complex64( real(z)*10.0, imag(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary7d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = real( v );\n* // returns 10.0\n*\n* var im = imag( v );\n* // returns 20.0\n*/\nfunction unary7d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 6 ];\n\t\tS1 = sh[ 5 ];\n\t\tS2 = sh[ 4 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 2 ];\n\t\tS5 = sh[ 1 ];\n\t\tS6 = sh[ 0 ];\n\t\tdx0 = sx[ 6 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 5 ] - ( S0*sx[6] );\n\t\tdx2 = sx[ 4 ] - ( S1*sx[5] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[4] );\n\t\tdx4 = sx[ 2 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 1 ] - ( S4*sx[2] );\n\t\tdx6 = sx[ 0 ] - ( S5*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 6 ];\n\t\tdy1 = sy[ 5 ] - ( S0*sy[6] );\n\t\tdy2 = sy[ 4 ] - ( S1*sy[5] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[4] );\n\t\tdy4 = sy[ 2 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 1 ] - ( S4*sy[2] );\n\t\tdy6 = sy[ 0 ] - ( S5*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx3;\n\t\t\t\t\tiy += dy3;\n\t\t\t\t}\n\t\t\t\tix += dx4;\n\t\t\t\tiy += dy4;\n\t\t\t}\n\t\t\tix += dx5;\n\t\t\tiy += dy5;\n\t\t}\n\t\tix += dx6;\n\t\tiy += dy6;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary7d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from an eight-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary8d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary8d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 7 ];\n\t\tS1 = sh[ 6 ];\n\t\tS2 = sh[ 5 ];\n\t\tS3 = sh[ 4 ];\n\t\tS4 = sh[ 3 ];\n\t\tS5 = sh[ 2 ];\n\t\tS6 = sh[ 1 ];\n\t\tS7 = sh[ 0 ];\n\t\tdx0 = sx[ 7 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 6 ] - ( S0*sx[7] );\n\t\tdx2 = sx[ 5 ] - ( S1*sx[6] );\n\t\tdx3 = sx[ 4 ] - ( S2*sx[5] );\n\t\tdx4 = sx[ 3 ] - ( S3*sx[4] );\n\t\tdx5 = sx[ 2 ] - ( S4*sx[3] );\n\t\tdx6 = sx[ 1 ] - ( S5*sx[2] );\n\t\tdx7 = sx[ 0 ] - ( S6*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 7 ];\n\t\tdy1 = sy[ 6 ] - ( S0*sy[7] );\n\t\tdy2 = sy[ 5 ] - ( S1*sy[6] );\n\t\tdy3 = sy[ 4 ] - ( S2*sy[5] );\n\t\tdy4 = sy[ 3 ] - ( S3*sy[4] );\n\t\tdy5 = sy[ 2 ] - ( S4*sy[3] );\n\t\tdy6 = sy[ 1 ] - ( S5*sy[2] );\n\t\tdy7 = sy[ 0 ] - ( S6*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx4;\n\t\t\t\t\tiy += dy4;\n\t\t\t\t}\n\t\t\t\tix += dx5;\n\t\t\t\tiy += dy5;\n\t\t\t}\n\t\t\tix += dx6;\n\t\t\tiy += dy6;\n\t\t}\n\t\tix += dx7;\n\t\tiy += dy7;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary8d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a nine-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary9d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary9d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 8 ];\n\t\tS1 = sh[ 7 ];\n\t\tS2 = sh[ 6 ];\n\t\tS3 = sh[ 5 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 3 ];\n\t\tS6 = sh[ 2 ];\n\t\tS7 = sh[ 1 ];\n\t\tS8 = sh[ 0 ];\n\t\tdx0 = sx[ 8 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 7 ] - ( S0*sx[8] );\n\t\tdx2 = sx[ 6 ] - ( S1*sx[7] );\n\t\tdx3 = sx[ 5 ] - ( S2*sx[6] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[5] );\n\t\tdx5 = sx[ 3 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 2 ] - ( S5*sx[3] );\n\t\tdx7 = sx[ 1 ] - ( S6*sx[2] );\n\t\tdx8 = sx[ 0 ] - ( S7*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 8 ];\n\t\tdy1 = sy[ 7 ] - ( S0*sy[8] );\n\t\tdy2 = sy[ 6 ] - ( S1*sy[7] );\n\t\tdy3 = sy[ 5 ] - ( S2*sy[6] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[5] );\n\t\tdy5 = sy[ 3 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 2 ] - ( S5*sy[3] );\n\t\tdy7 = sy[ 1 ] - ( S6*sy[2] );\n\t\tdy8 = sy[ 0 ] - ( S7*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t\tdy8 = sy[ 8 ] - ( S7*sy[7] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx5;\n\t\t\t\t\tiy += dy5;\n\t\t\t\t}\n\t\t\t\tix += dx6;\n\t\t\t\tiy += dy6;\n\t\t\t}\n\t\t\tix += dx7;\n\t\t\tiy += dy7;\n\t\t}\n\t\tix += dx8;\n\t\tiy += dy8;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary9d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a ten-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n* var sy = [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unary10d( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unary10d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar get;\n\tvar set;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar dy9;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar S9;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 9 ];\n\t\tS1 = sh[ 8 ];\n\t\tS2 = sh[ 7 ];\n\t\tS3 = sh[ 6 ];\n\t\tS4 = sh[ 5 ];\n\t\tS5 = sh[ 4 ];\n\t\tS6 = sh[ 3 ];\n\t\tS7 = sh[ 2 ];\n\t\tS8 = sh[ 1 ];\n\t\tS9 = sh[ 0 ];\n\t\tdx0 = sx[ 9 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 8 ] - ( S0*sx[9] );\n\t\tdx2 = sx[ 7 ] - ( S1*sx[8] );\n\t\tdx3 = sx[ 6 ] - ( S2*sx[7] );\n\t\tdx4 = sx[ 5 ] - ( S3*sx[6] );\n\t\tdx5 = sx[ 4 ] - ( S4*sx[5] );\n\t\tdx6 = sx[ 3 ] - ( S5*sx[4] );\n\t\tdx7 = sx[ 2 ] - ( S6*sx[3] );\n\t\tdx8 = sx[ 1 ] - ( S7*sx[2] );\n\t\tdx9 = sx[ 0 ] - ( S8*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 9 ];\n\t\tdy1 = sy[ 8 ] - ( S0*sy[9] );\n\t\tdy2 = sy[ 7 ] - ( S1*sy[8] );\n\t\tdy3 = sy[ 6 ] - ( S2*sy[7] );\n\t\tdy4 = sy[ 5 ] - ( S3*sy[6] );\n\t\tdy5 = sy[ 4 ] - ( S4*sy[5] );\n\t\tdy6 = sy[ 3 ] - ( S5*sy[4] );\n\t\tdy7 = sy[ 2 ] - ( S6*sy[3] );\n\t\tdy8 = sy[ 1 ] - ( S7*sy[2] );\n\t\tdy9 = sy[ 0 ] - ( S8*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tS9 = sh[ 9 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] );\n\t\tdx9 = sx[ 9 ] - ( S8*sx[8] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t\tdy8 = sy[ 8 ] - ( S7*sy[7] );\n\t\tdy9 = sy[ 9 ] - ( S8*sy[8] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i9 = 0; i9 < S9; i9++ ) {\n\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx6;\n\t\t\t\t\tiy += dy6;\n\t\t\t\t}\n\t\t\t\tix += dx7;\n\t\t\t\tiy += dy7;\n\t\t\t}\n\t\t\tix += dx8;\n\t\t\tiy += dy8;\n\t\t}\n\t\tix += dx9;\n\t\tiy += dy9;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary10d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar numel = require( './../../../base/numel' );\nvar vind2bind = require( './../../../base/vind2bind' );\n\n\n// VARIABLES //\n\nvar MODE = 'throw';\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from an n-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} x.accessors - data buffer accessors\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Array} y.accessors - data buffer accessors\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var cidentityf = require( '@stdlib/math/base/special/cidentityf' );\n* var Complex64Array = require( '@stdlib/array/complex64' );\n* var Complex64 = require( '@stdlib/complex/float32' );\n* var realf = require( '@stdlib/complex/realf' );\n* var imagf = require( '@stdlib/complex/imagf' );\n*\n* function scale( z ) {\n* return new Complex64( realf(z)*10.0, imagf(z)*10.0 );\n* }\n*\n* // Create data buffers:\n* var xbuf = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Complex64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 2, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 0;\n* var oy = 0;\n*\n* // Define getters and setters:\n* function getter( buf, idx ) {\n* return buf.get( idx );\n* }\n*\n* function setter( buf, idx, value ) {\n* buf.set( value, idx );\n* }\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'complex64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n* var y = {\n* 'dtype': 'complex64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major',\n* 'accessors': [ getter, setter ]\n* };\n*\n* // Apply the unary function:\n* unarynd( x, y, scale, cidentityf );\n*\n* var v = y.data.get( 0 );\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 20.0\n*/\nfunction unarynd( x, y, fcn, clbk, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar ordx;\n\tvar ordy;\n\tvar len;\n\tvar get;\n\tvar set;\n\tvar sh;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar v;\n\tvar i;\n\n\tsh = x.shape;\n\n\t// Compute the total number of elements over which to iterate:\n\tlen = numel( sh );\n\n\t// Cache references to the input and output ndarray data buffers:\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache references to the respective stride arrays:\n\tsx = x.strides;\n\tsy = y.strides;\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays:\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache the respective array orders:\n\tordx = x.order;\n\tordy = y.order;\n\n\t// Cache accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\t// Iterate over each element based on the linear **view** index, regardless as to how the data is stored in memory...\n\tfor ( i = 0; i < len; i++ ) {\n\t\tix = vind2bind( sh, sx, ox, ordx, i, MODE );\n\t\tiy = vind2bind( sh, sy, oy, ordy, i, MODE );\n\t\tv = clbk.call( thisArg, get( xbuf, ix ), i, [ ix, iy ], [ x, y ] );\n\t\tif ( v !== void 0 ) {\n\t\t\tset( ybuf, iy, fcn( v ) );\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unarynd;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a zero-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0 ] );\n* var ybuf = new Float64Array( 1 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [];\n*\n* // Define the array strides:\n* var sx = [ 0 ];\n* var sy = [ 0 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary0d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0 ]\n*/\nfunction unary0d( x, y, fcn, clbk, thisArg ) {\n\tvar ox = x.offset;\n\tvar oy = y.offset;\n\tvar v = clbk.call( thisArg, x.data[ ox ], 0, [ ox, oy ], [ x, y ] );\n\tif ( v !== void 0 ) {\n\t\ty.data[ oy ] = fcn( v );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary0d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a one-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Float64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 4 ];\n*\n* // Define the array strides:\n* var sx = [ 2 ];\n* var sy = [ 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary1d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40, 80, 120, 160 ]\n*/\nfunction unary1d( x, y, fcn, clbk, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dy0;\n\tvar S0;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables: dimensions and loop offset (pointer) increments...\n\tS0 = x.shape[ 0 ];\n\tdx0 = x.strides[ 0 ];\n\tdy0 = y.strides[ 0 ];\n\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\tif ( v !== void 0 ) {\n\t\t\tybuf[ iy ] = fcn( v );\n\t\t}\n\t\tix += dx0;\n\t\tiy += dy0;\n\t\ti += 1;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary1d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a two-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Float64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary2d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0 ]\n*/\nfunction unary2d( x, y, fcn, clbk, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dy0;\n\tvar dy1;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 1 ];\n\t\tS1 = sh[ 0 ];\n\t\tdx0 = sx[ 1 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 0 ] - ( S0*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 1 ];\n\t\tdy1 = sy[ 0 ] - ( S0*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\t\tif ( v !== void 0 ) {\n\t\t\t\tybuf[ iy ] = fcn( v );\n\t\t\t}\n\t\t\tix += dx0;\n\t\t\tiy += dy0;\n\t\t\ti += 1;\n\t\t}\n\t\tix += dx1;\n\t\tiy += dy1;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary2d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a three-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n* var sy = [ 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary3d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction unary3d( x, y, fcn, clbk, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 2 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 0 ];\n\t\tdx0 = sx[ 2 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[2] );\n\t\tdx2 = sx[ 0 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 2 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[2] );\n\t\tdy2 = sy[ 0 ] - ( S1*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\tybuf[ iy ] = fcn( v );\n\t\t\t\t}\n\t\t\t\tix += dx0;\n\t\t\t\tiy += dy0;\n\t\t\t\ti += 1;\n\t\t\t}\n\t\t\tix += dx1;\n\t\t\tiy += dy1;\n\t\t}\n\t\tix += dx2;\n\t\tiy += dy2;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary3d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/* eslint-disable max-len */\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a four-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 4, 4, 1 ];\n* var sy = [ 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary4d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction unary4d( x, y, fcn, clbk, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 3 ];\n\t\tS1 = sh[ 2 ];\n\t\tS2 = sh[ 1 ];\n\t\tS3 = sh[ 0 ];\n\t\tdx0 = sx[ 3 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 2 ] - ( S0*sx[3] );\n\t\tdx2 = sx[ 1 ] - ( S1*sx[2] );\n\t\tdx3 = sx[ 0 ] - ( S2*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 3 ];\n\t\tdy1 = sy[ 2 ] - ( S0*sy[3] );\n\t\tdy2 = sy[ 1 ] - ( S1*sy[2] );\n\t\tdy3 = sy[ 0 ] - ( S2*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\tybuf[ iy ] = fcn( v );\n\t\t\t\t\t}\n\t\t\t\t\tix += dx0;\n\t\t\t\t\tiy += dy0;\n\t\t\t\t\ti += 1;\n\t\t\t\t}\n\t\t\t\tix += dx1;\n\t\t\t\tiy += dy1;\n\t\t\t}\n\t\t\tix += dx2;\n\t\t\tiy += dy2;\n\t\t}\n\t\tix += dx3;\n\t\tiy += dy3;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary4d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/* eslint-disable max-depth, max-len */\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a five-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary5d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction unary5d( x, y, fcn, clbk, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 4 ];\n\t\tS1 = sh[ 3 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 1 ];\n\t\tS4 = sh[ 0 ];\n\t\tdx0 = sx[ 4 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 3 ] - ( S0*sx[4] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[3] );\n\t\tdx3 = sx[ 1 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 0 ] - ( S3*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 4 ];\n\t\tdy1 = sy[ 3 ] - ( S0*sy[4] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[3] );\n\t\tdy3 = sy[ 1 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 0 ] - ( S3*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\tybuf[ iy ] = fcn( v );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\ti += 1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx1;\n\t\t\t\t\tiy += dy1;\n\t\t\t\t}\n\t\t\t\tix += dx2;\n\t\t\t\tiy += dy2;\n\t\t\t}\n\t\t\tix += dx3;\n\t\t\tiy += dy3;\n\t\t}\n\t\tix += dx4;\n\t\tiy += dy4;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary5d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a six-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary6d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction unary6d( x, y, fcn, clbk, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 5 ];\n\t\tS1 = sh[ 4 ];\n\t\tS2 = sh[ 3 ];\n\t\tS3 = sh[ 2 ];\n\t\tS4 = sh[ 1 ];\n\t\tS5 = sh[ 0 ];\n\t\tdx0 = sx[ 5 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 4 ] - ( S0*sx[5] );\n\t\tdx2 = sx[ 3 ] - ( S1*sx[4] );\n\t\tdx3 = sx[ 2 ] - ( S2*sx[3] );\n\t\tdx4 = sx[ 1 ] - ( S3*sx[2] );\n\t\tdx5 = sx[ 0 ] - ( S4*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 5 ];\n\t\tdy1 = sy[ 4 ] - ( S0*sy[5] );\n\t\tdy2 = sy[ 3 ] - ( S1*sy[4] );\n\t\tdy3 = sy[ 2 ] - ( S2*sy[3] );\n\t\tdy4 = sy[ 1 ] - ( S3*sy[2] );\n\t\tdy5 = sy[ 0 ] - ( S4*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( v );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx2;\n\t\t\t\t\tiy += dy2;\n\t\t\t\t}\n\t\t\t\tix += dx3;\n\t\t\t\tiy += dy3;\n\t\t\t}\n\t\t\tix += dx4;\n\t\t\tiy += dy4;\n\t\t}\n\t\tix += dx5;\n\t\tiy += dy5;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary6d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a seven-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary7d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction unary7d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 6 ];\n\t\tS1 = sh[ 5 ];\n\t\tS2 = sh[ 4 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 2 ];\n\t\tS5 = sh[ 1 ];\n\t\tS6 = sh[ 0 ];\n\t\tdx0 = sx[ 6 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 5 ] - ( S0*sx[6] );\n\t\tdx2 = sx[ 4 ] - ( S1*sx[5] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[4] );\n\t\tdx4 = sx[ 2 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 1 ] - ( S4*sx[2] );\n\t\tdx6 = sx[ 0 ] - ( S5*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 6 ];\n\t\tdy1 = sy[ 5 ] - ( S0*sy[6] );\n\t\tdy2 = sy[ 4 ] - ( S1*sy[5] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[4] );\n\t\tdy4 = sy[ 2 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 1 ] - ( S4*sy[2] );\n\t\tdy6 = sy[ 0 ] - ( S5*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( v );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx3;\n\t\t\t\t\tiy += dy3;\n\t\t\t\t}\n\t\t\t\tix += dx4;\n\t\t\t\tiy += dy4;\n\t\t\t}\n\t\t\tix += dx5;\n\t\t\tiy += dy5;\n\t\t}\n\t\tix += dx6;\n\t\tiy += dy6;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary7d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from an eight-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary8d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction unary8d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 7 ];\n\t\tS1 = sh[ 6 ];\n\t\tS2 = sh[ 5 ];\n\t\tS3 = sh[ 4 ];\n\t\tS4 = sh[ 3 ];\n\t\tS5 = sh[ 2 ];\n\t\tS6 = sh[ 1 ];\n\t\tS7 = sh[ 0 ];\n\t\tdx0 = sx[ 7 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 6 ] - ( S0*sx[7] );\n\t\tdx2 = sx[ 5 ] - ( S1*sx[6] );\n\t\tdx3 = sx[ 4 ] - ( S2*sx[5] );\n\t\tdx4 = sx[ 3 ] - ( S3*sx[4] );\n\t\tdx5 = sx[ 2 ] - ( S4*sx[3] );\n\t\tdx6 = sx[ 1 ] - ( S5*sx[2] );\n\t\tdx7 = sx[ 0 ] - ( S6*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 7 ];\n\t\tdy1 = sy[ 6 ] - ( S0*sy[7] );\n\t\tdy2 = sy[ 5 ] - ( S1*sy[6] );\n\t\tdy3 = sy[ 4 ] - ( S2*sy[5] );\n\t\tdy4 = sy[ 3 ] - ( S3*sy[4] );\n\t\tdy5 = sy[ 2 ] - ( S4*sy[3] );\n\t\tdy6 = sy[ 1 ] - ( S5*sy[2] );\n\t\tdy7 = sy[ 0 ] - ( S6*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( v );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx4;\n\t\t\t\t\tiy += dy4;\n\t\t\t\t}\n\t\t\t\tix += dx5;\n\t\t\t\tiy += dy5;\n\t\t\t}\n\t\t\tix += dx6;\n\t\t\tiy += dy6;\n\t\t}\n\t\tix += dx7;\n\t\tiy += dy7;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary8d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a nine-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary9d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction unary9d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 8 ];\n\t\tS1 = sh[ 7 ];\n\t\tS2 = sh[ 6 ];\n\t\tS3 = sh[ 5 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 3 ];\n\t\tS6 = sh[ 2 ];\n\t\tS7 = sh[ 1 ];\n\t\tS8 = sh[ 0 ];\n\t\tdx0 = sx[ 8 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 7 ] - ( S0*sx[8] );\n\t\tdx2 = sx[ 6 ] - ( S1*sx[7] );\n\t\tdx3 = sx[ 5 ] - ( S2*sx[6] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[5] );\n\t\tdx5 = sx[ 3 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 2 ] - ( S5*sx[3] );\n\t\tdx7 = sx[ 1 ] - ( S6*sx[2] );\n\t\tdx8 = sx[ 0 ] - ( S7*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 8 ];\n\t\tdy1 = sy[ 7 ] - ( S0*sy[8] );\n\t\tdy2 = sy[ 6 ] - ( S1*sy[7] );\n\t\tdy3 = sy[ 5 ] - ( S2*sy[6] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[5] );\n\t\tdy5 = sy[ 3 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 2 ] - ( S5*sy[3] );\n\t\tdy7 = sy[ 1 ] - ( S6*sy[2] );\n\t\tdy8 = sy[ 0 ] - ( S7*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t\tdy8 = sy[ 8 ] - ( S7*sy[7] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( v );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx5;\n\t\t\t\t\tiy += dy5;\n\t\t\t\t}\n\t\t\t\tix += dx6;\n\t\t\t\tiy += dy6;\n\t\t\t}\n\t\t\tix += dx7;\n\t\t\tiy += dy7;\n\t\t}\n\t\tix += dx8;\n\t\tiy += dy8;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary9d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-depth, max-len */\n\n'use strict';\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from a ten-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 1, 1, 1, 1, 1, 1, 1, 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 12, 12, 12, 12, 12, 12, 12, 4, 4, 1 ];\n* var sy = [ 6, 6, 6, 6, 6, 6, 6, 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unary10d( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction unary10d( x, y, fcn, clbk, thisArg ) { // eslint-disable-line max-statements\n\tvar xbuf;\n\tvar ybuf;\n\tvar dx0;\n\tvar dx1;\n\tvar dx2;\n\tvar dx3;\n\tvar dx4;\n\tvar dx5;\n\tvar dx6;\n\tvar dx7;\n\tvar dx8;\n\tvar dx9;\n\tvar dy0;\n\tvar dy1;\n\tvar dy2;\n\tvar dy3;\n\tvar dy4;\n\tvar dy5;\n\tvar dy6;\n\tvar dy7;\n\tvar dy8;\n\tvar dy9;\n\tvar sh;\n\tvar S0;\n\tvar S1;\n\tvar S2;\n\tvar S3;\n\tvar S4;\n\tvar S5;\n\tvar S6;\n\tvar S7;\n\tvar S8;\n\tvar S9;\n\tvar sx;\n\tvar sy;\n\tvar ix;\n\tvar iy;\n\tvar i0;\n\tvar i1;\n\tvar i2;\n\tvar i3;\n\tvar i4;\n\tvar i5;\n\tvar i6;\n\tvar i7;\n\tvar i8;\n\tvar i9;\n\tvar v;\n\tvar i;\n\n\t// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...\n\n\t// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...\n\tsh = x.shape;\n\tsx = x.strides;\n\tsy = y.strides;\n\tif ( x.order === 'row-major' ) {\n\t\t// For row-major ndarrays, the last dimensions have the fastest changing indices...\n\t\tS0 = sh[ 9 ];\n\t\tS1 = sh[ 8 ];\n\t\tS2 = sh[ 7 ];\n\t\tS3 = sh[ 6 ];\n\t\tS4 = sh[ 5 ];\n\t\tS5 = sh[ 4 ];\n\t\tS6 = sh[ 3 ];\n\t\tS7 = sh[ 2 ];\n\t\tS8 = sh[ 1 ];\n\t\tS9 = sh[ 0 ];\n\t\tdx0 = sx[ 9 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 8 ] - ( S0*sx[9] );\n\t\tdx2 = sx[ 7 ] - ( S1*sx[8] );\n\t\tdx3 = sx[ 6 ] - ( S2*sx[7] );\n\t\tdx4 = sx[ 5 ] - ( S3*sx[6] );\n\t\tdx5 = sx[ 4 ] - ( S4*sx[5] );\n\t\tdx6 = sx[ 3 ] - ( S5*sx[4] );\n\t\tdx7 = sx[ 2 ] - ( S6*sx[3] );\n\t\tdx8 = sx[ 1 ] - ( S7*sx[2] );\n\t\tdx9 = sx[ 0 ] - ( S8*sx[1] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 9 ];\n\t\tdy1 = sy[ 8 ] - ( S0*sy[9] );\n\t\tdy2 = sy[ 7 ] - ( S1*sy[8] );\n\t\tdy3 = sy[ 6 ] - ( S2*sy[7] );\n\t\tdy4 = sy[ 5 ] - ( S3*sy[6] );\n\t\tdy5 = sy[ 4 ] - ( S4*sy[5] );\n\t\tdy6 = sy[ 3 ] - ( S5*sy[4] );\n\t\tdy7 = sy[ 2 ] - ( S6*sy[3] );\n\t\tdy8 = sy[ 1 ] - ( S7*sy[2] );\n\t\tdy9 = sy[ 0 ] - ( S8*sy[1] );\n\t} else { // order === 'column-major'\n\t\t// For column-major ndarrays, the first dimensions have the fastest changing indices...\n\t\tS0 = sh[ 0 ];\n\t\tS1 = sh[ 1 ];\n\t\tS2 = sh[ 2 ];\n\t\tS3 = sh[ 3 ];\n\t\tS4 = sh[ 4 ];\n\t\tS5 = sh[ 5 ];\n\t\tS6 = sh[ 6 ];\n\t\tS7 = sh[ 7 ];\n\t\tS8 = sh[ 8 ];\n\t\tS9 = sh[ 9 ];\n\t\tdx0 = sx[ 0 ]; // offset increment for innermost loop\n\t\tdx1 = sx[ 1 ] - ( S0*sx[0] );\n\t\tdx2 = sx[ 2 ] - ( S1*sx[1] );\n\t\tdx3 = sx[ 3 ] - ( S2*sx[2] );\n\t\tdx4 = sx[ 4 ] - ( S3*sx[3] );\n\t\tdx5 = sx[ 5 ] - ( S4*sx[4] );\n\t\tdx6 = sx[ 6 ] - ( S5*sx[5] );\n\t\tdx7 = sx[ 7 ] - ( S6*sx[6] );\n\t\tdx8 = sx[ 8 ] - ( S7*sx[7] );\n\t\tdx9 = sx[ 9 ] - ( S8*sx[8] ); // offset increment for outermost loop\n\t\tdy0 = sy[ 0 ];\n\t\tdy1 = sy[ 1 ] - ( S0*sy[0] );\n\t\tdy2 = sy[ 2 ] - ( S1*sy[1] );\n\t\tdy3 = sy[ 3 ] - ( S2*sy[2] );\n\t\tdy4 = sy[ 4 ] - ( S3*sy[3] );\n\t\tdy5 = sy[ 5 ] - ( S4*sy[4] );\n\t\tdy6 = sy[ 6 ] - ( S5*sy[5] );\n\t\tdy7 = sy[ 7 ] - ( S6*sy[6] );\n\t\tdy8 = sy[ 8 ] - ( S7*sy[7] );\n\t\tdy9 = sy[ 9 ] - ( S8*sy[8] );\n\t}\n\t// Set the pointers to the first indexed elements in the respective ndarrays...\n\tix = x.offset;\n\tiy = y.offset;\n\n\t// Cache references to the input and output ndarray buffers...\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Iterate over the ndarray dimensions...\n\ti = 0;\n\tfor ( i9 = 0; i9 < S9; i9++ ) {\n\t\tfor ( i8 = 0; i8 < S8; i8++ ) {\n\t\t\tfor ( i7 = 0; i7 < S7; i7++ ) {\n\t\t\t\tfor ( i6 = 0; i6 < S6; i6++ ) {\n\t\t\t\t\tfor ( i5 = 0; i5 < S5; i5++ ) {\n\t\t\t\t\t\tfor ( i4 = 0; i4 < S4; i4++ ) {\n\t\t\t\t\t\t\tfor ( i3 = 0; i3 < S3; i3++ ) {\n\t\t\t\t\t\t\t\tfor ( i2 = 0; i2 < S2; i2++ ) {\n\t\t\t\t\t\t\t\t\tfor ( i1 = 0; i1 < S1; i1++ ) {\n\t\t\t\t\t\t\t\t\t\tfor ( i0 = 0; i0 < S0; i0++ ) {\n\t\t\t\t\t\t\t\t\t\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\t\t\t\t\t\t\t\t\t\tif ( v !== void 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\tybuf[ iy ] = fcn( v );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tix += dx0;\n\t\t\t\t\t\t\t\t\t\t\tiy += dy0;\n\t\t\t\t\t\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tix += dx1;\n\t\t\t\t\t\t\t\t\t\tiy += dy1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tix += dx2;\n\t\t\t\t\t\t\t\t\tiy += dy2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tix += dx3;\n\t\t\t\t\t\t\t\tiy += dy3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tix += dx4;\n\t\t\t\t\t\t\tiy += dy4;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tix += dx5;\n\t\t\t\t\t\tiy += dy5;\n\t\t\t\t\t}\n\t\t\t\t\tix += dx6;\n\t\t\t\t\tiy += dy6;\n\t\t\t\t}\n\t\t\t\tix += dx7;\n\t\t\t\tiy += dy7;\n\t\t\t}\n\t\t\tix += dx8;\n\t\t\tiy += dy8;\n\t\t}\n\t\tix += dx9;\n\t\tiy += dy9;\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unary10d;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar numel = require( './../../../base/numel' );\nvar vind2bind = require( './../../../base/vind2bind' );\n\n\n// VARIABLES //\n\nvar MODE = 'throw';\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from an n-dimensional input ndarray according to a callback function and assigns results to elements in an equivalently shaped output ndarray.\n*\n* @private\n* @param {Object} x - object containing input ndarray meta data\n* @param {string} x.dtype - data type\n* @param {Collection} x.data - data buffer\n* @param {NonNegativeIntegerArray} x.shape - dimensions\n* @param {IntegerArray} x.strides - stride lengths\n* @param {NonNegativeInteger} x.offset - index offset\n* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)\n* @param {Object} y - object containing output ndarray meta data\n* @param {string} y.dtype - data type\n* @param {Collection} y.data - data buffer\n* @param {NonNegativeIntegerArray} y.shape - dimensions\n* @param {IntegerArray} y.strides - stride lengths\n* @param {NonNegativeInteger} y.offset - index offset\n* @param {string} y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );\n* var ybuf = new Float64Array( 4 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 2, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 1 ];\n* var sy = [ 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unarynd( x, y, scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0 ]\n*/\nfunction unarynd( x, y, fcn, clbk, thisArg ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar ordx;\n\tvar ordy;\n\tvar len;\n\tvar sh;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ix;\n\tvar iy;\n\tvar v;\n\tvar i;\n\n\tsh = x.shape;\n\n\t// Compute the total number of elements over which to iterate:\n\tlen = numel( sh );\n\n\t// Cache references to the input and output ndarray data buffers:\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache references to the respective stride arrays:\n\tsx = x.strides;\n\tsy = y.strides;\n\n\t// Cache the indices of the first indexed elements in the respective ndarrays:\n\tox = x.offset;\n\toy = y.offset;\n\n\t// Cache the respective array orders:\n\tordx = x.order;\n\tordy = y.order;\n\n\t// Iterate over each element based on the linear **view** index, regardless as to how the data is stored in memory...\n\tfor ( i = 0; i < len; i++ ) {\n\t\tix = vind2bind( sh, sx, ox, ordx, i, MODE );\n\t\tiy = vind2bind( sh, sy, oy, ordy, i, MODE );\n\t\tv = clbk.call( thisArg, xbuf[ ix ], i, [ ix, iy ], [ x, y ] );\n\t\tif ( v !== void 0 ) {\n\t\t\tybuf[ iy ] = fcn( v );\n\t\t}\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = unarynd;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar iterationOrder = require( './../../../base/iteration-order' );\nvar minmaxViewBufferIndex = require( './../../../base/minmax-view-buffer-index' );\nvar ndarray2object = require( './../../../base/ndarraylike2object' );\nvar blockedaccessorunary2d = require( './2d_blocked_accessors.js' );\nvar blockedaccessorunary3d = require( './3d_blocked_accessors.js' );\nvar blockedaccessorunary4d = require( './4d_blocked_accessors.js' );\nvar blockedaccessorunary5d = require( './5d_blocked_accessors.js' );\nvar blockedaccessorunary6d = require( './6d_blocked_accessors.js' );\nvar blockedaccessorunary7d = require( './7d_blocked_accessors.js' );\nvar blockedaccessorunary8d = require( './8d_blocked_accessors.js' );\nvar blockedaccessorunary9d = require( './9d_blocked_accessors.js' );\nvar blockedaccessorunary10d = require( './10d_blocked_accessors.js' );\nvar blockedunary2d = require( './2d_blocked.js' );\nvar blockedunary3d = require( './3d_blocked.js' );\nvar blockedunary4d = require( './4d_blocked.js' );\nvar blockedunary5d = require( './5d_blocked.js' );\nvar blockedunary6d = require( './6d_blocked.js' );\nvar blockedunary7d = require( './7d_blocked.js' );\nvar blockedunary8d = require( './8d_blocked.js' );\nvar blockedunary9d = require( './9d_blocked.js' );\nvar blockedunary10d = require( './10d_blocked.js' );\nvar accessorunary0d = require( './0d_accessors.js' );\nvar accessorunary1d = require( './1d_accessors.js' );\nvar accessorunary2d = require( './2d_accessors.js' );\nvar accessorunary3d = require( './3d_accessors.js' );\nvar accessorunary4d = require( './4d_accessors.js' );\nvar accessorunary5d = require( './5d_accessors.js' );\nvar accessorunary6d = require( './6d_accessors.js' );\nvar accessorunary7d = require( './7d_accessors.js' );\nvar accessorunary8d = require( './8d_accessors.js' );\nvar accessorunary9d = require( './9d_accessors.js' );\nvar accessorunary10d = require( './10d_accessors.js' );\nvar accessorunarynd = require( './nd_accessors.js' );\nvar unary0d = require( './0d.js' );\nvar unary1d = require( './1d.js' );\nvar unary2d = require( './2d.js' );\nvar unary3d = require( './3d.js' );\nvar unary4d = require( './4d.js' );\nvar unary5d = require( './5d.js' );\nvar unary6d = require( './6d.js' );\nvar unary7d = require( './7d.js' );\nvar unary8d = require( './8d.js' );\nvar unary9d = require( './9d.js' );\nvar unary10d = require( './10d.js' );\nvar unarynd = require( './nd.js' );\n\n\n// VARIABLES //\n\nvar UNARY = [\n\tunary0d,\n\tunary1d,\n\tunary2d,\n\tunary3d,\n\tunary4d,\n\tunary5d,\n\tunary6d,\n\tunary7d,\n\tunary8d,\n\tunary9d,\n\tunary10d\n];\nvar ACCESSOR_UNARY = [\n\taccessorunary0d,\n\taccessorunary1d,\n\taccessorunary2d,\n\taccessorunary3d,\n\taccessorunary4d,\n\taccessorunary5d,\n\taccessorunary6d,\n\taccessorunary7d,\n\taccessorunary8d,\n\taccessorunary9d,\n\taccessorunary10d\n];\nvar BLOCKED_UNARY = [\n\tblockedunary2d, // 0\n\tblockedunary3d,\n\tblockedunary4d,\n\tblockedunary5d,\n\tblockedunary6d,\n\tblockedunary7d,\n\tblockedunary8d,\n\tblockedunary9d,\n\tblockedunary10d // 8\n];\nvar BLOCKED_ACCESSOR_UNARY = [\n\tblockedaccessorunary2d, // 0\n\tblockedaccessorunary3d,\n\tblockedaccessorunary4d,\n\tblockedaccessorunary5d,\n\tblockedaccessorunary6d,\n\tblockedaccessorunary7d,\n\tblockedaccessorunary8d,\n\tblockedaccessorunary9d,\n\tblockedaccessorunary10d // 8\n];\nvar MAX_DIMS = UNARY.length - 1;\n\n\n// MAIN //\n\n/**\n* Applies a unary function to each element retrieved from an input ndarray according to a callback function and assigns results to elements in an output ndarray.\n*\n* ## Notes\n*\n* - Each provided ndarray should be an `object` with the following properties:\n*\n* - **dtype**: data type.\n* - **data**: data buffer.\n* - **shape**: dimensions.\n* - **strides**: stride lengths.\n* - **offset**: index offset.\n* - **order**: specifies whether an ndarray is row-major (C-style) or column major (Fortran-style).\n*\n* @param {ArrayLikeObject} arrays - array-like object containing one input array and one output array\n* @param {Function} fcn - unary function to apply to callback return values\n* @param {Callback} clbk - callback\n* @param {*} [thisArg] - callback execution context\n* @throws {Error} arrays must have the same number of dimensions\n* @throws {Error} arrays must have the same shape\n* @returns {void}\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n* var sy = [ 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unaryBy( [ x, y ], scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\nfunction unaryBy( arrays, fcn, clbk, thisArg ) {\n\tvar ndims;\n\tvar xmmv;\n\tvar ymmv;\n\tvar shx;\n\tvar shy;\n\tvar iox;\n\tvar ioy;\n\tvar len;\n\tvar sx;\n\tvar sy;\n\tvar ox;\n\tvar oy;\n\tvar ns;\n\tvar x;\n\tvar y;\n\tvar d;\n\tvar i;\n\n\t// Unpack the ndarrays and standardize ndarray meta data:\n\tx = ndarray2object( arrays[ 0 ] );\n\ty = ndarray2object( arrays[ 1 ] );\n\n\t// Verify that the input and output arrays have the same number of dimensions...\n\tshx = x.shape;\n\tshy = y.shape;\n\tndims = shx.length;\n\tif ( ndims !== shy.length ) {\n\t\tthrow new Error( 'invalid arguments. Arrays must have the same number of dimensions (i.e., same rank). ndims(x) == '+ndims+'. ndims(y) == '+shy.length+'.' );\n\t}\n\t// Determine whether we can avoid iteration altogether...\n\tif ( ndims === 0 ) {\n\t\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\t\treturn ACCESSOR_UNARY[ ndims ]( x, y, fcn, clbk, thisArg );\n\t\t}\n\t\treturn UNARY[ ndims ]( x, y, fcn, clbk, thisArg );\n\t}\n\t// Verify that the input and output arrays have the same dimensions...\n\tlen = 1; // number of elements\n\tns = 0; // number of singleton dimensions\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\td = shx[ i ];\n\t\tif ( d !== shy[ i ] ) {\n\t\t\tthrow new Error( 'invalid arguments. Arrays must have the same shape.' );\n\t\t}\n\t\t// Note that, if one of the dimensions is `0`, the length will be `0`...\n\t\tlen *= d;\n\n\t\t// Check whether the current dimension is a singleton dimension...\n\t\tif ( d === 1 ) {\n\t\t\tns += 1;\n\t\t}\n\t}\n\t// Check whether we were provided empty ndarrays...\n\tif ( len === 0 ) {\n\t\treturn;\n\t}\n\t// Determine whether the ndarrays are one-dimensional and thus readily translate to one-dimensional strided arrays...\n\tif ( ndims === 1 ) {\n\t\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\t\treturn ACCESSOR_UNARY[ ndims ]( x, y, fcn, clbk, thisArg );\n\t\t}\n\t\treturn UNARY[ ndims ]( x, y, fcn, clbk, thisArg );\n\t}\n\tsx = x.strides;\n\tsy = y.strides;\n\n\t// Determine whether the ndarray has only **one** non-singleton dimension (e.g., ndims=4, shape=[10,1,1,1]) so that we can treat the ndarrays as being equivalent to one-dimensional strided arrays...\n\tif ( ns === ndims-1 ) {\n\t\t// Get the index of the non-singleton dimension...\n\t\tfor ( i = 0; i < ndims; i++ ) {\n\t\t\tif ( shx[ i ] !== 1 ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tx.shape = [ shx[i] ];\n\t\ty.shape = x.shape;\n\t\tx.strides = [ sx[i] ];\n\t\ty.strides = [ sy[i] ];\n\t\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\t\treturn ACCESSOR_UNARY[ 1 ]( x, y, fcn, clbk, thisArg );\n\t\t}\n\t\treturn UNARY[ 1 ]( x, y, fcn, clbk, thisArg );\n\t}\n\tiox = iterationOrder( sx ); // +/-1\n\tioy = iterationOrder( sy ); // +/-1\n\n\t// Determine whether we can avoid blocked iteration...\n\tif ( iox !== 0 && ioy !== 0 && x.order === y.order ) {\n\t\t// Determine the minimum and maximum linear indices which are accessible by the array views:\n\t\txmmv = minmaxViewBufferIndex( shx, sx, x.offset );\n\t\tymmv = minmaxViewBufferIndex( shy, sy, y.offset );\n\n\t\t// Determine whether we can ignore shape (and strides) and treat the ndarrays as linear one-dimensional strided arrays...\n\t\tif ( len === ( xmmv[1]-xmmv[0]+1 ) && len === ( ymmv[1]-ymmv[0]+1 ) ) {\n\t\t\t// Note: the above is equivalent to @stdlib/ndarray/base/assert/is-contiguous, but in-lined so we can retain computed values...\n\t\t\tif ( iox === 1 ) {\n\t\t\t\tox = xmmv[ 0 ];\n\t\t\t} else {\n\t\t\t\tox = xmmv[ 1 ];\n\t\t\t}\n\t\t\tif ( ioy === 1 ) {\n\t\t\t\toy = ymmv[ 0 ];\n\t\t\t} else {\n\t\t\t\toy = ymmv[ 1 ];\n\t\t\t}\n\t\t\tx.shape = [ len ];\n\t\t\ty.shape = x.shape;\n\t\t\tx.strides = [ iox ];\n\t\t\ty.strides = [ ioy ];\n\t\t\tx.offset = ox;\n\t\t\ty.offset = oy;\n\t\t\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\t\t\treturn ACCESSOR_UNARY[ 1 ]( x, y, fcn, clbk, thisArg );\n\t\t\t}\n\t\t\treturn UNARY[ 1 ]( x, y, fcn, clbk, thisArg );\n\t\t}\n\t\t// At least one ndarray is non-contiguous, so we cannot directly use one-dimensional array functionality...\n\n\t\t// Determine whether we can use simple nested loops...\n\t\tif ( ndims <= MAX_DIMS ) {\n\t\t\t// So long as iteration for each respective array always moves in the same direction (i.e., no mixed sign strides), we can leverage cache-optimal (i.e., normal) nested loops without resorting to blocked iteration...\n\t\t\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\t\t\treturn ACCESSOR_UNARY[ ndims ]( x, y, fcn, clbk, thisArg );\n\t\t\t}\n\t\t\treturn UNARY[ ndims ]( x, y, fcn, clbk, thisArg );\n\t\t}\n\t\t// Fall-through to blocked iteration...\n\t}\n\t// At this point, we're either dealing with non-contiguous n-dimensional arrays, high dimensional n-dimensional arrays, and/or arrays having differing memory layouts, so our only hope is that we can still perform blocked iteration...\n\n\t// Determine whether we can perform blocked iteration...\n\tif ( ndims <= MAX_DIMS ) {\n\t\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\t\treturn BLOCKED_ACCESSOR_UNARY[ ndims-2 ]( x, y, fcn, clbk, thisArg ); // eslint-disable-line max-len\n\t\t}\n\t\treturn BLOCKED_UNARY[ ndims-2 ]( x, y, fcn, clbk, thisArg );\n\t}\n\t// Fall-through to linear view iteration without regard for how data is stored in memory (i.e., take the slow path)...\n\tif ( x.accessorProtocol || y.accessorProtocol ) {\n\t\treturn accessorunarynd( x, y, fcn, clbk, thisArg );\n\t}\n\tunarynd( x, y, fcn, clbk, thisArg );\n}\n\n\n// EXPORTS //\n\nmodule.exports = unaryBy;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Apply a unary function to each element retrieved from an input ndarray according to a callback function and assign results to elements in an output ndarray.\n*\n* @module @stdlib/ndarray/base/unary-by\n*\n* @example\n* var Float64Array = require( '@stdlib/array/float64' );\n* var unaryBy = require( '@stdlib/ndarray/base/unary-by' );\n*\n* function scale( x ) {\n* return x * 10.0;\n* }\n*\n* function accessor( v ) {\n* return v * 2.0;\n* }\n*\n* // Create data buffers:\n* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );\n* var ybuf = new Float64Array( 6 );\n*\n* // Define the shape of the input and output arrays:\n* var shape = [ 3, 1, 2 ];\n*\n* // Define the array strides:\n* var sx = [ 4, 4, 1 ];\n* var sy = [ 2, 2, 1 ];\n*\n* // Define the index offsets:\n* var ox = 1;\n* var oy = 0;\n*\n* // Create the input and output ndarray-like objects:\n* var x = {\n* 'dtype': 'float64',\n* 'data': xbuf,\n* 'shape': shape,\n* 'strides': sx,\n* 'offset': ox,\n* 'order': 'row-major'\n* };\n* var y = {\n* 'dtype': 'float64',\n* 'data': ybuf,\n* 'shape': shape,\n* 'strides': sy,\n* 'offset': oy,\n* 'order': 'row-major'\n* };\n*\n* // Apply the unary function:\n* unaryBy( [ x, y ], scale, accessor );\n*\n* console.log( y.data );\n* // => [ 40.0, 60.0, 120.0, 140.0, 200.0, 220.0 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isFloatingPointDataType = require( './../../../base/assert/is-floating-point-data-type' );\nvar isRealFloatingPointDataType = require( './../../../base/assert/is-real-floating-point-data-type' ); // eslint-disable-line id-length\nvar isComplexFloatingPointDataType = require( './../../../base/assert/is-complex-floating-point-data-type' ); // eslint-disable-line id-length\nvar isIntegerDataType = require( './../../../base/assert/is-integer-data-type' );\nvar isSignedIntegerDataType = require( './../../../base/assert/is-signed-integer-data-type' );\nvar isUnsignedIntegerDataType = require( './../../../base/assert/is-unsigned-integer-data-type' );\nvar isRealDataType = require( './../../../base/assert/is-real-data-type' );\nvar isNumericDataType = require( './../../../base/assert/is-numeric-data-type' );\nvar isDataType = require( './../../../base/assert/is-data-type' );\nvar defaults = require( './../../../defaults' );\nvar format = require( '@stdlib/string/format' );\n\n\n// VARIABLES //\n\nvar POLICY_TABLE = {\n\t'floating_point': [\n\t\tisFloatingPointDataType,\n\t\tdefaults.get( 'dtypes.floating_point' )\n\t],\n\t'real_floating_point': [\n\t\tisRealFloatingPointDataType,\n\t\tdefaults.get( 'dtypes.real_floating_point' )\n\t],\n\t'complex_floating_point': [\n\t\tisComplexFloatingPointDataType,\n\t\tdefaults.get( 'dtypes.complex_floating_point' )\n\t],\n\n\t'integer': [\n\t\tisIntegerDataType,\n\t\tdefaults.get( 'dtypes.integer' )\n\t],\n\t'signed_integer': [\n\t\tisSignedIntegerDataType,\n\t\tdefaults.get( 'dtypes.signed_integer' )\n\t],\n\t'unsigned_integer': [\n\t\tisUnsignedIntegerDataType,\n\t\tdefaults.get( 'dtypes.unsigned_integer' )\n\t],\n\n\t'real': [\n\t\tisRealDataType,\n\t\tdefaults.get( 'dtypes.real' )\n\t],\n\n\t'numeric': [\n\t\tisNumericDataType,\n\t\tdefaults.get( 'dtypes.numeric' )\n\t]\n};\nvar DEFAULT_DTYPE = defaults.get( 'dtypes.default' );\n\n\n// MAIN //\n\n/**\n* Resolves the output ndarray data type for a unary function.\n*\n* @param {string} dtype - input ndarray data type\n* @param {string} policy - output ndarray data type policy\n* @throws {TypeError} second argument must be a recognized data type policy\n* @throws {Error} unexpected error\n* @returns {string} output ndarray data type\n*\n* @example\n* var dt = resolve( 'float64', 'complex_floating_point' );\n* // returns \n*/\nfunction resolve( dtype, policy ) {\n\tvar p;\n\tif ( policy === 'default' ) {\n\t\t// When the policy is \"default\", the output data type should always be the default data type without consideration for the input data type:\n\t\treturn DEFAULT_DTYPE;\n\t}\n\tif ( policy === 'same' || policy === 'promoted' ) { // note: for unary APIs, the \"promoted\" data type is the same as the input data type\n\t\treturn dtype;\n\t}\n\tif ( policy === 'bool' ) {\n\t\tthrow new Error( 'not implemented' ); // TODO: update once the `bool` dtype is supported\n\t}\n\tp = POLICY_TABLE[ policy ];\n\tif ( p === void 0 ) {\n\t\t// Check for an explicit data type...\n\t\tif ( isDataType( policy ) ) {\n\t\t\treturn policy;\n\t\t}\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a supported data type policy. Value: `%s`.', policy ) );\n\t}\n\tif ( p[ 0 ]( dtype ) ) {\n\t\treturn dtype;\n\t}\n\treturn p[ 1 ];\n}\n\n\n// EXPORTS //\n\nmodule.exports = resolve;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Resolve the output ndarray data type for a unary function.\n*\n* @module @stdlib/ndarray/base/unary-output-dtype\n*\n* @example\n* var resolve = require( '@stdlib/ndarray/base/unary-output-dtype' );\n*\n* var dt = resolve( 'float64', 'complex_floating_point' );\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar shape2strides = require( './../../../base/shape2strides' );\nvar strides2offset = require( './../../../base/strides2offset' );\nvar buffer = require( './../../../base/buffer' );\nvar format = require( '@stdlib/string/format' );\nvar ndarray = require( './../../../base/ctor' );\nvar numel = require( './../../../base/numel' );\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled ndarray having a specified shape and data type.\n*\n* @param {string} dtype - data type\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {string} order - array order\n* @throws {TypeError} first argument must be a recognized data type\n* @returns {ndarray} ndarray\n*\n* @example\n* var arr = zeros( 'float32', [ 2, 2 ], 'row-major' );\n* // returns \n*\n* var sh = arr.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = arr.dtype;\n* // returns 'float32'\n*/\nfunction zeros( dtype, shape, order ) {\n\tvar ndims;\n\tvar buf;\n\tvar len;\n\tvar st;\n\n\tndims = shape.length;\n\tif ( ndims > 0 ) {\n\t\tlen = numel( shape );\n\t\tst = shape2strides( shape, order );\n\t} else {\n\t\t// For 0-dimensional arrays, the buffer should contain a single element...\n\t\tlen = 1;\n\t\tst = [ 0 ];\n\t}\n\tbuf = buffer( dtype, len );\n\tif ( buf === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a recognized data type. Value: `%s`.', dtype ) );\n\t}\n\n\treturn new ndarray( dtype, buf, shape, st, strides2offset( shape, st ), order ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = zeros;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create a zero-filled ndarray having a specified shape and data type.\n*\n* @module @stdlib/ndarray/base/zeros\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/base/zeros' );\n*\n* var arr = zeros( 'float32', [ 2, 2 ], 'row-major' );\n* // returns \n*\n* var sh = arr.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = arr.dtype;\n* // returns 'float32'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar shape2strides = require( './../../../base/shape2strides' );\nvar strides2offset = require( './../../../base/strides2offset' );\nvar buffer = require( './../../../base/buffer' );\nvar numel = require( './../../../base/numel' );\nvar getDType = require( './../../../base/dtype' );\nvar getShape = require( './../../../base/shape' );\nvar getOrder = require( './../../../base/order' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled ndarray having the same shape and data type as a provided ndarray.\n*\n* @param {ndarray} x - input array\n* @throws {TypeError} first argument must have a recognized data type\n* @returns {ndarray} ndarray\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/base/zeros' );\n*\n* var x = zeros( 'float32', [ 2, 2 ], 'row-major' );\n* // returns \n*\n* var y = zerosLike( x );\n* // returns \n*\n* var sh = y.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = y.dtype;\n* // returns 'float32'\n*/\nfunction zerosLike( x ) {\n\tvar ndims;\n\tvar len;\n\tvar buf;\n\tvar ord;\n\tvar sh;\n\tvar st;\n\tvar dt;\n\n\tdt = getDType( x );\n\tsh = getShape( x, true );\n\tord = getOrder( x );\n\n\tndims = sh.length;\n\tif ( ndims > 0 ) {\n\t\tlen = numel( sh );\n\t\tst = shape2strides( sh, ord );\n\t} else {\n\t\t// For 0-dimensional arrays, the buffer should contain a single element...\n\t\tlen = 1;\n\t\tst = [ 0 ];\n\t}\n\tbuf = buffer( dt, len );\n\tif ( buf === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must have a recognized data type. Value: `%s`.', dt ) );\n\t}\n\treturn new x.constructor( dt, buf, sh, st, strides2offset( sh, st ), ord );\n}\n\n\n// EXPORTS //\n\nmodule.exports = zerosLike;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create a zero-filled ndarray having the same shape and data type as a provided ndarray.\n*\n* @module @stdlib/ndarray/base/zeros-like\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/base/zeros' );\n* var zerosLike = require( '@stdlib/ndarray/base/zeros-like' );\n*\n* var x = zeros( 'float32', [ 2, 2 ], 'row-major' );\n* // returns \n*\n* var y = zerosLike( x );\n* // returns \n*\n* var sh = y.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = y.dtype;\n* // returns 'float32'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n/*\n* The following modules are intentionally not exported: function-object, napi, unary\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name assert\n* @memberof ns\n* @readonly\n* @type {Namespace}\n* @see {@link module:@stdlib/ndarray/base/assert}\n*/\nsetReadOnly( ns, 'assert', require( './../../base/assert' ) );\n\n/**\n* @name binaryLoopOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/binary-loop-interchange-order}\n*/\nsetReadOnly( ns, 'binaryLoopOrder', require( './../../base/binary-loop-interchange-order' ) );\n\n/**\n* @name binaryBlockSize\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/binary-tiling-block-size}\n*/\nsetReadOnly( ns, 'binaryBlockSize', require( './../../base/binary-tiling-block-size' ) );\n\n/**\n* @name bind2vind\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/bind2vind}\n*/\nsetReadOnly( ns, 'bind2vind', require( './../../base/bind2vind' ) );\n\n/**\n* @name broadcastArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/broadcast-array}\n*/\nsetReadOnly( ns, 'broadcastArray', require( './../../base/broadcast-array' ) );\n\n/**\n* @name broadcastScalar\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/broadcast-scalar}\n*/\nsetReadOnly( ns, 'broadcastScalar', require( './../../base/broadcast-scalar' ) );\n\n/**\n* @name broadcastShapes\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/broadcast-shapes}\n*/\nsetReadOnly( ns, 'broadcastShapes', require( './../../base/broadcast-shapes' ) );\n\n/**\n* @name buffer\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/buffer}\n*/\nsetReadOnly( ns, 'buffer', require( './../../base/buffer' ) );\n\n/**\n* @name bufferCtors\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/buffer-ctors}\n*/\nsetReadOnly( ns, 'bufferCtors', require( './../../base/buffer-ctors' ) );\n\n/**\n* @name bufferDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/buffer-dtype}\n*/\nsetReadOnly( ns, 'bufferDataType', require( './../../base/buffer-dtype' ) );\n\n/**\n* @name bufferDataTypeEnum\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/buffer-dtype-enum}\n*/\nsetReadOnly( ns, 'bufferDataTypeEnum', require( './../../base/buffer-dtype-enum' ) );\n\n/**\n* @name bytesPerElement\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/bytes-per-element}\n*/\nsetReadOnly( ns, 'bytesPerElement', require( './../../base/bytes-per-element' ) );\n\n/**\n* @name char2dtype\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/char2dtype}\n*/\nsetReadOnly( ns, 'char2dtype', require( './../../base/char2dtype' ) );\n\n/**\n* @name clampIndex\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/clamp-index}\n*/\nsetReadOnly( ns, 'clampIndex', require( './../../base/clamp-index' ) );\n\n/**\n* @name ndarray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/ctor}\n*/\nsetReadOnly( ns, 'ndarray', require( './../../base/ctor' ) );\n\n/**\n* @name data\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/data-buffer}\n*/\nsetReadOnly( ns, 'data', require( './../../base/data-buffer' ) );\n\n/**\n* @name dtype\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/dtype}\n*/\nsetReadOnly( ns, 'dtype', require( './../../base/dtype' ) );\n\n/**\n* @name dtypeChar\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/dtype-char}\n*/\nsetReadOnly( ns, 'dtypeChar', require( './../../base/dtype-char' ) );\n\n/**\n* @name dtypeDesc\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/dtype-desc}\n*/\nsetReadOnly( ns, 'dtypeDesc', require( './../../base/dtype-desc' ) );\n\n/**\n* @name dtypeEnum2Str\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/dtype-enum2str}\n*/\nsetReadOnly( ns, 'dtypeEnum2Str', require( './../../base/dtype-enum2str' ) );\n\n/**\n* @name dtypeResolveEnum\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/dtype-resolve-enum}\n*/\nsetReadOnly( ns, 'dtypeResolveEnum', require( './../../base/dtype-resolve-enum' ) );\n\n/**\n* @name dtypeResolveStr\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/dtype-resolve-str}\n*/\nsetReadOnly( ns, 'dtypeResolveStr', require( './../../base/dtype-resolve-str' ) );\n\n/**\n* @name dtypeStr2Enum\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/dtype-str2enum}\n*/\nsetReadOnly( ns, 'dtypeStr2Enum', require( './../../base/dtype-str2enum' ) );\n\n/**\n* @name dtype2c\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/dtype2c}\n*/\nsetReadOnly( ns, 'dtype2c', require( './../../base/dtype2c' ) );\n\n/**\n* @name dtypes2signatures\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/dtypes2signatures}\n*/\nsetReadOnly( ns, 'dtypes2signatures', require( './../../base/dtypes2signatures' ) );\n\n/**\n* @name empty\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/empty}\n*/\nsetReadOnly( ns, 'empty', require( './../../base/empty' ) );\n\n/**\n* @name emptyLike\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/empty-like}\n*/\nsetReadOnly( ns, 'emptyLike', require( './../../base/empty-like' ) );\n\n/**\n* @name expandDimensions\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/expand-dimensions}\n*/\nsetReadOnly( ns, 'expandDimensions', require( './../../base/expand-dimensions' ) );\n\n/**\n* @name scalar2ndarray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/from-scalar}\n*/\nsetReadOnly( ns, 'scalar2ndarray', require( './../../base/from-scalar' ) );\n\n/**\n* @name ind\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/ind}\n*/\nsetReadOnly( ns, 'ind', require( './../../base/ind' ) );\n\n/**\n* @name ind2sub\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/ind2sub}\n*/\nsetReadOnly( ns, 'ind2sub', require( './../../base/ind2sub' ) );\n\n/**\n* @name iterationOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/iteration-order}\n*/\nsetReadOnly( ns, 'iterationOrder', require( './../../base/iteration-order' ) );\n\n/**\n* @name maxViewBufferIndex\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/max-view-buffer-index}\n*/\nsetReadOnly( ns, 'maxViewBufferIndex', require( './../../base/max-view-buffer-index' ) );\n\n/**\n* @name maybeBroadcastArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/maybe-broadcast-array}\n*/\nsetReadOnly( ns, 'maybeBroadcastArray', require( './../../base/maybe-broadcast-array' ) );\n\n/**\n* @name metaDataProps\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/meta-data-props}\n*/\nsetReadOnly( ns, 'metaDataProps', require( './../../base/meta-data-props' ) );\n\n/**\n* @name minViewBufferIndex\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/min-view-buffer-index}\n*/\nsetReadOnly( ns, 'minViewBufferIndex', require( './../../base/min-view-buffer-index' ) );\n\n/**\n* @name minmaxViewBufferIndex\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/minmax-view-buffer-index}\n*/\nsetReadOnly( ns, 'minmaxViewBufferIndex', require( './../../base/minmax-view-buffer-index' ) );\n\n/**\n* @name ndarraylike2object\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/ndarraylike2object}\n*/\nsetReadOnly( ns, 'ndarraylike2object', require( './../../base/ndarraylike2object' ) );\n\n/**\n* @name ndims\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/ndims}\n*/\nsetReadOnly( ns, 'ndims', require( './../../base/ndims' ) );\n\n/**\n* @name nextCartesianIndex\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/next-cartesian-index}\n*/\nsetReadOnly( ns, 'nextCartesianIndex', require( './../../base/next-cartesian-index' ) );\n\n/**\n* @name nonsingletonDimensions\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/nonsingleton-dimensions}\n*/\nsetReadOnly( ns, 'nonsingletonDimensions', require( './../../base/nonsingleton-dimensions' ) );\n\n/**\n* @name nullary\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/nullary}\n*/\nsetReadOnly( ns, 'nullary', require( './../../base/nullary' ) );\n\n/**\n* @name nullaryLoopOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/nullary-loop-interchange-order}\n*/\nsetReadOnly( ns, 'nullaryLoopOrder', require( './../../base/nullary-loop-interchange-order' ) );\n\n/**\n* @name nullaryBlockSize\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/nullary-tiling-block-size}\n*/\nsetReadOnly( ns, 'nullaryBlockSize', require( './../../base/nullary-tiling-block-size' ) );\n\n/**\n* @name numel\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/numel}\n*/\nsetReadOnly( ns, 'numel', require( './../../base/numel' ) );\n\n/**\n* @name offset\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/offset}\n*/\nsetReadOnly( ns, 'offset', require( './../../base/offset' ) );\n\n/**\n* @name order\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/order}\n*/\nsetReadOnly( ns, 'order', require( './../../base/order' ) );\n\n/**\n* @name outputPolicyEnum2Str\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/output-policy-enum2str}\n*/\nsetReadOnly( ns, 'outputPolicyEnum2Str', require( './../../base/output-policy-enum2str' ) );\n\n/**\n* @name outputPolicyResolveEnum\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/output-policy-resolve-enum}\n*/\nsetReadOnly( ns, 'outputPolicyResolveEnum', require( './../../base/output-policy-resolve-enum' ) );\n\n/**\n* @name outputPolicyResolveStr\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/output-policy-resolve-str}\n*/\nsetReadOnly( ns, 'outputPolicyResolveStr', require( './../../base/output-policy-resolve-str' ) );\n\n/**\n* @name outputPolicyStr2Enum\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/output-policy-str2enum}\n*/\nsetReadOnly( ns, 'outputPolicyStr2Enum', require( './../../base/output-policy-str2enum' ) );\n\n/**\n* @name prependSingletonDimensions\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/prepend-singleton-dimensions}\n*/\nsetReadOnly( ns, 'prependSingletonDimensions', require( './../../base/prepend-singleton-dimensions' ) );\n\n/**\n* @name removeSingletonDimensions\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/remove-singleton-dimensions}\n*/\nsetReadOnly( ns, 'removeSingletonDimensions', require( './../../base/remove-singleton-dimensions' ) );\n\n/**\n* @name serializeMetaData\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/serialize-meta-data}\n*/\nsetReadOnly( ns, 'serializeMetaData', require( './../../base/serialize-meta-data' ) );\n\n/**\n* @name shape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/shape}\n*/\nsetReadOnly( ns, 'shape', require( './../../base/shape' ) );\n\n/**\n* @name shape2strides\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/shape2strides}\n*/\nsetReadOnly( ns, 'shape2strides', require( './../../base/shape2strides' ) );\n\n/**\n* @name singletonDimensions\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/singleton-dimensions}\n*/\nsetReadOnly( ns, 'singletonDimensions', require( './../../base/singleton-dimensions' ) );\n\n/**\n* @name slice\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/slice}\n*/\nsetReadOnly( ns, 'slice', require( './../../base/slice' ) );\n\n/**\n* @name sliceAssign\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/slice-assign}\n*/\nsetReadOnly( ns, 'sliceAssign', require( './../../base/slice-assign' ) );\n\n/**\n* @name sliceDimension\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/slice-dimension}\n*/\nsetReadOnly( ns, 'sliceDimension', require( './../../base/slice-dimension' ) );\n\n/**\n* @name strides\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/strides}\n*/\nsetReadOnly( ns, 'strides', require( './../../base/strides' ) );\n\n/**\n* @name strides2offset\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/strides2offset}\n*/\nsetReadOnly( ns, 'strides2offset', require( './../../base/strides2offset' ) );\n\n/**\n* @name strides2order\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/strides2order}\n*/\nsetReadOnly( ns, 'strides2order', require( './../../base/strides2order' ) );\n\n/**\n* @name sub2ind\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/sub2ind}\n*/\nsetReadOnly( ns, 'sub2ind', require( './../../base/sub2ind' ) );\n\n/**\n* @name ndarray2array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/to-array}\n*/\nsetReadOnly( ns, 'ndarray2array', require( './../../base/to-array' ) );\n\n/**\n* @name transpose\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/transpose}\n*/\nsetReadOnly( ns, 'transpose', require( './../../base/transpose' ) );\n\n/**\n* @name unary\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/unary}\n*/\nsetReadOnly( ns, 'unary', require( './../../base/unary' ) );\n\n/**\n* @name unaryBy\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/unary-by}\n*/\nsetReadOnly( ns, 'unaryBy', require( './../../base/unary-by' ) );\n\n/**\n* @name unaryLoopOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/unary-loop-interchange-order}\n*/\nsetReadOnly( ns, 'unaryLoopOrder', require( './../../base/unary-loop-interchange-order' ) );\n\n/**\n* @name unaryOutputDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/unary-output-dtype}\n*/\nsetReadOnly( ns, 'unaryOutputDataType', require( './../../base/unary-output-dtype' ) );\n\n/**\n* @name unaryBlockSize\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/unary-tiling-block-size}\n*/\nsetReadOnly( ns, 'unaryBlockSize', require( './../../base/unary-tiling-block-size' ) );\n\n/**\n* @name vind2bind\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/vind2bind}\n*/\nsetReadOnly( ns, 'vind2bind', require( './../../base/vind2bind' ) );\n\n/**\n* @name wrapIndex\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/wrap-index}\n*/\nsetReadOnly( ns, 'wrapIndex', require( './../../base/wrap-index' ) );\n\n/**\n* @name zeros\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/zeros}\n*/\nsetReadOnly( ns, 'zeros', require( './../../base/zeros' ) );\n\n/**\n* @name zerosLike\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/base/zeros-like}\n*/\nsetReadOnly( ns, 'zerosLike', require( './../../base/zeros-like' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );\nvar isCollection = require( '@stdlib/assert/is-collection' );\nvar isNonNegativeInteger = require( '@stdlib/assert/is-nonnegative-integer' ).isPrimitive;\nvar copy = require( '@stdlib/array/base/copy-indexed' );\nvar getDType = require( './../../dtype' );\nvar getShape = require( './../../shape' );\nvar getStrides = require( './../../strides' );\nvar getOffset = require( './../../offset' );\nvar getOrder = require( './../../order' );\nvar getData = require( './../../data-buffer' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Broadcasts an ndarray to a specified shape.\n*\n* ## Notes\n*\n* - The returned array is a **read-only** view on the input array data buffer. The view is typically **not** contiguous. As more than one element of a returned view may refer to the same memory location, writing to the input array may affect multiple elements. If you need to write to the input array, copy the input array before broadcasting.\n*\n* @param {ndarray} x - input array\n* @param {NonNegativeIntegerArray} shape - desired shape\n* @throws {TypeError} first argument must be an ndarray\n* @throws {TypeError} second argument must be an array of nonnegative integers\n* @throws {Error} input array cannot have more dimensions than the desired shape\n* @throws {Error} input array dimension sizes must be `1` or equal to the corresponding dimension in the provided shape\n* @throws {Error} input array and desired shape must be broadcast compatible\n* @returns {ndarray} broadcasted array\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var shx = x.shape;\n* // returns [ 2, 2 ]\n*\n* var y = broadcastArray( x, [ 3, 2, 2 ] );\n* // returns \n*\n* var shy = y.shape;\n* // returns [ 3, 2, 2 ]\n*\n* var v = y.get( 0, 0, 0 );\n* // returns 1\n*\n* v = y.get( 0, 0, 1 );\n* // returns 2\n*\n* v = y.get( 1, 0, 0 );\n* // returns 1\n*\n* v = y.get( 1, 1, 0 );\n* // returns 3\n*\n* v = y.get( 2, 0, 0 );\n* // returns 1\n*\n* v = y.get( 2, 1, 1 );\n* // returns 4\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var y = broadcastArray( x, [ 3, 2 ] );\n* // throws \n*/\nfunction broadcastArray( x, shape ) {\n\tvar strides;\n\tvar dim;\n\tvar sh;\n\tvar st;\n\tvar N;\n\tvar M;\n\tvar d;\n\tvar i;\n\tvar j;\n\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ndarray. Value: `%s`.', x ) );\n\t}\n\tif ( !isCollection( shape ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an array of nonnegative integers. Value: `%s`.', shape ) );\n\t}\n\tN = shape.length;\n\tsh = getShape( x );\n\tM = sh.length;\n\tif ( N < M ) {\n\t\tthrow new Error( 'invalid argument. Cannot broadcast an array to a shape having fewer dimensions. Arrays can only be broadcasted to shapes having the same or more dimensions.' );\n\t}\n\t// Initialize a strides array...\n\tstrides = [];\n\tfor ( i = 0; i < N; i++ ) {\n\t\tstrides.push( 0 );\n\t}\n\t// Determine the output array strides...\n\tst = getStrides( x );\n\tfor ( i = N-1; i >= 0; i-- ) {\n\t\tj = M - N + i;\n\t\tif ( j < 0 ) {\n\t\t\t// Prepended singleton dimension; stride is zero...\n\t\t\tcontinue;\n\t\t}\n\t\td = sh[ j ];\n\t\tdim = shape[ i ];\n\t\tif ( !isNonNegativeInteger( dim ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an array of nonnegative integers. Value: `%s`.', '[' + shape.join( ',' ) + ']' ) );\n\t\t}\n\t\tif ( dim !== 0 && dim < d ) {\n\t\t\tthrow new Error( format( 'invalid argument. Input array cannot be broadcast to the specified shape, as the specified shape has a dimension whose size is less than the size of the corresponding dimension in the input array. Array shape: (%s). Desired shape: (%s). Dimension: %u.', copy( sh ).join( ', ' ), copy( shape ).join( ', ' ), i ) );\n\t\t}\n\t\tif ( d === dim ) {\n\t\t\tstrides[ i ] = st[ j ];\n\t\t} else if ( d === 1 ) {\n\t\t\t// In order to broadcast dimensions, we set the stride for that dimension to zero...\n\t\t\tstrides[ i ] = 0;\n\t\t} else {\n\t\t\t// At this point, we know that `dim > d` and that `d` does not equal `1` (e.g., `dim=3` and `d=2`); in which case, the shapes are considered incompatible (even for desired shapes which are multiples of array dimensions, as might be desired when \"tiling\" an array; e.g., `dim=4` and `d=2`)...\n\t\t\tthrow new Error( format( 'invalid argument. Input array and the specified shape are broadcast incompatible. Array shape: (%s). Desired shape: (%s). Dimension: %u.', copy( sh ).join( ', ' ), copy( shape ).join( ', ' ), i ) );\n\t\t}\n\t}\n\treturn new x.constructor( getDType( x ), getData( x ), copy( shape ), strides, getOffset( x ), getOrder( x ), { // eslint-disable-line max-len\n\t\t'readonly': true\n\t});\n}\n\n\n// EXPORTS //\n\nmodule.exports = broadcastArray;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Broadcast an ndarray to a specified shape.\n*\n* @module @stdlib/ndarray/broadcast-array\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var broadcastArray = require( '@stdlib/ndarray/broadcast-array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var shx = x.shape;\n* // returns [ 2, 2 ]\n*\n* var y = broadcastArray( x, [ 3, 2, 2 ] );\n* // returns \n*\n* var shy = y.shape;\n* // returns [ 3, 2, 2 ]\n*\n* var v = y.get( 0, 0, 0 );\n* // returns 1\n*\n* v = y.get( 0, 0, 1 );\n* // returns 2\n*\n* v = y.get( 1, 0, 0 );\n* // returns 1\n*\n* v = y.get( 1, 1, 0 );\n* // returns 3\n*\n* v = y.get( 2, 0, 0 );\n* // returns 1\n*\n* v = y.get( 2, 1, 1 );\n* // returns 4\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Returns the first row index at which a given one-dimensional array of types can be found in a two-dimensional reference array of types (or `-1` if not found).\n*\n* ## Notes\n*\n* - The intended use case for this function is for type dispatch (i.e., given a set of array data types, find a matching interface according the interface's accepted array data types).\n* - The function assumes that `x` is stored in row-major order.\n* - The function assumes that the number of indexed elements in `y` equals the number of columns in `x`.\n* - The function returns a row index. To convert to a linear index, multiply `strideX1` by the return value.\n*\n* @private\n* @param {NonNegativeInteger} N - number of rows in `x` (size of first dimension)\n* @param {NonNegativeInteger} M - number of columns in `x` (size of second dimension)\n* @param {ArrayLikeObject} x - input two-dimensional reference array\n* @param {integer} strideX1 - `x` stride length along first dimension\n* @param {integer} strideX2 - `x` stride length along second dimension\n* @param {NonNegativeInteger} offsetX - `x` starting index\n* @param {ArrayLikeObject} y - search array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - `y` starting index\n* @returns {integer} row index (if found) and `-1` otherwise\n*\n* @example\n* // Define a reference array to search:\n* var types = [\n* 'float64', 'float64', 'float64',\n* 'float32', 'float32', 'float32',\n* 'uint32', 'uint32', 'float64',\n* 'int32', 'int32', 'float64',\n* 'uint16', 'uint16', 'float64',\n* 'int16', 'int16', 'float64',\n* 'uint8', 'uint8', 'float64',\n* 'int8', 'int8', 'float64'\n* ];\n*\n* // Define reference array dimensions:\n* var N = 8; // rows\n* var M = 3; // columns\n*\n* // Define a search array:\n* y1 = [\n* 'float32', 'float32', 'float32',\n* ];\n*\n* // Find the list of types:\n* var r1 = indexOfTypes( N, M, types, M, 1, 0, y1, 1, 0 );\n* // returns 1\n*\n// Define a search array:\n* y2 = [\n* 'float32', 'float32', 'float64',\n* ];\n*\n* // Find the list of types:\n* var r2 = indexOfTypes( N, M, types, M, 1, 0, y2, 1, 0 );\n* // returns -1\n*/\nfunction indexOfTypes( N, M, x, strideX1, strideX2, offsetX, y, strideY, offsetY ) { // eslint-disable-line max-len\n\tvar ix;\n\tvar iy;\n\tvar i;\n\tvar j;\n\n\t// Search for the first row which matches `y`...\n\tix = offsetX;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tiy = offsetY;\n\t\tfor ( j = 0; j < M; j++ ) {\n\t\t\tif ( x[ ix+(j*strideX2) ] !== y[ iy ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tiy += strideY;\n\t\t}\n\t\t// If we successfully iterated over all columns, then that means we've found a match...\n\t\tif ( j === M ) {\n\t\t\treturn i;\n\t\t}\n\t\tix += strideX1;\n\t}\n\treturn -1;\n}\n\n\n// EXPORTS //\n\nmodule.exports = indexOfTypes;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isNonNegativeInteger = require( '@stdlib/assert/is-nonnegative-integer' ).isPrimitive;\nvar isPositiveInteger = require( '@stdlib/assert/is-positive-integer' );\nvar isInteger = require( '@stdlib/assert/is-integer' ).isPrimitive;\nvar isFunctionArray = require( '@stdlib/assert/is-function-array' );\nvar isFunction = require( '@stdlib/assert/is-function' );\nvar isCollection = require( '@stdlib/assert/is-collection' );\nvar isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );\nvar format = require( '@stdlib/string/format' );\nvar getDType = require( './../../dtype' );\nvar resolveEnum = require( './../../base/dtype-resolve-enum' );\nvar indexOfTypes = require( './index_of_types.js' );\n\n\n// FUNCTIONS //\n\n/**\n* Returns a list of data type enumeration constants.\n*\n* @private\n* @param {Collection} types - list of types\n* @returns {IntegerArray} list of data type enumeration constants\n*/\nfunction types2enums( types ) {\n\tvar out;\n\tvar i;\n\n\tout = [];\n\tfor ( i = 0; i < types.length; i++ ) {\n\t\tout.push( resolveEnum( types[ i ] ) );\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Returns an ndarray function interface which performs multiple dispatch.\n*\n* @param {(FunctionArray|Function)} fcns - list of ndarray functions\n* @param {Collection} types - one-dimensional list of ndarray argument data types\n* @param {(Collection|null)} data - ndarray function data (e.g., callbacks)\n* @param {PositiveInteger} nargs - total number of ndarray function interface arguments\n* @param {NonNegativeInteger} nin - number of input ndarrays\n* @param {NonNegativeInteger} nout - number of output ndarrays\n* @throws {TypeError} first argument must be either a function or an array of functions\n* @throws {TypeError} second argument must be an array-like object\n* @throws {TypeError} third argument must be an array-like object or `null`\n* @throws {Error} third and first arguments must have the same number of elements\n* @throws {TypeError} fourth argument must be a positive integer\n* @throws {TypeError} fifth argument must be a nonnegative integer\n* @throws {TypeError} sixth argument must be a nonnegative integer\n* @throws {Error} fourth argument must equal the specified number of input and output arrays\n* @throws {Error} number of types must match the number of functions times the total number of array arguments for each function\n* @throws {Error} interface must accept at least one input and/or output ndarray\n* @returns {Function} ndarray function interface\n*\n* @example\n* var unary = require( '@stdlib/ndarray/base/unary' );\n* var abs = require( '@stdlib/math/base/special/abs' );\n* var Float64Array = require( '@stdlib/array/float64' );\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n*\n* var types = [\n* 'float64', 'float64'\n* ];\n*\n* var data = [\n* abs\n* ];\n*\n* var absolute = dispatch( unary, types, data, 2, 1, 1 );\n*\n* // ...\n*\n* var xbuf = new Float64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0 ] );\n* var ybuf = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] );\n*\n* var x = ndarray( 'float64', xbuf, [ 5 ], [ 1 ], 0, 'row-major' );\n* var y = ndarray( 'float64', ybuf, [ 5 ], [ 1 ], 0, 'row-major' );\n*\n* absolute( x, y );\n* // ybuf => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\nfunction dispatch( fcns, types, data, nargs, nin, nout ) {\n\tvar narrays;\n\tvar nfcns;\n\tvar fcn;\n\n\tif ( isFunction( fcns ) ) {\n\t\tfcn = fcns;\n\t} else if ( !isFunctionArray( fcns ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be either a function or an array of functions. Value: `%s`.', fcns ) );\n\t}\n\tif ( !isCollection( types ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an array-like object. Value: `%s`.', types ) );\n\t}\n\tif ( !isCollection( data ) && data !== null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an array-like object or null. Value: `%s`.', data ) );\n\t}\n\tif ( !isPositiveInteger( nargs ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Fourth argument must be a positive integer. Value: `%s`.', nargs ) );\n\t}\n\tif ( !isNonNegativeInteger( nin ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Fifth argument must be a nonnegative integer. Value: `%s`.', nin ) );\n\t}\n\tif ( !isNonNegativeInteger( nout ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Sixth argument must be a nonnegative integer. Value: `%s`.', nout ) );\n\t}\n\tnarrays = nin + nout;\n\tif ( narrays === 0 ) {\n\t\tthrow new Error( 'invalid arguments. Interface must accept at least one input and/or output ndarray. Based on the provided arguments, `nin+nout` equals `0`.' );\n\t}\n\tif ( nargs !== narrays ) {\n\t\tthrow new Error( 'invalid arguments. Fourth argument does not equal the number of input and output ndarrays.' );\n\t}\n\tif ( fcn ) {\n\t\tnfcns = types.length / narrays;\n\t\tif ( !isInteger( nfcns ) ) {\n\t\t\tthrow new Error( 'invalid argument. Unexpected number of types. A type must be specified for each input and output ndarray for each provided ndarray function.' );\n\t\t}\n\t} else {\n\t\tnfcns = fcns.length;\n\t\tif ( types.length !== nfcns*narrays ) {\n\t\t\tthrow new Error( 'invalid argument. Unexpected number of types. A type must be specified for each input and output ndarray for each provided ndarray function.' );\n\t\t}\n\t}\n\tif ( data && data.length !== nfcns ) {\n\t\tthrow new Error( 'invalid argument. The third argument must have the same number of elements as the first argument.' );\n\t}\n\ttypes = types2enums( types );\n\treturn dispatcher;\n\n\t/**\n\t* ndarray function interface which performs multiple dispatch.\n\t*\n\t* @private\n\t* @param {ndarrayLike} x - ndarray\n\t* @param {...ndarrayLike} args - ndarray arguments\n\t* @throws {Error} insufficient arguments\n\t* @throws {Error} too many arguments\n\t* @throws {TypeError} input array arguments must be ndarray-like objects\n\t* @throws {TypeError} output array arguments must be ndarray-like objects\n\t* @throws {TypeError} unable to resolve an ndarray function supporting the provided ndarray argument data types\n\t* @returns {(ndarrayLike|Array|void)} destination array(s)\n\t*/\n\tfunction dispatcher() {\n\t\tvar arrays;\n\t\tvar dtypes;\n\t\tvar argc;\n\t\tvar idx;\n\t\tvar v;\n\t\tvar f;\n\t\tvar i;\n\n\t\targc = arguments.length;\n\t\tif ( argc !== nargs ) {\n\t\t\tif ( argc < nargs ) {\n\t\t\t\tthrow new Error( 'invalid invocation. Insufficient arguments.' );\n\t\t\t}\n\t\t\tthrow new Error( 'invalid invocation. Too many arguments.' );\n\t\t}\n\t\tarrays = [];\n\t\tdtypes = [];\n\t\tfor ( i = 0; i < nargs; i++ ) {\n\t\t\tv = arguments[ i ];\n\t\t\tif ( !isndarrayLike( v ) ) {\n\t\t\t\tif ( i < nin ) {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Input array must be an ndarray-like object. Value: `%s`.', v ) );\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Output array must be an ndarray-like object. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\tarrays.push( v );\n\t\t\tdtypes.push( resolveEnum( getDType( v ) ) );\n\t\t}\n\t\t// Resolve the ndarray function satisfying the input array types:\n\t\tidx = indexOfTypes( nfcns, narrays, types, narrays, 1, 0, dtypes, 1, 0 ); // eslint-disable-line max-len\n\n\t\t// Check whether we were able to successfully resolve an ndarray function:\n\t\tif ( idx < 0 ) {\n\t\t\tthrow new TypeError( 'invalid arguments. Unable to resolve an ndarray function supporting the provided array argument data types.' );\n\t\t}\n\t\t// Retrieve the ndarray function:\n\t\tif ( fcn ) {\n\t\t\tf = fcn;\n\t\t} else {\n\t\t\tf = fcns[ idx ];\n\t\t}\n\t\t// Evaluate the ndarray function:\n\t\tif ( data ) {\n\t\t\tf( arrays, data[ idx ] );\n\t\t} else {\n\t\t\tf( arrays );\n\t\t}\n\t\tif ( nout === 1 ) {\n\t\t\treturn arrays[ narrays-1 ];\n\t\t}\n\t\tif ( nout === 0 ) {\n\t\t\treturn;\n\t\t}\n\t\treturn arrays.slice( nin );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = dispatch;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create an ndarray function interface which performs multiple dispatch.\n*\n* @module @stdlib/ndarray/dispatch\n*\n* @example\n* var dispatch = require( '@stdlib/ndarray/dispatch' );\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n* var unary = require( '@stdlib/ndarray/base/unary' );\n* var abs = require( '@stdlib/math/base/special/abs' );\n* var Float64Array = require( '@stdlib/array/float64' );\n*\n* var types = [\n* 'float64', 'float64'\n* ];\n*\n* var data = [\n* abs\n* ];\n*\n* var absolute = dispatch( unary, types, data, 2, 1, 1 );\n*\n* // ...\n*\n* var xbuf = new Float64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0 ] );\n* var ybuf = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] );\n*\n* var x = ndarray( 'float64', xbuf, [ 5 ], [ 1 ], 0, 'row-major' );\n* var y = ndarray( 'float64', ybuf, [ 5 ], [ 1 ], 0, 'row-major' );\n*\n* absolute( x, y );\n* // ybuf => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isPlainObject = require( '@stdlib/assert/is-plain-object' );\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar isArrayLike = require( '@stdlib/assert/is-array-like' );\nvar shape2strides = require( './../../base/shape2strides' );\nvar strides2offset = require( './../../base/strides2offset' );\nvar emptyArray = require( '@stdlib/array/empty' );\nvar allocUnsafe = require( '@stdlib/buffer/alloc-unsafe' );\nvar numel = require( './../../base/numel' );\nvar ndarray = require( './../../ctor' );\nvar defaults = require( './../../defaults' );\nvar format = require( '@stdlib/string/format' );\n\n\n// VARIABLES //\n\nvar DTYPE = defaults.get( 'dtypes.default' );\nvar ORDER = defaults.get( 'order' );\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized ndarray having a specified shape and data type.\n*\n* @param {(NonNegativeIntegerArray|NonNegativeInteger)} shape - array shape\n* @param {Options} [options] - options\n* @param {string} [options.dtype='float64'] - data type\n* @param {string} [options.order='row-major'] - array order\n* @param {string} [options.mode=\"throw\"] - specifies how to handle indices which exceed array dimensions\n* @param {StringArray} [options.submode=[\"throw\"]] - specifies how to handle subscripts which exceed array dimensions on a per dimension basis\n* @throws {TypeError} first argument must be either a nonnegative integer or an array of nonnegative integers\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} `dtype` option must be a recognized data type\n* @throws {TypeError} `order` option must be a recognized array order\n* @throws {TypeError} must provide valid options\n* @returns {ndarray} ndarray\n*\n* @example\n* var arr = empty( [ 2, 2 ] );\n* // returns \n*\n* var sh = arr.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = arr.dtype;\n* // returns 'float64'\n*/\nfunction empty( shape ) {\n\tvar options;\n\tvar dtype;\n\tvar order;\n\tvar ndims;\n\tvar opts;\n\tvar buf;\n\tvar len;\n\tvar st;\n\tvar sh;\n\n\topts = {};\n\tif ( arguments.length > 1 ) {\n\t\toptions = arguments[ 1 ];\n\t\tif ( !isPlainObject( options ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t\t}\n\t\tif ( hasOwnProp( options, 'dtype' ) ) {\n\t\t\tdtype = options.dtype;\n\t\t} else {\n\t\t\tdtype = DTYPE;\n\t\t}\n\t\tif ( hasOwnProp( options, 'order' ) ) {\n\t\t\torder = options.order;\n\t\t} else {\n\t\t\torder = ORDER;\n\t\t}\n\t\tif ( hasOwnProp( options, 'mode' ) ) {\n\t\t\topts.mode = options.mode;\n\t\t}\n\t\tif ( hasOwnProp( options, 'submode' ) ) {\n\t\t\topts.submode = options.submode;\n\t\t}\n\t} else {\n\t\tdtype = DTYPE;\n\t\torder = ORDER;\n\t}\n\tif ( typeof shape === 'number' ) {\n\t\tsh = [ shape ];\n\t} else if ( isArrayLike( shape ) ) {\n\t\tsh = shape;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be either a nonnegative integer or an array of nonnegative integers. Value: `%s`.', shape ) );\n\t}\n\tndims = sh.length;\n\tif ( ndims > 0 ) {\n\t\tlen = numel( sh );\n\t\tif ( len !== len || len < 0 ) {\n\t\t\t// We should only get here if we've been provided an invalid shape (e.g., an array containing negative integers, etc)...\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be either a nonnegative integer or an array of nonnegative integers. Value: `%s`.', shape ) );\n\t\t}\n\t\tst = shape2strides( sh, order );\n\t} else {\n\t\t// For 0-dimensional arrays, the buffer should contain a single element...\n\t\tlen = 1;\n\t\tst = [ 0 ];\n\t}\n\tif ( dtype === 'binary' ) {\n\t\tbuf = allocUnsafe( len );\n\t} else {\n\t\tbuf = emptyArray( len, dtype );\n\t}\n\treturn new ndarray( dtype, buf, sh, st, strides2offset( sh, st ), order, opts ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = empty;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create an uninitialized ndarray having a specified shape and data type.\n*\n* @module @stdlib/ndarray/empty\n*\n* @example\n* var empty = require( '@stdlib/ndarray/empty' );\n*\n* var arr = empty( [ 2, 2 ], {\n* 'dtype': 'float32'\n* });\n* // returns \n*\n* var sh = arr.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = arr.dtype;\n* // returns 'float32'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );\nvar isPlainObject = require( '@stdlib/assert/is-plain-object' );\nvar isNonNegativeIntegerArray = require( '@stdlib/assert/is-nonnegative-integer-array' ).primitives;\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar shape2strides = require( './../../base/shape2strides' );\nvar strides2offset = require( './../../base/strides2offset' );\nvar numel = require( './../../base/numel' );\nvar getDType = require( './../../dtype' );\nvar getShape = require( './../../shape' );\nvar getOrder = require( './../../order' );\nvar ndarray = require( './../../ctor' );\nvar emptyArray = require( '@stdlib/array/empty' );\nvar allocUnsafe = require( '@stdlib/buffer/alloc-unsafe' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Creates an uninitialized ndarray having the same shape and data type as a provided ndarray.\n*\n* @param {ndarray} x - input array\n* @param {Options} [options] - function options\n* @param {string} [options.dtype] - output array data type (overrides the input array's inferred data type)\n* @param {string} [options.order] - specifies whether the output array should be 'row-major' (C-style) or 'column-major' (Fortran-style) (overrides the input array's inferred order)\n* @param {(NonNegativeIntegerArray|NonNegativeInteger)} [options.shape] - output array shape (overrides the input array's inferred shape)\n* @param {string} [options.mode=\"throw\"] - specifies how to handle indices which exceed array dimensions\n* @param {StringArray} [options.submode=[\"throw\"]] - specifies how to handle subscripts which exceed array dimensions on a per dimension basis\n* @throws {TypeError} first argument must have a recognized data type\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} `dtype` option must be a supported ndarray data type\n* @throws {TypeError} `order` option must be a supported order\n* @throws {TypeError} `shape` option must be either a nonnegative integer or an array of nonnegative integers\n* @throws {TypeError} must provide valid options\n* @returns {ndarray} ndarray\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var x = zeros( [ 2, 2 ] );\n* // returns \n*\n* var y = emptyLike( x );\n* // returns \n*\n* var sh = y.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = y.dtype;\n* // returns 'float64'\n*/\nfunction emptyLike( x ) {\n\tvar options;\n\tvar dtype;\n\tvar order;\n\tvar ndims;\n\tvar opts;\n\tvar buf;\n\tvar len;\n\tvar st;\n\tvar sh;\n\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ndarray-like object. Value: `%s`.', x ) );\n\t}\n\topts = {};\n\tif ( arguments.length > 1 ) {\n\t\toptions = arguments[ 1 ];\n\t\tif ( !isPlainObject( options ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t\t}\n\t\tif ( hasOwnProp( options, 'dtype' ) ) {\n\t\t\tdtype = options.dtype;\n\t\t} else {\n\t\t\tdtype = getDType( x );\n\t\t}\n\t\tif ( hasOwnProp( options, 'shape' ) ) {\n\t\t\tsh = options.shape;\n\t\t\tif ( typeof sh === 'number' ) {\n\t\t\t\tsh = [ sh ];\n\t\t\t}\n\t\t\tif ( !isNonNegativeIntegerArray( sh ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a nonnegative integer or an array of nonnegative integers. Option: `%s`.', 'shape', sh ) );\n\t\t\t}\n\t\t} else {\n\t\t\tsh = getShape( x );\n\t\t}\n\t\tif ( hasOwnProp( options, 'order' ) ) {\n\t\t\torder = options.order;\n\t\t} else {\n\t\t\torder = getOrder( x );\n\t\t}\n\t\tif ( hasOwnProp( options, 'mode' ) ) {\n\t\t\topts.mode = options.mode;\n\t\t}\n\t\tif ( hasOwnProp( options, 'submode' ) ) {\n\t\t\topts.submode = options.submode;\n\t\t}\n\t} else {\n\t\tdtype = getDType( x );\n\t\tsh = getShape( x );\n\t\torder = getOrder( x );\n\t}\n\tndims = sh.length;\n\tif ( ndims > 0 ) {\n\t\tlen = numel( sh );\n\t\tst = shape2strides( sh, order );\n\t} else {\n\t\t// For 0-dimensional arrays, the buffer should contain a single element...\n\t\tlen = 1;\n\t\tst = [ 0 ];\n\t}\n\tif ( dtype === 'binary' ) {\n\t\tbuf = allocUnsafe( len );\n\t} else {\n\t\tbuf = emptyArray( len, dtype );\n\t}\n\treturn new ndarray( dtype, buf, sh, st, strides2offset( sh, st ), order, opts ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = emptyLike;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create an uninitialized ndarray having the same shape and data type as a provided ndarray.\n*\n* @module @stdlib/ndarray/empty-like\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var emptyLike = require( '@stdlib/ndarray/empty-like' );\n*\n* var x = zeros( [ 2, 2 ] );\n* // returns \n*\n* var y = emptyLike( x );\n* // returns \n*\n* var sh = y.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = y.dtype;\n* // returns 'float64'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Regular expression for testing whether a string is an integer string.\n*\n* @private\n* @name RE_INTEGER\n* @type {RegExp}\n*\n* @example\n* var bool = RE_INTEGER.test( '10' );\n* // returns true\n*\n* @example\n* var bool = RE_INTEGER.test( '-1' );\n* // returns true\n*\n* @example\n* var bool = RE_INTEGER.test( '0:10:2' );\n* // returns false\n*/\nvar RE_INTEGER = /^-?[0-9]+$/;\n\n\n// EXPORTS //\n\nmodule.exports = RE_INTEGER;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Regular expression for testing whether a string is a subsequence string.\n*\n* @private\n* @name RE_SUBSEQ\n* @type {RegExp}\n*\n* @example\n* var bool = RE_SUBSEQ.test( '0:10:2' );\n* // returns true\n*\n* @example\n* var bool = RE_SUBSEQ.test( '0' );\n* // returns false\n*\n* @example\n* var bool = RE_SUBSEQ.test( 'Slice(0,10,2)' );\n* // returns false\n*/\nvar RE_SUBSEQ = /:/;\n\n\n// EXPORTS //\n\nmodule.exports = RE_SUBSEQ;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar trim = require( '@stdlib/string/base/trim' );\nvar replace = require( '@stdlib/string/base/replace' );\nvar MultiSlice = require( '@stdlib/slice/multi' );\nvar str2multislice = require( '@stdlib/slice/base/str2multislice' );\nvar seq2multislice = require( '@stdlib/slice/base/seq2multislice' );\nvar str2slice = require( '@stdlib/slice/base/str2slice' );\nvar format = require( '@stdlib/string/format' );\nvar RE_INTEGER = require( './re_integer.js' );\nvar RE_SUBSEQ = require( './re_subseq.js' );\n\n\n// MAIN //\n\n/**\n* Converts a zero-dimensional ndarray indexing expression to a slice.\n*\n* @private\n* @param {Object} target - target object\n* @param {string} property - property name\n* @param {boolean} strict - boolean indicating whether to enforce strict bounds checking\n* @throws {Error} invalid slice operation\n* @throws {RangeError} number of slice dimensions must match the number of array dimensions\n* @returns {MultiSlice} multi-slice object\n*/\nfunction prop2slice( target, property ) {\n\tvar shape;\n\tvar prop;\n\tvar ch;\n\tvar s;\n\n\tprop = trim( property );\n\n\t// Retrieve the first character in order to to detect how a slice operation was specified:\n\tch = prop[ 0 ];\n\n\t// Case: slice\n\tif ( ch === 'S' ) {\n\t\t// Convert the string to a slice object:\n\t\ts = str2slice( property );\n\t\tif ( s === null ) {\n\t\t\tthrow new Error( format( 'invalid operation. Unsupported slice operation. Value: `%s`.', property ) );\n\t\t}\n\t\t// Create a multi-slice:\n\t\ts = new MultiSlice( s );\n\t}\n\t// Case: multi-slice\n\telse if ( ch === 'M' ) {\n\t\t// Convert the string to a slice object:\n\t\ts = str2multislice( prop );\n\t\tif ( s === null ) {\n\t\t\tthrow new Error( format( 'invalid operation. Unsupported slice operation. Value: `%s`.', property ) );\n\t\t}\n\t}\n\t// Case: integer\n\telse if ( RE_INTEGER.test( prop ) ) {\n\t\t// Convert the string to a numeric value:\n\t\ts = parseInt( prop, 10 );\n\n\t\t// Create a multi-slice:\n\t\ts = new MultiSlice( s );\n\t}\n\t// Case: subsequence string (e.g., ':10,1,::-1,:,-5,2::3')\n\telse if ( RE_SUBSEQ.test( prop ) ) {\n\t\tshape = target.shape;\n\t\ts = seq2multislice( prop, shape, true );\n\t\tif ( s.code ) {\n\t\t\tif ( s.code === 'ERR_SLICE_INVALID_INCREMENT' ) {\n\t\t\t\tthrow new Error( format( 'invalid operation. A subsequence increment must be a non-zero integer. Value: `%s`.', property ) );\n\t\t\t}\n\t\t\tif ( s.code === 'ERR_SLICE_INVALID_ELLIPSIS' ) {\n\t\t\t\tthrow new Error( format( 'invalid operation. A subsequence may only include a single ellipsis. Value: `%s`.', property ) );\n\t\t\t}\n\t\t\tif ( s.code === 'ERR_SLICE_INVALID_SUBSEQUENCE' ) {\n\t\t\t\tthrow new Error( format( 'invalid operation. Unsupported slice operation. Value: `%s`.', property ) );\n\t\t\t}\n\t\t\t// s.code === 'ERR_SLICE_TOO_MANY_DIMENSIONS'\n\t\t\tthrow new RangeError( format( 'invalid operation. Number of slice dimensions does not match the number of array dimensions. Array shape: (%s). Slice dimensions: %u.', shape.join( ',' ), replace( prop, /\\.\\.\\.,/, '' ).split( ',' ).length ) );\n\t\t}\n\t}\n\t// Case: empty string or ellipsis\n\telse if ( prop.length === 0 || prop === '...' ) {\n\t\ts = new MultiSlice();\n\t}\n\t// Case: non-empty string\n\telse {\n\t\tthrow new Error( format( 'invalid operation. Unsupported slice operation. Value: `%s`.', property ) );\n\t}\n\treturn s;\n}\n\n\n// EXPORTS //\n\nmodule.exports = prop2slice;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar trim = require( '@stdlib/string/base/trim' );\nvar replace = require( '@stdlib/string/base/replace' );\nvar MultiSlice = require( '@stdlib/slice/multi' );\nvar str2multislice = require( '@stdlib/slice/base/str2multislice' );\nvar seq2multislice = require( '@stdlib/slice/base/seq2multislice' );\nvar str2slice = require( '@stdlib/slice/base/str2slice' );\nvar format = require( '@stdlib/string/format' );\nvar RE_INTEGER = require( './re_integer.js' );\n\n\n// MAIN //\n\n/**\n* Converts a one-dimensional ndarray indexing expression to a slice.\n*\n* @private\n* @param {Object} target - target object\n* @param {string} property - property name\n* @param {boolean} strict - boolean indicating whether to enforce strict bounds checking\n* @throws {Error} invalid slice operation\n* @throws {RangeError} number of slice dimensions must match the number of array dimensions\n* @returns {MultiSlice} multi-slice object\n*/\nfunction prop2slice( target, property, strict ) {\n\tvar shape;\n\tvar prop;\n\tvar ch;\n\tvar s;\n\n\tprop = trim( property );\n\n\t// Retrieve the first character in order to to detect how a slice operation was specified:\n\tch = prop[ 0 ];\n\n\t// Case: slice\n\tif ( ch === 'S' ) {\n\t\t// Convert the string to a slice object:\n\t\ts = str2slice( property );\n\t\tif ( s === null ) {\n\t\t\tthrow new Error( format( 'invalid operation. Unsupported slice operation. Value: `%s`.', property ) );\n\t\t}\n\t\t// Create a multi-slice:\n\t\ts = new MultiSlice( s );\n\t}\n\t// Case: multi-slice\n\telse if ( ch === 'M' ) {\n\t\t// Convert the string to a slice object:\n\t\ts = str2multislice( prop );\n\t\tif ( s === null ) {\n\t\t\tthrow new Error( format( 'invalid operation. Unsupported slice operation. Value: `%s`.', property ) );\n\t\t}\n\t}\n\t// Case: integer\n\telse if ( RE_INTEGER.test( prop ) ) {\n\t\t// Convert the string to a numeric value:\n\t\ts = parseInt( prop, 10 );\n\n\t\t// Create a multi-slice:\n\t\ts = new MultiSlice( s );\n\t}\n\t// Case: subsequence string\n\telse if ( prop.length > 0 ) {\n\t\tshape = target.shape;\n\t\ts = seq2multislice( prop, shape, true );\n\t\tif ( s.code ) {\n\t\t\tif ( s.code === 'ERR_SLICE_INVALID_INCREMENT' ) {\n\t\t\t\tthrow new Error( format( 'invalid operation. A subsequence increment must be a non-zero integer. Value: `%s`.', property ) );\n\t\t\t}\n\t\t\tif ( s.code === 'ERR_SLICE_INVALID_ELLIPSIS' ) {\n\t\t\t\tthrow new Error( format( 'invalid operation. A subsequence may only include a single ellipsis. Value: `%s`.', property ) );\n\t\t\t}\n\t\t\tif ( s.code === 'ERR_SLICE_INVALID_SUBSEQUENCE' ) {\n\t\t\t\tthrow new Error( format( 'invalid operation. Unsupported slice operation. Value: `%s`.', property ) );\n\t\t\t}\n\t\t\tif ( s.code === 'ERR_SLICE_TOO_MANY_DIMENSIONS' ) {\n\t\t\t\tthrow new RangeError( format( 'invalid operation. Number of slice dimensions does not match the number of array dimensions. Array shape: (%s). Slice dimensions: %u.', target.shape.join( ',' ), replace( prop, /\\.\\.\\.,/, '' ).split( ',' ).length ) );\n\t\t\t}\n\t\t\t// NOTE: the following error check must come last due to fall-through when in non-strict mode...\n\t\t\tif ( s.code === 'ERR_SLICE_OUT_OF_BOUNDS' ) {\n\t\t\t\tif ( strict ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid operation. Slice exceeds array bounds. Array shape: (%s).', shape.join( ',' ) ) );\n\t\t\t\t}\n\t\t\t\t// Repeat parsing, this time allowing for out-of-bounds slices:\n\t\t\t\ts = seq2multislice( prop, shape, false );\n\t\t\t}\n\t\t}\n\t}\n\t// Case: empty string\n\telse {\n\t\tthrow new RangeError( format( 'invalid operation. Number of slice dimensions does not match the number of array dimensions. Array shape: (%s). Slice dimensions: %u.', target.shape.join( ',' ), 0 ) );\n\t}\n\treturn s;\n}\n\n\n// EXPORTS //\n\nmodule.exports = prop2slice;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar trim = require( '@stdlib/string/base/trim' );\nvar str2multislice = require( '@stdlib/slice/base/str2multislice' );\nvar seq2multislice = require( '@stdlib/slice/base/seq2multislice' );\nvar sargs2multislice = require( '@stdlib/slice/base/sargs2multislice' );\nvar format = require( '@stdlib/string/format' );\nvar RE_SUBSEQ = require( './re_subseq.js' );\n\n\n// MAIN //\n\n/**\n* Converts an n-dimensional ndarray indexing expression to a slice.\n*\n* @private\n* @param {Object} target - target object\n* @param {string} property - property name\n* @param {boolean} strict - boolean indicating whether to enforce strict bounds checking\n* @throws {Error} invalid slice operation\n* @throws {RangeError} number of slice dimensions must match the number of array dimensions\n* @returns {MultiSlice} multi-slice object\n*/\nfunction prop2slice( target, property, strict ) {\n\tvar shape;\n\tvar prop;\n\tvar ch;\n\tvar s;\n\n\tprop = trim( property );\n\n\t// Retrieve the first character in order to to detect how a slice operation was specified:\n\tch = prop[ 0 ];\n\n\t// Case: multi-slice (e.g., 'MultiSlice(Slice(0,10,2),null,2,Slice(10,5,-1))')\n\tif ( ch === 'M' ) {\n\t\ts = str2multislice( prop );\n\t\tif ( s === null ) {\n\t\t\tthrow new Error( format( 'invalid operation. Unsupported slice operation. Value: `%s`.', property ) );\n\t\t}\n\t}\n\t// Case: subsequence string (e.g., '...' or ':10,1,::-1,:,-5,2::3')\n\telse if ( RE_SUBSEQ.test( prop ) || prop === '...' ) {\n\t\tshape = target.shape;\n\t\ts = seq2multislice( prop, shape, true );\n\t\tif ( s.code ) {\n\t\t\tif ( s.code === 'ERR_SLICE_INVALID_INCREMENT' ) {\n\t\t\t\tthrow new Error( format( 'invalid operation. A subsequence increment must be a non-zero integer. Value: `%s`.', property ) );\n\t\t\t}\n\t\t\tif ( s.code === 'ERR_SLICE_INVALID_ELLIPSIS' ) {\n\t\t\t\tthrow new Error( format( 'invalid operation. A subsequence may only include a single ellipsis. Value: `%s`.', property ) );\n\t\t\t}\n\t\t\tif ( s.code === 'ERR_SLICE_INVALID_SUBSEQUENCE' ) {\n\t\t\t\tthrow new Error( format( 'invalid operation. Unsupported slice operation. Value: `%s`.', property ) );\n\t\t\t}\n\t\t\t// NOTE: the following error check must come last due to fall-through when in non-strict mode...\n\t\t\tif ( s.code === 'ERR_SLICE_OUT_OF_BOUNDS' ) {\n\t\t\t\tif ( strict ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid operation. Slice exceeds array bounds. Array shape: (%s).', shape.join( ',' ) ) );\n\t\t\t\t}\n\t\t\t\t// Repeat parsing, this time allowing for out-of-bounds slices:\n\t\t\t\ts = seq2multislice( prop, shape, false );\n\t\t\t}\n\t\t}\n\t}\n\t// Case: array syntax (e.g., [ Slice(0,10,1), null, Slice(4,null,-1) ]) or Slice or integer or arbitrary string (where the latter three are not valid for >2d arrays)\n\telse {\n\t\ts = sargs2multislice( prop );\n\t\tif ( s === null ) {\n\t\t\tthrow new Error( format( 'invalid operation. Unsupported slice operation. Value: `%s`.', property ) );\n\t\t}\n\t}\n\treturn s;\n}\n\n\n// EXPORTS //\n\nmodule.exports = prop2slice;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar propertiesIn = require( '@stdlib/utils/properties-in' );\nvar contains = require( '@stdlib/array/base/assert/contains' ).factory;\nvar ndarray = require( './../../ctor' );\nvar defaults = require( './../../defaults' );\n\n\n// MAIN //\n\n/**\n* Tests whether a property name exists on the parent prototype.\n*\n* @private\n* @name hasProperty\n* @type {Function}\n* @param {(string|symbol)} name - property name\n* @returns {boolean} boolean indicating whether the property exists on the parent prototype\n*\n* @example\n* var bool = hasProperty( 'get' );\n* // returns true\n*\n* bool = hasProperty( 'foo' );\n* // returns false\n*/\nvar hasProperty = contains( propertiesIn( new ndarray( 'generic', [ 0 ], [], [ 0 ], 0, defaults.get( 'order' ) ) ) );\n\n\n// EXPORTS //\n\nmodule.exports = hasProperty;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isFunction = require( '@stdlib/assert/is-function' );\n\n\n// MAIN //\n\n/**\n* Returns the property value associated with a specified property.\n*\n* @private\n* @param {Object} target - target object\n* @param {(string|symbol)} property - property\n* @param {Object} receiver - the proxy object or an object inheriting from the proxy\n* @returns {*} result\n*/\nfunction getValue( target, property, receiver ) {\n\tvar value = target[ property ];\n\tif ( isFunction( value ) ) {\n\t\treturn wrapper;\n\t}\n\treturn value;\n\n\t/**\n\t* Method wrapper.\n\t*\n\t* @private\n\t* @returns {*} results\n\t*/\n\tfunction wrapper() {\n\t\tvar args;\n\t\tvar i;\n\n\t\targs = [];\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs.push( arguments[ i ] );\n\t\t}\n\t\treturn value.apply( ( this === receiver ) ? target : this, args ); // eslint-disable-line no-invalid-this\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = getValue;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar replace = require( '@stdlib/string/base/replace' );\n\n\n// MAIN //\n\n/**\n* Returns an updated error message for trapped errors.\n*\n* @private\n* @param {string} msg - error message\n* @returns {string} updated message\n*/\nfunction errMessage( msg ) {\n\treturn replace( msg, /^invalid argument/, 'invalid operation' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = errMessage;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isRangeError = require( '@stdlib/assert/is-range-error' );\nvar isTypeError = require( '@stdlib/assert/is-type-error' );\nvar isSyntaxError = require( '@stdlib/assert/is-syntax-error' );\n\n\n// MAIN //\n\n/**\n* Returns the error constructor for a provided error object.\n*\n* @private\n* @param {Error} err - error object\n* @returns {Function} error constructor\n*/\nfunction errConstructor( err ) {\n\tif ( isRangeError( err ) ) {\n\t\treturn RangeError;\n\t}\n\tif ( isTypeError( err ) ) {\n\t\treturn TypeError;\n\t}\n\tif ( isSyntaxError( err ) ) {\n\t\treturn SyntaxError;\n\t}\n\treturn Error;\n}\n\n\n// EXPORTS //\n\nmodule.exports = errConstructor;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar slice = require( './../../base/slice' );\nvar errMessage = require( './error_message.js' );\nvar errConstructor = require( './error_constructor.js' );\n\n\n// MAIN //\n\n/**\n* Returns an ndarray view.\n*\n* @private\n* @param {Object} target - target object\n* @param {string} property - property name\n* @param {Object} receiver - the proxy object or an object inheriting from the proxy\n* @param {Function} prop2slice - function for converting an indexing expression to a slice\n* @throws {Error} invalid slice operation\n* @throws {RangeError} number of slice dimensions must match the number of array dimensions\n* @returns {FancyArray} result\n*/\nfunction getSlice( target, property, receiver, prop2slice ) { // eslint-disable-line stdlib/jsdoc-require-throws-tags\n\tvar strict;\n\tvar E;\n\tvar s;\n\n\tstrict = false; // TODO: support strict mode\n\ts = prop2slice( target, property, strict );\n\ttry {\n\t\treturn slice( receiver, s, strict, false );\n\t} catch ( err ) {\n\t\tE = errConstructor( err );\n\t\tthrow new E( errMessage( err.message ) );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = getSlice;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar hasProperty = require( './has_property.js' );\nvar getValue = require( './get_value.js' );\nvar getSlice = require( './get_slice.js' );\n\n\n// MAIN //\n\n/**\n* Returns a trap for retrieving property values.\n*\n* @private\n* @param {Function} prop2slice - function for converting an indexing expression to a slice\n* @returns {Function} handler\n*/\nfunction factory( prop2slice ) {\n\treturn get;\n\n\t/**\n\t* Trap for retrieving property values.\n\t*\n\t* @private\n\t* @param {Object} target - target object\n\t* @param {(string|symbol)} property - property name\n\t* @param {Object} receiver - the proxy object or an object inheriting from the proxy\n\t* @throws {Error} invalid slice operation\n\t* @throws {RangeError} number of slice dimensions must match the number of array dimensions\n\t* @returns {*} result\n\t*/\n\tfunction get( target, property, receiver ) {\n\t\tif ( hasProperty( property ) ) {\n\t\t\treturn getValue( target, property, receiver );\n\t\t}\n\t\treturn getSlice( target, property, receiver, prop2slice );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = factory;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Sets the value associated with a specified property.\n*\n* @private\n* @param {Object} target - target object\n* @param {string} property - property\n* @param {*} value - new value\n* @param {Object} receiver - the proxy object or an object inheriting from the proxy\n* @returns {boolean} boolean indicating whether assignment succeeded\n*/\nfunction setValue( target, property, value ) {\n\ttarget[ property ] = value;\n\treturn true;\n}\n\n\n// EXPORTS //\n\nmodule.exports = setValue;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isInteger = require( '@stdlib/math/base/assert/is-integer' );\nvar isNegativeZero = require( '@stdlib/math/base/assert/is-negative-zero' );\nvar isComplexLike = require( '@stdlib/assert/is-complex-like' );\nvar PINF = require( '@stdlib/constants/float64/pinf' );\nvar NINF = require( '@stdlib/constants/float64/ninf' );\nvar FLOAT32_SMALLEST_SUBNORMAL = require( '@stdlib/constants/float32/smallest-subnormal' ); // eslint-disable-line id-length\nvar FLOAT32_MAX_SAFE_INTEGER = require( '@stdlib/constants/float32/max-safe-integer' );\nvar FLOAT32_MIN_SAFE_INTEGER = require( '@stdlib/constants/float32/min-safe-integer' );\nvar INT8_MIN = require( '@stdlib/constants/int8/min' );\nvar INT16_MIN = require( '@stdlib/constants/int16/min' );\nvar INT32_MIN = require( '@stdlib/constants/int32/min' );\nvar UINT8_MAX = require( '@stdlib/constants/uint8/max' );\nvar UINT16_MAX = require( '@stdlib/constants/uint16/max' );\nvar UINT32_MAX = require( '@stdlib/constants/uint32/max' );\n\n\n// FUNCTIONS //\n\n/**\n* Returns the minimum floating-point ndarray data type of the closest \"kind\" necessary for storing a provided scalar.\n*\n* @private\n* @param {number} value - real value\n* @returns {string} ndarray data type\n*/\nfunction minFloatDataType( value ) {\n\tif ( value !== value || value === PINF || value === NINF ) {\n\t\treturn 'float32';\n\t}\n\tif ( isInteger( value ) ) {\n\t\tif ( value >= FLOAT32_MIN_SAFE_INTEGER && value <= FLOAT32_MAX_SAFE_INTEGER ) { // eslint-disable-line max-len\n\t\t\treturn 'float32';\n\t\t}\n\t\treturn 'float64';\n\t}\n\t// Assume that if we are provided a tiny value, we don't want to underflow to zero by storing as `float32`...\n\tif (\n\t\tvalue > -FLOAT32_SMALLEST_SUBNORMAL &&\n\t\tvalue < FLOAT32_SMALLEST_SUBNORMAL\n\t) {\n\t\treturn 'float64';\n\t}\n\t// Any number which reaches this point is less than the maximum single-precision floating-point number, as floating-point format supports a limited number of decimals (e.g., (1.0+EPS)*10**15 => 1000000000000000.2, which is less than ~3.4e38)...\n\treturn 'float32';\n}\n\n\n// MAIN //\n\n/**\n* Returns the minimum ndarray data type of the closest \"kind\" necessary for storing a provided scalar value.\n*\n* @param {*} value - scalar value\n* @returns {string} ndarray data type\n*\n* @example\n* var dt = minDataType( 3.141592653589793 );\n* // returns 'float32'\n*\n* @example\n* var dt = minDataType( 3 );\n* // returns 'uint8'\n*/\nfunction minDataType( value ) {\n\tif ( typeof value !== 'number' ) {\n\t\tif ( isComplexLike( value ) ) {\n\t\t\tif ( minFloatDataType( value.re ) === 'float64' || minFloatDataType( value.im ) === 'float64' ) {\n\t\t\t\treturn 'complex128';\n\t\t\t}\n\t\t\treturn 'complex64';\n\t\t}\n\t\treturn 'generic';\n\t}\n\tif ( value !== value || value === PINF || value === NINF ) {\n\t\treturn 'float32';\n\t}\n\tif ( isInteger( value ) ) {\n\t\tif ( value === 0 && isNegativeZero( value ) ) {\n\t\t\treturn 'float32';\n\t\t}\n\t\tif ( value < 0 ) {\n\t\t\tif ( value >= INT8_MIN ) {\n\t\t\t\treturn 'int8';\n\t\t\t}\n\t\t\tif ( value >= INT16_MIN ) {\n\t\t\t\treturn 'int16';\n\t\t\t}\n\t\t\tif ( value >= INT32_MIN ) {\n\t\t\t\treturn 'int32';\n\t\t\t}\n\t\t\treturn 'float64';\n\t\t}\n\t\tif ( value <= UINT8_MAX ) {\n\t\t\treturn 'uint8';\n\t\t}\n\t\tif ( value <= UINT16_MAX ) {\n\t\t\treturn 'uint16';\n\t\t}\n\t\tif ( value <= UINT32_MAX ) {\n\t\t\treturn 'uint32';\n\t\t}\n\t\treturn 'float64';\n\t}\n\t// Assume that if we are provided a tiny value, we don't want to underflow to zero by storing as `float32`...\n\tif (\n\t\tvalue > -FLOAT32_SMALLEST_SUBNORMAL &&\n\t\tvalue < FLOAT32_SMALLEST_SUBNORMAL\n\t) {\n\t\treturn 'float64';\n\t}\n\t// Any number which reaches this point is less than the maximum single-precision floating-point number, given that floating-point format supports a limited number of decimals (e.g., (1.0+EPS)*10**15 => 1000000000000000.2, which is less than ~3.4e38)...\n\treturn 'float32';\n}\n\n\n// EXPORTS //\n\nmodule.exports = minDataType;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Determine the minimum ndarray data type of the closest \"kind\" necessary for storing a provided scalar value.\n*\n* @module @stdlib/ndarray/min-dtype\n*\n* @example\n* var minDataType = require( '@stdlib/ndarray/min-dtype' );\n*\n* var dt = minDataType( 3.141592653589793 );\n* // returns 'float32'\n*\n* dt = minDataType( 3 );\n* // returns 'uint8'\n*/\n\n// MODULES //\n\nvar minDataType = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = minDataType;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar isPlainObject = require( '@stdlib/assert/is-plain-object' );\nvar isNumber = require( '@stdlib/assert/is-number' ).isPrimitive;\nvar isComplexLike = require( '@stdlib/assert/is-complex-like' );\nvar isAccessorArray = require( '@stdlib/array/base/assert/is-accessor-array' );\nvar accessorSetter = require( '@stdlib/array/base/accessor-setter' );\nvar setter = require( '@stdlib/array/base/setter' );\nvar buffer = require( './../../base/buffer' );\nvar ndarray = require( './../../ctor' );\nvar defaults = require( './../../defaults' );\nvar format = require( '@stdlib/string/format' );\n\n\n// VARIABLES //\n\nvar ORDER = defaults.get( 'order' );\n\n\n// MAIN //\n\n/**\n* Returns a zero-dimensional ndarray containing a provided scalar value.\n*\n* ## Notes\n*\n* - If a `dtype` option is not provided and `value`\n*\n* - is a `number`, the default data type is `'float64'`.\n* - is a complex number object, the default data type is `'complex128'`.\n* - is any other value type, the default data type is `'generic'`.\n*\n* @param {*} value - scalar value\n* @param {Options} [options] - function options\n* @param {string} [options.dtype] - output array data type\n* @param {string} [options.order=\"row-major\"] - memory layout (either row-major or column-major)\n* @param {boolean} [options.readonly=false] - boolean indicating whether an array should be read-only\n* @throws {TypeError} second argument must be an object\n* @throws {TypeError} `dtype` option must be a recognized data type\n* @returns {ndarray} ndarray\n*\n* @example\n* var x = scalar2ndarray( 1.0 );\n* // returns \n*\n* var sh = x.shape;\n* // returns []\n*\n* var dt = x.dtype;\n* // returns 'float64'\n*\n* var v = x.get();\n* // returns 1.0\n*\n* @example\n* var x = scalar2ndarray( 1.0, {\n* 'dtype': 'float32'\n* });\n* // returns \n*\n* var sh = x.shape;\n* // returns []\n*\n* var dt = x.dtype;\n* // returns 'float32'\n*\n* var v = x.get();\n* // returns 1.0\n*/\nfunction scalar2ndarray( value ) {\n\tvar options;\n\tvar opts;\n\tvar buf;\n\tvar flg;\n\tvar set;\n\tvar dt;\n\tvar v;\n\n\topts = {\n\t\t'dtype': '',\n\t\t'order': ORDER,\n\t\t'readonly': false\n\t};\n\tif ( arguments.length > 1 ) {\n\t\toptions = arguments[ 1 ];\n\t\tif ( !isPlainObject( options ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t\t}\n\t\tif ( hasOwnProp( options, 'dtype' ) ) {\n\t\t\topts.dtype = options.dtype;\n\t\t}\n\t\tif ( hasOwnProp( options, 'order' ) ) {\n\t\t\topts.order = options.order;\n\t\t}\n\t\tif ( hasOwnProp( options, 'readonly' ) ) {\n\t\t\topts.readonly = options.readonly;\n\t\t}\n\t}\n\tflg = isNumber( value );\n\tif ( opts.dtype === '' ) {\n\t\tif ( flg ) {\n\t\t\tdt = 'float64';\n\t\t} else if ( isComplexLike( value ) ) {\n\t\t\tdt = 'complex128';\n\t\t} else {\n\t\t\tdt = 'generic';\n\t\t}\n\t} else {\n\t\tdt = opts.dtype;\n\t}\n\tbuf = buffer( dt, 1 );\n\tif ( buf === null ) {\n\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a recognized data type. Option: `%s`.', 'dtype', dt ) );\n\t}\n\tif ( /^complex/.test( dt ) && flg ) {\n\t\tv = [ value, 0.0 ]; // note: we're assuming that the ComplexXXArray setter accepts an array of interleaved real and imaginary components\n\t} else {\n\t\tv = value;\n\t}\n\tif ( isAccessorArray( buf ) ) {\n\t\tset = accessorSetter( dt );\n\t} else {\n\t\tset = setter( dt );\n\t}\n\tset( buf, 0, v );\n\treturn new ndarray( dt, buf, [], [ 0 ], 0, opts.order, opts );\n}\n\n\n// EXPORTS //\n\nmodule.exports = scalar2ndarray;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a scalar value to a zero-dimensional ndarray.\n*\n* @module @stdlib/ndarray/from-scalar\n*\n* @example\n* var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' );\n*\n* var x = scalar2ndarray( 1.0 );\n* // returns \n*\n* var sh = x.shape;\n* // returns []\n*\n* var dt = x.dtype;\n* // returns 'float64'\n*\n* var v = x.get();\n* // returns 1.0\n*\n* @example\n* var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' );\n*\n* var x = scalar2ndarray( 1.0, {\n* 'dtype': 'float32'\n* });\n* // returns \n*\n* var sh = x.shape;\n* // returns []\n*\n* var dt = x.dtype;\n* // returns 'float32'\n*\n* var v = x.get();\n* // returns 1.0\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar sliceAssign = require( './../../base/slice-assign' );\nvar isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );\nvar isNumber = require( '@stdlib/assert/is-number' ).isPrimitive;\nvar isInteger = require( '@stdlib/assert/is-integer' ).isPrimitive;\nvar isComplexLike = require( '@stdlib/assert/is-complex-like' );\nvar isComplexDataType = require( './../../base/assert/is-complex-floating-point-data-type' );\nvar isFloatingDataType = require( './../../base/assert/is-floating-point-data-type' );\nvar isUnsignedIntegerDataType = require( './../../base/assert/is-unsigned-integer-data-type' );\nvar isSignedIntegerDataType = require( './../../base/assert/is-signed-integer-data-type' );\nvar isSafeCast = require( './../../base/assert/is-safe-data-type-cast' );\nvar INT8_MAX = require( '@stdlib/constants/int8/max' );\nvar INT16_MAX = require( '@stdlib/constants/int16/max' );\nvar INT32_MAX = require( '@stdlib/constants/int32/max' );\nvar minDataType = require( './../../min-dtype' );\nvar complexDataType = require( '@stdlib/complex/dtype' );\nvar scalar2ndarray = require( './../../from-scalar' );\nvar format = require( '@stdlib/string/format' );\nvar errMessage = require( './error_message.js' );\nvar errConstructor = require( './error_constructor.js' );\n\n\n// FUNCTIONS //\n\n/**\n* Returns an options object for creating an ndarray from a scalar value.\n*\n* @private\n* @param {string} dtype - output array data type\n* @returns {Object} options\n*/\nfunction options( dtype ) {\n\treturn {\n\t\t'dtype': dtype\n\t};\n}\n\n\n// MAIN //\n\n/**\n* Sets element values belonging to the ndarray view specified by an indexing expression.\n*\n* @private\n* @param {Object} target - target object\n* @param {string} property - indexing expression\n* @param {*} value - new value\n* @param {Object} receiver - the proxy object or an object inheriting from the proxy\n* @param {Function} prop2slice - function for converting an indexing expression to a slice\n* @throws {Error} invalid slice operation\n* @throws {RangeError} number of slice dimensions must match the number of array dimensions\n* @throws {Error} assigned value must be broadcast compatible with target array view\n* @throws {TypeError} assigned value cannot be safely cast to the target array data type\n* @throws {TypeError} target array must have a supported data type\n* @returns {boolean} boolean indicating whether assignment succeeded\n*/\nfunction setSlice( target, property, value, receiver, prop2slice ) { // eslint-disable-line stdlib/jsdoc-require-throws-tags\n\tvar strict;\n\tvar vdt;\n\tvar dt;\n\tvar E;\n\tvar s;\n\n\tif ( !isndarrayLike( value ) ) {\n\t\tdt = target.dtype;\n\n\t\t// If the target array data type is \"generic\", we can just go ahead and \"cast\" to the target array data type...\n\t\tif ( dt === 'generic' ) {\n\t\t\tvalue = scalar2ndarray( value, options( dt ) );\n\t\t}\n\t\t// If the input value is real-valued number, we need to inspect the value to determine whether we can safely cast the value to the target array data type...\n\t\telse if ( isNumber( value ) ) {\n\t\t\t// If the target array has a floating-point data type, we can just go ahead and cast the input scalar to the target array data type...\n\t\t\tif ( isFloatingDataType( dt ) ) {\n\t\t\t\tvalue = scalar2ndarray( value, options( dt ) );\n\t\t\t}\n\t\t\t// If the target array has an unsigned integer data type, then the assigned value must be a compatible nonnegative integer value...\n\t\t\telse if ( isUnsignedIntegerDataType( dt ) ) {\n\t\t\t\tvdt = minDataType( value );\n\t\t\t\tif ( isSafeCast( vdt, dt ) ) {\n\t\t\t\t\tvalue = scalar2ndarray( value, options( dt ) );\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].', vdt, dt ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If the target array has a signed integer data type, then the assigned value must be a compatible integer value...\n\t\t\telse if ( isSignedIntegerDataType( dt ) ) {\n\t\t\t\tif ( !isInteger( value ) ) {\n\t\t\t\t\tthrow new TypeError( format( 'invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].', minDataType( value ), dt ) );\n\t\t\t\t}\n\t\t\t\t// Manually resolve the minimum data type of the closest \"kind\" necessary for storing a scalar value, as `minDataType()` defaults to unsigned integer data types when a scalar value is greater than or equal to zero...\n\t\t\t\tif ( value < 0 ) {\n\t\t\t\t\tvdt = minDataType( value );\n\t\t\t\t} else if ( value <= INT8_MAX ) { // TODO: consider moving this logic to `@stdlib/ndarray/base/min-signed-intger-dtype` where the interface can assume that `value` is integer-valued\n\t\t\t\t\tvdt = 'int8';\n\t\t\t\t} else if ( value <= INT16_MAX ) {\n\t\t\t\t\tvdt = 'int16';\n\t\t\t\t} else if ( value <= INT32_MAX ) {\n\t\t\t\t\tvdt = 'int32';\n\t\t\t\t} else {\n\t\t\t\t\tvdt = 'float64';\n\t\t\t\t}\n\t\t\t\tif ( isSafeCast( vdt, dt ) ) {\n\t\t\t\t\tvalue = scalar2ndarray( value, options( dt ) );\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].', vdt, dt ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If the target array has \"binary\" data type, then the assigned value must be a compatible nonnegative integer value...\n\t\t\telse if ( dt === 'binary' ) {\n\t\t\t\tvdt = minDataType( value );\n\t\t\t\tif ( vdt === 'uint8' ) {\n\t\t\t\t\tvalue = scalar2ndarray( value, options( dt ) );\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].', vdt, dt ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If we reach this point, we must be dealing with an unexpected target array data type...\n\t\t\telse {\n\t\t\t\t// Raise an exception in order to flag that, in order to perform assignment, we need to add explicit support for additional data types:\n\t\t\t\tthrow new TypeError( format( 'invalid operation. Unsupported target array data type. Data type: `%s`.', dt ) );\n\t\t\t}\n\t\t}\n\t\t// If the target array is not \"generic\" and the input value is a complex number, then the target array data type must also have a complex number data type...\n\t\telse if ( isComplexLike( value ) ) {\n\t\t\tif ( !isComplexDataType( dt ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].', complexDataType( value ), dt ) );\n\t\t\t}\n\t\t\tvalue = scalar2ndarray( value, options( dt ) );\n\t\t}\n\t\t// If the target array is not \"generic\" and the input value is neither a real- or complex-valued number, raise an exception in order to flag that, in order to perform assignment, we need to add explicit support for additional data types...\n\t\telse {\n\t\t\tthrow new TypeError( format( 'invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].', typeof value, dt ) );\n\t\t}\n\t}\n\tstrict = false; // TODO: support strict mode\n\ts = prop2slice( target, property, strict );\n\ttry {\n\t\tsliceAssign( value, receiver, s, strict );\n\t\treturn true;\n\t} catch ( err ) {\n\t\tE = errConstructor( err );\n\t\tthrow new E( errMessage( err.message ) );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = setSlice;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar hasProperty = require( './has_property.js' );\nvar setValue = require( './set_value.js' );\nvar setSlice = require( './set_slice.js' );\n\n\n// MAIN //\n\n/**\n* Returns a trap for setting property values.\n*\n* @private\n* @param {Function} prop2slice - function for converting an indexing expression to a slice\n* @returns {Function} handler\n*/\nfunction factory( prop2slice ) {\n\treturn set;\n\n\t/**\n\t* Trap for setting property values.\n\t*\n\t* @private\n\t* @param {Object} target - target object\n\t* @param {(string|symbol)} property - property name\n\t* @param {*} value - new value\n\t* @param {Object} receiver - the proxy object or an object inheriting from the proxy\n\t* @throws {Error} invalid slice operation\n\t* @throws {RangeError} number of slice dimensions must match the number of array dimensions\n\t* @throws {Error} assigned value must be broadcast compatible with output array view\n\t* @throws {TypeError} assigned value cannot be safely cast to the output array data type\n\t* @returns {boolean} boolean indicating whether assignment succeeded\n\t*/\n\tfunction set( target, property, value, receiver ) {\n\t\tif ( hasProperty( property ) ) {\n\t\t\treturn setValue( target, property, value );\n\t\t}\n\t\treturn setSlice( target, property, value, receiver, prop2slice );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = factory;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n/* eslint-disable max-len */\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar parent = require( './../../ctor' ); // eslint-disable-line stdlib/no-redeclare\nvar inherit = require( '@stdlib/utils/inherit' );\nvar Proxy = require( '@stdlib/proxy/ctor' );\nvar prop2slice0d = require( './prop2slice.0d.js' );\nvar prop2slice1d = require( './prop2slice.1d.js' );\nvar prop2slicend = require( './prop2slice.nd.js' );\nvar get = require( './get.js' );\nvar set = require( './set.js' );\n\n\n// VARIABLES //\n\nvar get0d = get( prop2slice0d );\nvar set0d = set( prop2slice0d );\nvar get1d = get( prop2slice1d );\nvar set1d = set( prop2slice1d );\nvar getnd = get( prop2slicend );\nvar setnd = set( prop2slicend );\n\n\n// MAIN //\n\n/**\n* Fancy ndarray constructor.\n*\n* @constructor\n* @param {string} dtype - data type\n* @param {Collection} buffer - data buffer\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {IntegerArray} strides - array strides\n* @param {NonNegativeInteger} offset - index offset\n* @param {string} order - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {Options} [options] - function options\n* @param {string} [options.mode=\"throw\"] - specifies how to handle indices which exceed array dimensions\n* @param {StringArray} [options.submode=[\"throw\"]] - specifies how to handle subscripts which exceed array dimensions on a per dimension basis\n* @param {boolean} [options.readonly=false] - boolean indicating whether an array should be read-only\n* @throws {TypeError} `dtype` argument must be a supported ndarray data type\n* @throws {TypeError} `buffer` argument must be an array-like object, typed-array-like, or a Buffer\n* @throws {TypeError} `buffer` argument `get` and `set` properties must be functions\n* @throws {TypeError} `shape` argument must be an array-like object containing nonnegative integers\n* @throws {Error} `shape` argument length must equal the number of dimensions\n* @throws {TypeError} `strides` argument must be an array-like object containing integers\n* @throws {Error} `strides` argument length must equal the number of dimensions (except for zero-dimensional arrays; in which case, the `strides` argument length must be equal to `1`)\n* @throws {Error} for zero-dimensional ndarrays, the `strides` argument must contain a single element equal to `0`\n* @throws {TypeError} `offset` argument must be a nonnegative integer\n* @throws {TypeError} `order` argument must be a supported ndarray order\n* @throws {Error} `buffer` argument must be compatible with specified meta data\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {RangeError} too many dimensions\n* @returns {FancyArray} FancyArray instance\n*\n* @example\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var out = new FancyArray( 'generic', buffer, shape, strides, offset, 'row-major' );\n* // returns \n*/\nfunction FancyArray( dtype, buffer, shape, strides, offset, order, options ) {\n\tvar handlers;\n\tvar nargs;\n\tvar ndims;\n\n\tnargs = arguments.length;\n\tif ( !( this instanceof FancyArray ) ) {\n\t\tif ( nargs < 7 ) {\n\t\t\treturn new FancyArray( dtype, buffer, shape, strides, offset, order );\n\t\t}\n\t\treturn new FancyArray( dtype, buffer, shape, strides, offset, order, options );\n\t}\n\t// Call the parent constructor:\n\tparent.call( this, dtype, buffer, shape, strides, offset, order, ( nargs < 7 ) ? {} : options );\n\n\tif ( Proxy ) { // NOTE: cannot use `@stdlib/assert/has-proxy-support` here, as that API uses code evaluation and might violate CSPs\n\t\tndims = shape.length;\n\t\thandlers = {};\n\t\tif ( ndims === 0 ) {\n\t\t\thandlers.get = get0d;\n\t\t\thandlers.set = set0d;\n\t\t} else if ( ndims === 1 ) {\n\t\t\thandlers.get = get1d;\n\t\t\thandlers.set = set1d;\n\t\t} else {\n\t\t\thandlers.get = getnd;\n\t\t\thandlers.set = setnd;\n\t\t}\n\t\treturn new Proxy( this, handlers );\n\t}\n\t// TODO: replace with `@stdlib/console/warn` (or equivalent once available)\n\tconsole.warn( 'WARNING: Proxy objects are not supported in the current environment. Some `FancyArray` functionality may not be available.' ); // eslint-disable-line no-console\n\treturn this;\n}\n\n// Inherit from the parent constructor:\ninherit( FancyArray, parent );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof FancyArray\n* @type {string}\n* @default 'ndarray'\n*\n* @example\n* var str = FancyArray.name;\n* // returns 'ndarray'\n*/\nsetReadOnly( FancyArray, 'name', 'ndarray' );\n\n\n// EXPORTS //\n\nmodule.exports = FancyArray;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Fancy array constructor.\n*\n* @module @stdlib/ndarray/fancy\n*\n* @example\n* var FancyArray = require( '@stdlib/ndarray/fancy' );\n*\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var out = new FancyArray( 'generic', buffer, shape, strides, offset, 'row-major' );\n* // returns \n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "{\n\t\"mode\": \"throw\",\n\t\"order\": \"row-major\"\n}\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isObject = require( '@stdlib/assert/is-plain-object' );\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar isOrder = require( './../../base/assert/is-order' );\nvar isIndexMode = require( './../../base/assert/is-index-mode' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Validates function options.\n*\n* @private\n* @param {Object} opts - destination object\n* @param {Options} options - function options\n* @param {string} [options.mode] - specifies how to handle a linear index which exceeds array dimensions\n* @param {string} [options.order] - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @returns {(Error|null)} null or an error object\n*\n* @example\n* var opts = {};\n* var options = {\n* 'mode': 'throw',\n* 'order': 'column-major'\n* };\n* var err = validate( opts, options );\n* if ( err ) {\n* throw err;\n* }\n*/\nfunction validate( opts, options ) {\n\tif ( !isObject( options ) ) {\n\t\treturn new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t}\n\tif ( hasOwnProp( options, 'mode' ) ) {\n\t\topts.mode = options.mode;\n\t\tif ( !isIndexMode( opts.mode ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a supported/recognized mode. Option: `%s`.', 'mode', opts.mode ) );\n\t\t}\n\t}\n\tif ( hasOwnProp( options, 'order' ) ) {\n\t\topts.order = options.order;\n\t\tif ( !isOrder( opts.order ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a supported/recognized order. Option: `%s`.', 'order', opts.order ) );\n\t\t}\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = validate;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isNonNegativeIntegerArray = require( '@stdlib/assert/is-nonnegative-integer-array' ).primitives;\nvar isInteger = require( '@stdlib/assert/is-integer' ).isPrimitive;\nvar shape2strides = require( './../../base/shape2strides' );\nvar getSubscripts = require( './../../base/ind2sub' );\nvar format = require( '@stdlib/string/format' );\nvar defaults = require( './defaults.json' );\nvar validate = require( './validate.js' );\n\n\n// MAIN //\n\n/**\n* Converts a linear index to an array of subscripts.\n*\n* ## Notes\n*\n* - The function accepts the following \"modes\":\n*\n* - `throw`: throws an error when a linear index exceeds array dimensions.\n* - `wrap`: wrap around a linear index exceeding array dimensions using modulo arithmetic.\n* - `clamp`: set a linear index exceeding array dimensions to either `0` (minimum linear index) or the maximum linear index.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {integer} idx - linear index\n* @param {Options} [options] - function options\n* @param {string} [options.mode=\"throw\"] - specifies how to handle a linear index which exceeds array dimensions\n* @param {string} [options.order=\"row-major\"] - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @throws {TypeError} shape argument must be an array-like object containing nonnegative integers\n* @throws {TypeError} linear index argument must be integer valued\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {RangeError} must provide a linear index which does not exceed array dimensions\n* @returns {NonNegativeIntegerArray} subscripts\n*\n* @example\n* var s = ind2sub( [ 3, 3, 3 ], 17 );\n* // returns [ 1, 2, 2 ]\n*/\nfunction ind2sub( shape, idx, options ) {\n\tvar opts;\n\tvar err;\n\n\topts = {};\n\topts.mode = defaults.mode;\n\topts.order = defaults.order;\n\tif ( arguments.length > 2 ) {\n\t\terr = validate( opts, options );\n\t\tif ( err ) {\n\t\t\tthrow err;\n\t\t}\n\t}\n\tif ( !isNonNegativeIntegerArray( shape ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Shape argument must be an array-like object containing nonnegative integers. Value: `%s`.', shape ) );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Linear index must be integer valued. Value: `%s`.', idx ) );\n\t}\n\t// Note: strides are positive, so offset is always zero\n\treturn getSubscripts( shape, shape2strides( shape, opts.order ), 0, opts.order, idx, opts.mode ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = ind2sub;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isNonNegativeIntegerArray = require( '@stdlib/assert/is-nonnegative-integer-array' ).primitives;\nvar isInteger = require( '@stdlib/assert/is-integer' ).isPrimitive;\nvar shape2strides = require( './../../base/shape2strides' );\nvar getSubscripts = require( './../../base/ind2sub' ).assign;\nvar format = require( '@stdlib/string/format' );\nvar defaults = require( './defaults.json' );\nvar validate = require( './validate.js' );\n\n\n// MAIN //\n\n/**\n* Converts a linear index to an array of subscripts and assigns results to a provided output array.\n*\n* ## Notes\n*\n* - The function accepts the following \"modes\":\n*\n* - `throw`: throws an error when a linear index exceeds array dimensions.\n* - `wrap`: wrap around a linear index exceeding array dimensions using modulo arithmetic.\n* - `clamp`: set a linear index exceeding array dimensions to either `0` (minimum linear index) or the maximum linear index.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {integer} idx - linear index\n* @param {Options} [options] - function options\n* @param {string} [options.mode=\"throw\"] - specifies how to handle a linear index which exceeds array dimensions\n* @param {string} [options.order=\"row-major\"] - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @param {(Array|TypedArray|Object)} out - output array\n* @throws {TypeError} output argument must be either an array, typed array, or an object\n* @throws {TypeError} shape argument must be an array-like object containing nonnegative integers\n* @throws {TypeError} linear index argument must be integer valued\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {RangeError} must provide a linear index which does not exceed array dimensions\n* @returns {NonNegativeIntegerArray} subscripts\n*\n* @example\n* var shape = [ 3, 3, 3 ];\n* var out = [ 0, 0, 0 ];\n*\n* var s = ind2sub( shape, 17, out );\n* // returns [ 1, 2, 2 ]\n*\n* var bool = ( s === out );\n* // returns true\n*/\nfunction ind2sub( shape, idx, options, out ) {\n\tvar opts;\n\tvar dest;\n\tvar err;\n\n\topts = {};\n\topts.mode = defaults.mode;\n\topts.order = defaults.order;\n\tif ( arguments.length === 4 ) {\n\t\terr = validate( opts, arguments[ 2 ] );\n\t\tif ( err ) {\n\t\t\tthrow err;\n\t\t}\n\t\tif ( typeof out !== 'object' || out === null ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Output argument must be either an array, typed array, or object. Value: `%s`.', out ) );\n\t\t}\n\t\tdest = out;\n\t} else {\n\t\tdest = options;\n\t\tif ( typeof dest !== 'object' || dest === null ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Output argument must be either an array, typed array, or object. Value: `%s`.', dest ) );\n\t\t}\n\t}\n\tif ( !isNonNegativeIntegerArray( shape ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Shape argument must be an array-like object containing nonnegative integers. Value: `%s`.', shape ) );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Linear index must be integer valued. Value: `%s`.', idx ) );\n\t}\n\t// Note: strides are positive, so offset is always zero\n\treturn getSubscripts( shape, shape2strides( shape, opts.order ), 0, opts.order, idx, opts.mode, dest ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = ind2sub;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert a linear index to an array of subscripts.\n*\n* @module @stdlib/ndarray/ind2sub\n*\n* @example\n* var ind2sub = require( '@stdlib/ndarray/ind2sub' );\n*\n* var s = ind2sub( [ 3, 3, 3 ], 17 );\n* // returns [ 1, 2, 2 ]\n*\n* @example\n* var ind2sub = require( '@stdlib/ndarray/ind2sub' );\n*\n* var shape = [ 3, 3, 3 ];\n* var out = [ 0, 0, 0 ];\n*\n* var s = ind2sub.assign( shape, 17, out );\n* // returns [ 1, 2, 2 ]\n*\n* var bool = ( s === out );\n* // returns true\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar main = require( './main.js' );\nvar assign = require( './assign.js' );\n\n\n// MAIN //\n\nsetReadOnly( main, 'assign', assign );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar isPlainObject = require( '@stdlib/assert/is-plain-object' );\nvar isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;\nvar isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );\nvar isReadOnly = require( './../../../base/assert/is-read-only' );\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar iteratorSymbol = require( '@stdlib/symbol/iterator' );\nvar zeros = require( '@stdlib/array/base/zeros' );\nvar getShape = require( './../../../shape' );\nvar numel = require( './../../../base/numel' );\nvar slice = require( './../../../base/slice' );\nvar nextCartesianIndex = require( './../../../base/next-cartesian-index' ).assign;\nvar MultiSlice = require( '@stdlib/slice/multi' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns an iterator which iterates over each column in a matrix (or stack of matrices).\n*\n* @param {ndarray} x - input value\n* @param {Options} [options] - function options\n* @param {boolean} [options.readonly=true] - boolean indicating whether returned views should be read-only\n* @throws {TypeError} first argument must be an ndarray\n* @throws {TypeError} first argument must have at least two dimensions\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {Error} cannot write to a read-only array\n* @returns {Iterator} iterator\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n*\n* var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] );\n* // returns \n*\n* var iter = nditerColumns( x );\n*\n* var v = iter.next().value;\n* // returns \n*\n* var arr = ndarray2array( v );\n* // returns [ 1, 3 ]\n*\n* v = iter.next().value;\n* // returns \n*\n* arr = ndarray2array( v );\n* // returns [ 2, 4 ]\n*\n* v = iter.next().value;\n* // returns \n*\n* arr = ndarray2array( v );\n* // returns [ 5, 7 ]\n*\n* // ...\n*/\nfunction nditerColumns( x ) {\n\tvar options;\n\tvar shape;\n\tvar ndims;\n\tvar opts;\n\tvar iter;\n\tvar FLG;\n\tvar idx;\n\tvar dim;\n\tvar S0;\n\tvar N;\n\tvar i;\n\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ndarray. Value: `%s`.', x ) );\n\t}\n\topts = {\n\t\t'writable': false\n\t};\n\tif ( arguments.length > 1 ) {\n\t\toptions = arguments[ 1 ];\n\t\tif ( !isPlainObject( options ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t\t}\n\t\tif ( hasOwnProp( options, 'readonly' ) ) {\n\t\t\tif ( !isBoolean( options.readonly ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'readonly', options.readonly ) );\n\t\t\t}\n\t\t\topts.writable = !options.readonly;\n\t\t\tif ( opts.writable && isReadOnly( x ) ) {\n\t\t\t\tthrow new Error( format( 'invalid option. Cannot write to read-only array.' ) );\n\t\t\t}\n\t\t}\n\t}\n\t// Retrieve input array meta data:\n\tshape = getShape( x );\n\tndims = shape.length;\n\n\t// Ensure that the input array has sufficient dimensions...\n\tif ( ndims < 2 ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an ndarray having at least two dimensions.' );\n\t}\n\t// Check whether the input array is empty...\n\tN = numel( shape );\n\tif ( N === 0 ) {\n\t\tFLG = true;\n\t}\n\t// Compute the number of columns across all stacks of matrices:\n\tN /= shape[ ndims-2 ];\n\tdim = ndims - 1;\n\tS0 = shape[ dim ];\n\n\t// Initialize a counter:\n\ti = -1;\n\n\t// Initialize an index array for generating slices:\n\tidx = zeros( ndims );\n\n\t// Set the second-to-last element to `null` to indicate that we want a full \"slice\" for the second-to-last dimension:\n\tidx[ ndims-2 ] = null;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\t// If an environment supports `Symbol.iterator`, make the iterator iterable:\n\tif ( iteratorSymbol ) {\n\t\tsetReadOnly( iter, iteratorSymbol, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar s;\n\t\tvar j;\n\t\ti += 1;\n\t\tif ( FLG || i >= N ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\t// Create a multi-slice for the current view:\n\t\ts = MultiSlice.apply( null, idx );\n\n\t\t// Update the index array:\n\t\tj = ( idx[ dim ] + 1 ) % S0;\n\t\tidx[ dim ] = j;\n\t\tif ( j === 0 ) {\n\t\t\t// If we've iterated over all the columns in the current matrix, move on to the next matrix in the stack:\n\t\t\tidx = nextCartesianIndex( shape, 'row-major', idx, dim-2, idx );\n\t\t}\n\t\t// Return the next column slice:\n\t\treturn {\n\t\t\t'value': slice( x, s, true, opts.writable ),\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn nditerColumns( x, opts );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nditerColumns;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create an iterator which iterates over each column in a matrix (or stack of matrices).\n*\n* @module @stdlib/ndarray/iter/columns\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n* var nditerColumns = require( '@stdlib/ndarray/iter/columns' );\n*\n* var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] );\n* // returns \n*\n* var iter = nditerColumns( x );\n*\n* var v = iter.next().value;\n* // returns \n*\n* var arr = ndarray2array( v );\n* // returns [ 1, 3 ]\n*\n* v = iter.next().value;\n* // returns \n*\n* arr = ndarray2array( v );\n* // returns [ 2, 4 ]\n*\n* v = iter.next().value;\n* // returns \n*\n* arr = ndarray2array( v );\n* // returns [ 5, 7 ]\n*\n* // ...\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar isPlainObject = require( '@stdlib/assert/is-plain-object' );\nvar isOrder = require( './../../../base/assert/is-order' );\nvar isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar iteratorSymbol = require( '@stdlib/symbol/iterator' );\nvar zeros = require( '@stdlib/array/base/zeros' );\nvar getShape = require( './../../../shape' );\nvar numel = require( './../../../base/numel' );\nvar nextCartesianIndex = require( './../../../base/next-cartesian-index' ).assign;\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns an iterator which returns `[index, value]` pairs for each element in a provided ndarray.\n*\n* @param {ndarray} x - input array\n* @param {Options} [options] - function options\n* @param {boolean} [options.order='row-major'] - index iteration order\n* @throws {TypeError} first argument must be an ndarray\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @returns {Iterator} iterator\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] );\n* // returns \n*\n* var iter = nditerEntries( x );\n*\n* var v = iter.next().value;\n* // returns [ [ 0, 0, 0 ], 1 ]\n*\n* v = iter.next().value;\n* // returns [ [ 0, 0, 1 ], 2 ]\n*\n* v = iter.next().value;\n* // returns [ [ 0, 1, 0 ], 3 ]\n*\n* // ...\n*/\nfunction nditerEntries( x ) {\n\tvar options;\n\tvar shape;\n\tvar ndims;\n\tvar opts;\n\tvar iter;\n\tvar FLG;\n\tvar idx;\n\tvar dim;\n\tvar N;\n\tvar i;\n\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ndarray. Value: `%s`.', x ) );\n\t}\n\topts = {\n\t\t'order': x.order\n\t};\n\tif ( arguments.length > 1 ) {\n\t\toptions = arguments[ 1 ];\n\t\tif ( !isPlainObject( options ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t\t}\n\t\tif ( hasOwnProp( options, 'order' ) ) {\n\t\t\tif ( !isOrder( options.order ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a recognized order. Option: `%s`.', 'order', options.order ) );\n\t\t\t}\n\t\t\topts.order = options.order;\n\t\t}\n\t}\n\t// Retrieve input array meta data:\n\tshape = getShape( x );\n\tndims = shape.length;\n\n\t// Check whether the input array is empty...\n\tN = numel( shape );\n\tif ( N === 0 ) {\n\t\tFLG = true;\n\t}\n\t// Resolve the dimension in which indices iterate fastest:\n\tif ( opts.order === 'row-major' ) {\n\t\tdim = ndims - 1;\n\t} else {\n\t\tdim = 0;\n\t}\n\t// Initialize a counter:\n\ti = -1;\n\n\t// Initialize an index array:\n\tidx = zeros( ndims );\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\t// If an environment supports `Symbol.iterator`, make the iterator iterable:\n\tif ( iteratorSymbol ) {\n\t\tsetReadOnly( iter, iteratorSymbol, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\ti += 1;\n\t\tif ( FLG || i >= N ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tif ( i > 0 ) {\n\t\t\tidx = nextCartesianIndex( shape, opts.order, idx, dim, idx );\n\t\t}\n\t\t// Return the next set of indices:\n\t\treturn {\n\t\t\t'value': [ idx.slice(), x.get.apply( x, idx ) ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn nditerEntries( x, opts );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nditerEntries;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create an iterator which returns `[index, value]` pairs for each element in a provided ndarray.\n*\n* @module @stdlib/ndarray/iter/entries\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var nditerEntries = require( '@stdlib/ndarray/iter/entries' );\n*\n* var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] );\n* // returns \n*\n* var iter = nditerEntries( x.shape );\n*\n* var v = iter.next().value;\n* // returns [ [ 0, 0, 0 ], 1 ]\n*\n* v = iter.next().value;\n* // returns [ [ 0, 0, 1 ], 2 ]\n*\n* v = iter.next().value;\n* // returns [ [ 0, 1, 0 ], 3 ]\n*\n* // ...\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar isPlainObject = require( '@stdlib/assert/is-plain-object' );\nvar isOrder = require( './../../../base/assert/is-order' );\nvar isCollection = require( '@stdlib/assert/is-collection' );\nvar isNonNegativeInteger = require( '@stdlib/assert/is-nonnegative-integer' ).isPrimitive;\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar iteratorSymbol = require( '@stdlib/symbol/iterator' );\nvar zeros = require( '@stdlib/array/base/zeros' );\nvar numel = require( './../../../base/numel' );\nvar nextCartesianIndex = require( './../../../base/next-cartesian-index' ).assign;\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns an iterator which returns indices for use in indexing into an ndarray having a specified shape.\n*\n* @param {NonNegativeIntegerArray} shape - input shape\n* @param {Options} [options] - function options\n* @param {boolean} [options.order='row-major'] - index iteration order\n* @throws {TypeError} first argument must be an array containing nonnegative integers\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @returns {Iterator} iterator\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] );\n* // returns \n*\n* var iter = nditerIndices( x.shape );\n*\n* var v = iter.next().value;\n* // returns [ 0, 0, 0 ]\n*\n* v = iter.next().value;\n* // returns [ 0, 0, 1 ]\n*\n* v = iter.next().value;\n* // returns [ 0, 1, 0 ]\n*\n* // ...\n*/\nfunction nditerIndices( shape ) {\n\tvar options;\n\tvar ndims;\n\tvar opts;\n\tvar iter;\n\tvar FLG;\n\tvar idx;\n\tvar dim;\n\tvar sh;\n\tvar N;\n\tvar i;\n\n\tif ( !isCollection( shape ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array of nonnegative integers. Value: `%s`.', shape ) );\n\t}\n\topts = {\n\t\t'order': 'row-major'\n\t};\n\tif ( arguments.length > 1 ) {\n\t\toptions = arguments[ 1 ];\n\t\tif ( !isPlainObject( options ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t\t}\n\t\tif ( hasOwnProp( options, 'order' ) ) {\n\t\t\tif ( !isOrder( options.order ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a recognized order. Option: `%s`.', 'order', options.order ) );\n\t\t\t}\n\t\t\topts.order = options.order;\n\t\t}\n\t}\n\t// Retrieve the number of dimensions:\n\tndims = shape.length;\n\n\t// Copy the input shape:\n\tsh = [];\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\tif ( !isNonNegativeInteger( shape[ i ] ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array of nonnegative integers. Value: `%s`.', shape ) );\n\t\t}\n\t\tsh.push( shape[ i ] );\n\t}\n\t// Check whether the input array is empty...\n\tN = numel( sh );\n\tif ( N === 0 ) {\n\t\tFLG = true;\n\t}\n\t// Resolve the dimension in which indices iterate fastest:\n\tif ( opts.order === 'row-major' ) {\n\t\tdim = ndims - 1;\n\t} else {\n\t\tdim = 0;\n\t}\n\t// Initialize a counter:\n\ti = -1;\n\n\t// Initialize an index array:\n\tidx = zeros( ndims );\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\t// If an environment supports `Symbol.iterator`, make the iterator iterable:\n\tif ( iteratorSymbol ) {\n\t\tsetReadOnly( iter, iteratorSymbol, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\ti += 1;\n\t\tif ( FLG || i >= N ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tif ( i > 0 ) {\n\t\t\tidx = nextCartesianIndex( shape, opts.order, idx, dim, idx );\n\t\t}\n\t\t// Return the next set of indices:\n\t\treturn {\n\t\t\t'value': idx.slice(),\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn nditerIndices( sh, opts );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nditerIndices;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create an iterator which returns indices for use in indexing into an ndarray having a specified shape.\n*\n* @module @stdlib/ndarray/iter/indices\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var nditerIndices = require( '@stdlib/ndarray/iter/indices' );\n*\n* var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] );\n* // returns \n*\n* var iter = nditerIndices( x.shape );\n*\n* var v = iter.next().value;\n* // returns [ 0, 0, 0 ]\n*\n* v = iter.next().value;\n* // returns [ 0, 0, 1 ]\n*\n* v = iter.next().value;\n* // returns [ 0, 1, 0 ]\n*\n* // ...\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar isPlainObject = require( '@stdlib/assert/is-plain-object' );\nvar isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;\nvar isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );\nvar isReadOnly = require( './../../../base/assert/is-read-only' );\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar iteratorSymbol = require( '@stdlib/symbol/iterator' );\nvar zeros = require( '@stdlib/array/base/zeros' );\nvar getShape = require( './../../../shape' );\nvar numel = require( './../../../base/numel' );\nvar slice = require( './../../../base/slice' );\nvar nextCartesianIndex = require( './../../../base/next-cartesian-index' ).assign;\nvar MultiSlice = require( '@stdlib/slice/multi' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns an iterator which iterates over each row in a matrix (or stack of matrices).\n*\n* @param {ndarray} x - input value\n* @param {Options} [options] - function options\n* @param {boolean} [options.readonly=true] - boolean indicating whether returned views should be read-only\n* @throws {TypeError} first argument must be an ndarray\n* @throws {TypeError} first argument must have at least two dimensions\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {Error} cannot write to a read-only array\n* @returns {Iterator} iterator\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n*\n* var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] );\n* // returns \n*\n* var iter = nditerRows( x );\n*\n* var v = iter.next().value;\n* // returns \n*\n* var arr = ndarray2array( v );\n* // returns [ 1, 2 ]\n*\n* v = iter.next().value;\n* // returns \n*\n* arr = ndarray2array( v );\n* // returns [ 3, 4 ]\n*\n* v = iter.next().value;\n* // returns \n*\n* arr = ndarray2array( v );\n* // returns [ 5, 6 ]\n*\n* // ...\n*/\nfunction nditerRows( x ) {\n\tvar options;\n\tvar shape;\n\tvar ndims;\n\tvar opts;\n\tvar iter;\n\tvar FLG;\n\tvar idx;\n\tvar dim;\n\tvar S1;\n\tvar N;\n\tvar i;\n\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ndarray. Value: `%s`.', x ) );\n\t}\n\topts = {\n\t\t'writable': false\n\t};\n\tif ( arguments.length > 1 ) {\n\t\toptions = arguments[ 1 ];\n\t\tif ( !isPlainObject( options ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t\t}\n\t\tif ( hasOwnProp( options, 'readonly' ) ) {\n\t\t\tif ( !isBoolean( options.readonly ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'readonly', options.readonly ) );\n\t\t\t}\n\t\t\topts.writable = !options.readonly;\n\t\t\tif ( opts.writable && isReadOnly( x ) ) {\n\t\t\t\tthrow new Error( format( 'invalid option. Cannot write to read-only array.' ) );\n\t\t\t}\n\t\t}\n\t}\n\t// Retrieve input array meta data:\n\tshape = getShape( x );\n\tndims = shape.length;\n\n\t// Ensure that the input array has sufficient dimensions...\n\tif ( ndims < 2 ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an ndarray having at least two dimensions.' );\n\t}\n\t// Check whether the input array is empty...\n\tN = numel( shape );\n\tif ( N === 0 ) {\n\t\tFLG = true;\n\t}\n\t// Compute the number of rows across all stacks of matrices:\n\tN /= shape[ ndims-1 ];\n\tdim = ndims - 2;\n\tS1 = shape[ dim ];\n\n\t// Initialize a counter:\n\ti = -1;\n\n\t// Initialize an index array for generating slices:\n\tidx = zeros( ndims );\n\n\t// Set the last element to `null` to indicate that we want a full \"slice\" for the last dimension:\n\tidx[ ndims-1 ] = null;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\t// If an environment supports `Symbol.iterator`, make the iterator iterable:\n\tif ( iteratorSymbol ) {\n\t\tsetReadOnly( iter, iteratorSymbol, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar s;\n\t\tvar j;\n\t\ti += 1;\n\t\tif ( FLG || i >= N ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\t// Create a multi-slice for the current view:\n\t\ts = MultiSlice.apply( null, idx );\n\n\t\t// Update the index array:\n\t\tj = ( idx[ dim ] + 1 ) % S1;\n\t\tidx[ dim ] = j;\n\t\tif ( j === 0 ) {\n\t\t\t// If we've iterated over all the rows in the current matrix, move on to the next matrix in the stack:\n\t\t\tidx = nextCartesianIndex( shape, 'row-major', idx, dim-1, idx );\n\t\t}\n\t\t// Return the next row slice:\n\t\treturn {\n\t\t\t'value': slice( x, s, true, opts.writable ),\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn nditerRows( x, opts );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nditerRows;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create an iterator which iterates over each row in a matrix (or stack of matrices).\n*\n* @module @stdlib/ndarray/iter/rows\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n* var nditerRows = require( '@stdlib/ndarray/iter/rows' );\n*\n* var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] );\n* // returns \n*\n* var iter = nditerRows( x );\n*\n* var v = iter.next().value;\n* // returns \n*\n* var arr = ndarray2array( v );\n* // returns [ 1, 2 ]\n*\n* v = iter.next().value;\n* // returns \n*\n* arr = ndarray2array( v );\n* // returns [ 3, 4 ]\n*\n* v = iter.next().value;\n* // returns \n*\n* arr = ndarray2array( v );\n* // returns [ 5, 6 ]\n*\n* // ...\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );\nvar toArray = require( './../../base/to-array' );\nvar getStrides = require( './../../strides' );\nvar getOffset = require( './../../offset' );\nvar getShape = require( './../../shape' );\nvar getOrder = require( './../../order' );\nvar getData = require( './../../data-buffer' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Converts an ndarray to a generic array (which may include nested arrays).\n*\n* @param {ndarrayLike} x - input ndarray\n* @throws {TypeError} must provide an ndarray\n* @returns {(EmptyArray|Array|Array)} array (which may include nested arrays)\n*\n* @example\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n*\n* var buffer = [ 1, 2, 3, 4 ];\n* var shape = [ 2, 2 ];\n* var order = 'row-major';\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var arr = ndarray( 'generic', buffer, shape, strides, offset, order );\n*\n* var out = ndarray2array( arr );\n* // returns [ [ 1, 2 ], [ 3, 4 ] ]\n*/\nfunction ndarray2array( x ) {\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\treturn toArray( getData( x ), getShape( x ), getStrides( x ), getOffset( x ), getOrder( x ) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = ndarray2array;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert an ndarray to a generic array (which may include nested arrays).\n*\n* @module @stdlib/ndarray/to-array\n*\n* @example\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n*\n* var buffer = [ 1, 2, 3, 4 ];\n* var shape = [ 2, 2 ];\n* var order = 'row-major';\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var arr = ndarray( 'generic', buffer, shape, strides, offset, order );\n* // returns \n*\n* var out = ndarray2array( arr );\n* // returns [ [ 1, 2 ], [ 3, 4 ] ]\n*/\n\n// MODULES //\n\nvar ndarray2array = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = ndarray2array;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar isFunction = require( '@stdlib/assert/is-function' );\nvar isIteratorLike = require( '@stdlib/assert/is-iterator-like' );\nvar iteratorSymbol = require( '@stdlib/symbol/iterator' );\nvar ndarray2array = require( './../../../to-array' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns an iterator which converts each iterated ndarray to a generic array.\n*\n* @param {Iterator} iterator - input iterator\n* @throws {TypeError} must provide an iterator protocol-compliant object\n* @returns {Iterator} iterator\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n* var nditerRows = require( '@stdlib/ndarray/iter/rows' );\n*\n* var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] );\n* // returns \n*\n* var iter = nditer2arrayEach( nditerRows( x ) );\n*\n* var v = iter.next().value;\n* // returns [ 1, 2 ]\n*\n* v = iter.next().value;\n* // returns [ 3, 4 ]\n*\n* v = iter.next().value;\n* // returns [ 5, 6 ]\n*\n* // ...\n*/\nfunction nditer2arrayEach( iterator ) {\n\tvar iter;\n\tvar FLG;\n\n\tif ( !isIteratorLike( iterator ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an iterator protocol-compliant object. Value: `%s`.', iterator ) );\n\t}\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\t// If an environment supports `Symbol.iterator` and a provided iterator is iterable, make the iterator iterable:\n\tif ( iteratorSymbol && isFunction( iterator[ iteratorSymbol ] ) ) {\n\t\tsetReadOnly( iter, iteratorSymbol, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar v;\n\t\tif ( FLG ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tv = iterator.next();\n\t\tif ( v.done ) {\n\t\t\tFLG = true;\n\t\t\treturn v;\n\t\t}\n\t\treturn {\n\t\t\t'value': ndarray2array( v.value ),\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn nditer2arrayEach( iterator[ iteratorSymbol ]() );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nditer2arrayEach;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create an iterator which converts each iterated ndarray to a generic array.\n*\n* @module @stdlib/ndarray/iter/to-array-each\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n* var nditerRows = require( '@stdlib/ndarray/iter/rows' );\n* var nditer2arrayEach = require( '@stdlib/ndarray/iter/to-array-each' );\n*\n* var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] );\n* // returns \n*\n* var iter = nditer2arrayEach( nditerRows( x ) );\n*\n* var v = iter.next().value;\n* // returns [ 1, 2 ]\n*\n* v = iter.next().value;\n* // returns [ 3, 4 ]\n*\n* v = iter.next().value;\n* // returns [ 5, 6 ]\n*\n* // ...\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );\nvar isPlainObject = require( '@stdlib/assert/is-plain-object' );\nvar isOrder = require( './../../../base/assert/is-order' );\nvar isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar iteratorSymbol = require( '@stdlib/symbol/iterator' );\nvar zeros = require( '@stdlib/array/base/zeros' );\nvar getShape = require( './../../../shape' );\nvar numel = require( './../../../base/numel' );\nvar nextCartesianIndex = require( './../../../base/next-cartesian-index' ).assign;\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns an iterator which returns individual elements from a provided ndarray.\n*\n* @param {ndarray} x - input array\n* @param {Options} [options] - function options\n* @param {boolean} [options.order='row-major'] - index iteration order\n* @throws {TypeError} first argument must be an ndarray\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @returns {Iterator} iterator\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] );\n* // returns \n*\n* var iter = nditerValues( x );\n*\n* var v = iter.next().value;\n* // returns 1\n*\n* v = iter.next().value;\n* // returns 2\n*\n* v = iter.next().value;\n* // returns 3\n*\n* // ...\n*/\nfunction nditerValues( x ) {\n\tvar options;\n\tvar shape;\n\tvar ndims;\n\tvar opts;\n\tvar iter;\n\tvar FLG;\n\tvar idx;\n\tvar dim;\n\tvar N;\n\tvar i;\n\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ndarray. Value: `%s`.', x ) );\n\t}\n\topts = {\n\t\t'order': x.order\n\t};\n\tif ( arguments.length > 1 ) {\n\t\toptions = arguments[ 1 ];\n\t\tif ( !isPlainObject( options ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t\t}\n\t\tif ( hasOwnProp( options, 'order' ) ) {\n\t\t\tif ( !isOrder( options.order ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a recognized order. Option: `%s`.', 'order', options.order ) );\n\t\t\t}\n\t\t\topts.order = options.order;\n\t\t}\n\t}\n\t// Retrieve input array meta data:\n\tshape = getShape( x );\n\tndims = shape.length;\n\n\t// Check whether the input array is empty...\n\tN = numel( shape );\n\tif ( N === 0 ) {\n\t\tFLG = true;\n\t}\n\t// Resolve the dimension in which indices iterate fastest:\n\tif ( opts.order === 'row-major' ) {\n\t\tdim = ndims - 1;\n\t} else {\n\t\tdim = 0;\n\t}\n\t// Initialize a counter:\n\ti = -1;\n\n\t// Initialize an index array:\n\tidx = zeros( ndims );\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\t// If an environment supports `Symbol.iterator`, make the iterator iterable:\n\tif ( iteratorSymbol ) {\n\t\tsetReadOnly( iter, iteratorSymbol, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\ti += 1;\n\t\tif ( FLG || i >= N ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tif ( i > 0 ) {\n\t\t\tidx = nextCartesianIndex( shape, opts.order, idx, dim, idx );\n\t\t}\n\t\t// Return the next set of indices:\n\t\treturn {\n\t\t\t'value': x.get.apply( x, idx ),\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn nditerValues( x, opts );\n\t}\n}\n\n\n// EXPORTS //\n\nmodule.exports = nditerValues;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create an iterator which returns individual elements from a provided ndarray.\n*\n* @module @stdlib/ndarray/iter/values\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var nditerValues = require( '@stdlib/ndarray/iter/values' );\n*\n* var x = array( [ [ [ 1, 2 ], [ 3, 4 ] ], [ [ 5, 6 ], [ 7, 8 ] ] ] );\n* // returns \n*\n* var iter = nditerValues( x.shape );\n*\n* var v = iter.next().value;\n* // returns 1\n*\n* v = iter.next().value;\n* // returns 2\n*\n* v = iter.next().value;\n* // returns 3\n*\n* // ...\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name nditerColumns\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/columns}\n*/\nsetReadOnly( ns, 'nditerColumns', require( './../../iter/columns' ) );\n\n/**\n* @name nditerEntries\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/entries}\n*/\nsetReadOnly( ns, 'nditerEntries', require( './../../iter/entries' ) );\n\n/**\n* @name nditerIndices\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/indices}\n*/\nsetReadOnly( ns, 'nditerIndices', require( './../../iter/indices' ) );\n\n/**\n* @name nditerRows\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/rows}\n*/\nsetReadOnly( ns, 'nditerRows', require( './../../iter/rows' ) );\n\n/**\n* @name nditer2arrayEach\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/to-array-each}\n*/\nsetReadOnly( ns, 'nditer2arrayEach', require( './../../iter/to-array-each' ) );\n\n/**\n* @name nditerValues\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/iter/values}\n*/\nsetReadOnly( ns, 'nditerValues', require( './../../iter/values' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );\nvar isCollection = require( '@stdlib/assert/is-collection' );\nvar isNonNegativeInteger = require( '@stdlib/assert/is-nonnegative-integer' ).isPrimitive;\nvar broadcast = require( './../../broadcast-array' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Broadcasts an ndarray to a specified shape if and only if the specified shape differs from the provided ndarray's shape.\n*\n* ## Notes\n*\n* - If a provided ndarray has the same shape as the specified shape, the function returns the provided ndarray.\n* - If a provided ndarray has a different (broadcast compatible) shape than the specified shape, the function returns a new **read-only** ndarray view of the provided ndarray's data. The view is typically **not** contiguous. As more than one element of a returned view may refer to the same memory location, writing to the input ndarray may affect multiple elements. If you need to write to the input ndarray, copy the input ndarray before broadcasting.\n*\n* @param {ndarray} x - input array\n* @param {NonNegativeIntegerArray} shape - desired shape\n* @throws {TypeError} first argument must be an ndarray\n* @throws {TypeError} second argument must be an array of nonnegative integers\n* @throws {Error} input array cannot have more dimensions than the desired shape\n* @throws {Error} input array dimension sizes must be `1` or equal to the corresponding dimension in the provided shape\n* @throws {Error} input array and desired shape must be broadcast compatible\n* @returns {ndarray} broadcasted array\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var shx = x.shape;\n* // returns [ 2, 2 ]\n*\n* var y = maybeBroadcastArray( x, [ 3, 2, 2 ] );\n* // returns \n*\n* var shy = y.shape;\n* // returns [ 3, 2, 2 ]\n*\n* var v = y.get( 0, 0, 0 );\n* // returns 1\n*\n* v = y.get( 0, 0, 1 );\n* // returns 2\n*\n* v = y.get( 1, 0, 0 );\n* // returns 1\n*\n* v = y.get( 1, 1, 0 );\n* // returns 3\n*\n* v = y.get( 2, 0, 0 );\n* // returns 1\n*\n* v = y.get( 2, 1, 1 );\n* // returns 4\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var y = maybeBroadcastArray( x, [ 3, 2 ] );\n* // throws \n*/\nfunction maybeBroadcastArray( x, shape ) {\n\tvar sh;\n\tvar N;\n\tvar d;\n\tvar i;\n\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ndarray. Value: `%s`.', x ) );\n\t}\n\tif ( !isCollection( shape ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an array of nonnegative integers. Value: `%s`.', shape ) );\n\t}\n\tN = shape.length;\n\tsh = x.shape;\n\n\t// Check whether we need to broadcast the input array...\n\tif ( sh.length === N ) {\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\td = shape[ i ];\n\t\t\tif ( !isNonNegativeInteger( d ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an array of nonnegative integers. Value: `%s`.', '[' + shape.join( ',' ) + ']' ) );\n\t\t\t}\n\t\t\t// Check whether dimensions match...\n\t\t\tif ( sh[ i ] !== d ) {\n\t\t\t\t// We found a mismatched dimension; delegate to `broadcast` to ensure that the input array is broadcast compatible with the desired array shape...\n\t\t\t\treturn broadcast( x, shape );\n\t\t\t}\n\t\t}\n\t\treturn x;\n\t}\n\t// If we are provided an array having a different rank (i.e., number of dimensions) than the desired shape, assume we need to broadcast, delegating to `broadcast` to ensure that the input array is broadcast compatible with the desired array shape...\n\treturn broadcast( x, shape );\n}\n\n\n// EXPORTS //\n\nmodule.exports = maybeBroadcastArray;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Broadcast an ndarray to a specified shape if and only if the specified shape differs from the provided ndarray's shape.\n*\n* @module @stdlib/ndarray/maybe-broadcast-array\n*\n* @example\n* var array = require( '@stdlib/ndarray/array' );\n* var maybeBroadcastArray = require( '@stdlib/ndarray/maybe-broadcast-array' );\n*\n* var x = array( [ [ 1, 2 ], [ 3, 4 ] ] );\n* // returns \n*\n* var shx = x.shape;\n* // returns [ 2, 2 ]\n*\n* var y = maybeBroadcastArray( x, [ 3, 2, 2 ] );\n* // returns \n*\n* var shy = y.shape;\n* // returns [ 3, 2, 2 ]\n*\n* var v = y.get( 0, 0, 0 );\n* // returns 1\n*\n* v = y.get( 0, 0, 1 );\n* // returns 2\n*\n* v = y.get( 1, 0, 0 );\n* // returns 1\n*\n* v = y.get( 1, 1, 0 );\n* // returns 3\n*\n* v = y.get( 2, 0, 0 );\n* // returns 1\n*\n* v = y.get( 2, 1, 1 );\n* // returns 4\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "{\n\t\"float64\": -1,\n\t\"float32\": \"float64\",\n\t\"int32\": -1,\n\t\"int16\": \"int32\",\n\t\"int8\": \"int16\",\n\t\"uint32\": -1,\n\t\"uint16\": \"uint32\",\n\t\"uint8\": \"uint16\",\n\t\"uint8c\": \"uint16\",\n\t\"complex64\": \"complex128\",\n\t\"complex128\": -1,\n\t\"generic\": -1,\n\t\"binary\": -1\n}\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar objectKeys = require( '@stdlib/utils/keys' );\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar resolveStr = require( './../../base/dtype-resolve-str' );\nvar NEXT_DTYPES = require( './next_dtypes.json' );\n\n\n// FUNCTIONS //\n\n/**\n* Generates a table.\n*\n* @private\n* @returns {Object} table\n*/\nfunction generateTable() {\n\tvar dtypes;\n\tvar ntypes;\n\tvar out;\n\tvar i;\n\n\tout = {};\n\tdtypes = objectKeys( NEXT_DTYPES );\n\tntypes = dtypes.length;\n\tfor ( i = 0; i < ntypes; i++ ) {\n\t\tout[ dtypes[i] ] = NEXT_DTYPES[ dtypes[i] ];\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Returns the next larger ndarray data type of the same kind.\n*\n* @param {*} [dtype] - ndarray data type value\n* @returns {(Object|string|integer|null)} next larger data type(s) or null\n*\n* @example\n* var dt = nextDataType( 'float32' );\n* // returns 'float64'\n*/\nfunction nextDataType( dtype ) {\n\tif ( arguments.length === 0 ) {\n\t\treturn generateTable();\n\t}\n\tdtype = resolveStr( dtype );\n\tif ( hasOwnProp( NEXT_DTYPES, dtype ) ) {\n\t\treturn NEXT_DTYPES[ dtype ];\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = nextDataType;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the next larger ndarray data type of the same kind.\n*\n* @module @stdlib/ndarray/next-dtype\n*\n* @example\n* var nextDataType = require( '@stdlib/ndarray/next-dtype' );\n*\n* var dt = nextDataType( 'float32' );\n* // returns 'float64'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isNonNegativeInteger = require( '@stdlib/assert/is-nonnegative-integer' ).isPrimitive;\nvar isCollection = require( '@stdlib/assert/is-collection' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns the number of elements in an ndarray.\n*\n* @param {ndarrayLike} x - input ndarray\n* @throws {TypeError} must provide an ndarray\n* @returns {NonNegativeInteger} number of elements\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var n = numel( zeros( [ 3, 3, 3 ] ) );\n* // returns 27\n*/\nfunction numel( x ) {\n\tvar ndims;\n\tvar sh;\n\tvar n;\n\tvar d;\n\tvar i;\n\n\t// Note: we intentionally avoid rigorous ndarray checks to minimize performance impacts. This obviously means that non-ndarray-like objects (e.g., vanilla arrays) can sneak through, but this is likely all right for the purposes of this function...\n\tif ( typeof x !== 'object' || x === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\tn = x.length;\n\tif ( isNonNegativeInteger( n ) ) {\n\t\treturn n;\n\t}\n\tsh = x.shape;\n\tif ( !isCollection( sh ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t}\n\tndims = sh.length;\n\tif ( ndims === 0 ) {\n\t\t// Note: for minimal \"ndarray-like objects\", this will erroneously return zero when `x` is a zero-dimensional ndarray. This is part of the rationale for having a `length` property on actual ndarrays. As we don't can't know whether a provided ndarray-like is actually zero-dimensional without knowing/inspecting implementation details, we return zero here...\n\t\treturn 0;\n\t}\n\tn = 1;\n\tfor ( i = 0; i < ndims; i++ ) {\n\t\td = sh[ i ];\n\t\tif ( !isNonNegativeInteger( d ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide an ndarray. Value: `%s`.', x ) );\n\t\t}\n\t\tn *= d;\n\t}\n\treturn n;\n}\n\n\n// EXPORTS //\n\nmodule.exports = numel;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the number of elements in an ndarray.\n*\n* @module @stdlib/ndarray/numel\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var numel = require( '@stdlib/ndarray/numel' );\n*\n* var n = numel( zeros( [ 3, 3, 3 ] ) );\n* // returns 27\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "{\n\t\"float64\": {\n\t\t\"float64\": \"float64\",\n\t\t\"float32\": \"float64\",\n\t\t\"int32\": \"float64\",\n\t\t\"int16\": \"float64\",\n\t\t\"int8\": \"float64\",\n\t\t\"uint32\": \"float64\",\n\t\t\"uint16\": \"float64\",\n\t\t\"uint8\": \"float64\",\n\t\t\"uint8c\": \"float64\",\n\t\t\"complex64\": \"complex128\",\n\t\t\"complex128\": \"complex128\",\n\t\t\"binary\": -1,\n\t\t\"generic\": \"generic\"\n\t},\n\t\"float32\": {\n\t\t\"float64\": \"float64\",\n\t\t\"float32\": \"float32\",\n\t\t\"int32\": \"float64\",\n\t\t\"int16\": \"float32\",\n\t\t\"int8\": \"float32\",\n\t\t\"uint32\": \"float64\",\n\t\t\"uint16\": \"float32\",\n\t\t\"uint8\": \"float32\",\n\t\t\"uint8c\": \"float32\",\n\t\t\"complex64\": \"complex64\",\n\t\t\"complex128\": \"complex128\",\n\t\t\"binary\": -1,\n\t\t\"generic\": \"generic\"\n\t},\n\t\"int32\": {\n\t\t\"float64\": \"float64\",\n\t\t\"float32\": \"float64\",\n\t\t\"int32\": \"int32\",\n\t\t\"int16\": \"int32\",\n\t\t\"int8\": \"int32\",\n\t\t\"uint32\": \"float64\",\n\t\t\"uint16\": \"int32\",\n\t\t\"uint8\": \"int32\",\n\t\t\"uint8c\": \"int32\",\n\t\t\"complex64\": \"complex128\",\n\t\t\"complex128\": \"complex128\",\n\t\t\"binary\": -1,\n\t\t\"generic\": \"generic\"\n\t},\n\t\"int16\": {\n\t\t\"float64\": \"float64\",\n\t\t\"float32\": \"float32\",\n\t\t\"int32\": \"int32\",\n\t\t\"int16\": \"int16\",\n\t\t\"int8\": \"int16\",\n\t\t\"uint32\": \"float64\",\n\t\t\"uint16\": \"int32\",\n\t\t\"uint8\": \"int16\",\n\t\t\"uint8c\": \"int16\",\n\t\t\"complex64\": \"complex64\",\n\t\t\"complex128\": \"complex128\",\n\t\t\"binary\": -1,\n\t\t\"generic\": \"generic\"\n\t},\n\t\"int8\": {\n\t\t\"float64\": \"float64\",\n\t\t\"float32\": \"float32\",\n\t\t\"int32\": \"int32\",\n\t\t\"int16\": \"int16\",\n\t\t\"int8\": \"int8\",\n\t\t\"uint32\": \"float64\",\n\t\t\"uint16\": \"int32\",\n\t\t\"uint8\": \"int16\",\n\t\t\"uint8c\": \"int16\",\n\t\t\"complex64\": \"complex64\",\n\t\t\"complex128\": \"complex128\",\n\t\t\"binary\": -1,\n\t\t\"generic\": \"generic\"\n\t},\n\t\"uint32\": {\n\t\t\"float64\": \"float64\",\n\t\t\"float32\": \"float64\",\n\t\t\"int32\": \"float64\",\n\t\t\"int16\": \"float64\",\n\t\t\"int8\": \"float64\",\n\t\t\"uint32\": \"uint32\",\n\t\t\"uint16\": \"uint32\",\n\t\t\"uint8\": \"uint32\",\n\t\t\"uint8c\": \"uint32\",\n\t\t\"complex64\": \"complex128\",\n\t\t\"complex128\": \"complex128\",\n\t\t\"binary\": -1,\n\t\t\"generic\": \"generic\"\n\t},\n\t\"uint16\": {\n\t\t\"float64\": \"float64\",\n\t\t\"float32\": \"float32\",\n\t\t\"int32\": \"int32\",\n\t\t\"int16\": \"int32\",\n\t\t\"int8\": \"int32\",\n\t\t\"uint32\": \"uint32\",\n\t\t\"uint16\": \"uint16\",\n\t\t\"uint8\": \"uint16\",\n\t\t\"uint8c\": \"uint16\",\n\t\t\"complex64\": \"complex64\",\n\t\t\"complex128\": \"complex128\",\n\t\t\"binary\": -1,\n\t\t\"generic\": \"generic\"\n\t},\n\t\"uint8\": {\n\t\t\"float64\": \"float64\",\n\t\t\"float32\": \"float32\",\n\t\t\"int32\": \"int32\",\n\t\t\"int16\": \"int16\",\n\t\t\"int8\": \"int16\",\n\t\t\"uint32\": \"uint32\",\n\t\t\"uint16\": \"uint16\",\n\t\t\"uint8\": \"uint8\",\n\t\t\"uint8c\": \"uint8\",\n\t\t\"complex64\": \"complex64\",\n\t\t\"complex128\": \"complex128\",\n\t\t\"binary\": -1,\n\t\t\"generic\": \"generic\"\n\t},\n\t\"uint8c\": {\n\t\t\"float64\": \"float64\",\n\t\t\"float32\": \"float32\",\n\t\t\"int32\": \"int32\",\n\t\t\"int16\": \"int16\",\n\t\t\"int8\": \"int16\",\n\t\t\"uint32\": \"uint32\",\n\t\t\"uint16\": \"uint16\",\n\t\t\"uint8\": \"uint8\",\n\t\t\"uint8c\": \"uint8c\",\n\t\t\"complex64\": \"complex64\",\n\t\t\"complex128\": \"complex128\",\n\t\t\"binary\": -1,\n\t\t\"generic\": \"generic\"\n\t},\n\t\"complex128\": {\n\t\t\"float64\": \"complex128\",\n\t\t\"float32\": \"complex128\",\n\t\t\"int32\": \"complex128\",\n\t\t\"int16\": \"complex128\",\n\t\t\"int8\": \"complex128\",\n\t\t\"uint32\": \"complex128\",\n\t\t\"uint16\": \"complex128\",\n\t\t\"uint8\": \"complex128\",\n\t\t\"uint8c\": \"complex128\",\n\t\t\"complex64\": \"complex128\",\n\t\t\"complex128\": \"complex128\",\n\t\t\"binary\": -1,\n\t\t\"generic\": \"generic\"\n\t},\n\t\"complex64\": {\n\t\t\"float64\": \"complex128\",\n\t\t\"float32\": \"complex64\",\n\t\t\"int32\": \"complex128\",\n\t\t\"int16\": \"complex64\",\n\t\t\"int8\": \"complex64\",\n\t\t\"uint32\": \"complex128\",\n\t\t\"uint16\": \"complex64\",\n\t\t\"uint8\": \"complex64\",\n\t\t\"uint8c\": \"complex64\",\n\t\t\"complex64\": \"complex64\",\n\t\t\"complex128\": \"complex128\",\n\t\t\"binary\": -1,\n\t\t\"generic\": \"generic\"\n\t},\n\t\"generic\": {\n\t\t\"float64\": \"generic\",\n\t\t\"float32\": \"generic\",\n\t\t\"int32\": \"generic\",\n\t\t\"int16\": \"generic\",\n\t\t\"int8\": \"generic\",\n\t\t\"uint32\": \"generic\",\n\t\t\"uint16\": \"generic\",\n\t\t\"uint8\": \"generic\",\n\t\t\"uint8c\": \"generic\",\n\t\t\"complex64\": \"generic\",\n\t\t\"complex128\": \"generic\",\n\t\t\"binary\": -1,\n\t\t\"generic\": \"generic\"\n\t},\n\t\"binary\": {\n\t\t\"float64\": -1,\n\t\t\"float32\": -1,\n\t\t\"int32\": -1,\n\t\t\"int16\": -1,\n\t\t\"int8\": -1,\n\t\t\"uint32\": -1,\n\t\t\"uint16\": -1,\n\t\t\"uint8\": -1,\n\t\t\"uint8c\": -1,\n\t\t\"complex64\": -1,\n\t\t\"complex128\": -1,\n\t\t\"binary\": \"binary\",\n\t\t\"generic\": -1\n\t}\n}\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar objectKeys = require( '@stdlib/utils/keys' );\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar resolve = require( './../../base/dtype-resolve-str' );\nvar PROMOTION_RULES = require( './promotion_rules.json' );\n\n\n// FUNCTIONS //\n\n/**\n* Generates a full table of promotion rules.\n*\n* @private\n* @returns {Object} table\n*/\nfunction generateFullTable() {\n\tvar dtypes;\n\tvar ntypes;\n\tvar out;\n\tvar tmp;\n\tvar dt1;\n\tvar dt2;\n\tvar o;\n\tvar j;\n\tvar i;\n\n\tout = {};\n\tdtypes = objectKeys( PROMOTION_RULES );\n\tntypes = dtypes.length;\n\tfor ( i = 0; i < ntypes; i++ ) {\n\t\tdt1 = dtypes[ i ];\n\t\to = PROMOTION_RULES[ dt1 ];\n\t\ttmp = {};\n\t\tfor ( j = 0; j < ntypes; j++ ) {\n\t\t\tdt2 = dtypes[ j ];\n\t\t\ttmp[ dt2 ] = o[ dt2 ];\n\t\t}\n\t\tout[ dt1 ] = tmp;\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Returns the ndarray data type with the smallest size and closest \"kind\" to which ndarray data types can be safely cast.\n*\n* @param {*} [dtype1] - ndarray data type value\n* @param {*} [dtype2] - ndarray data type value\n* @returns {(Object|integer|string|null)} promotion rule(s) or null\n*\n* @example\n* var table = promotionRules();\n* // returns {...}\n*\n* @example\n* var dt = promotionRules( 'float32', 'uint32' );\n* // returns 'float64'\n*\n* @example\n* var dt = promotionRules( 'binary', 'generic' );\n* // returns -1\n*\n* @example\n* var dt = promotionRules( 'float32', 'foo' );\n* // returns null\n*/\nfunction promotionRules( dtype1, dtype2 ) {\n\tvar o;\n\tif ( arguments.length === 0 ) {\n\t\treturn generateFullTable();\n\t}\n\tdtype1 = resolve( dtype1 );\n\tif ( hasOwnProp( PROMOTION_RULES, dtype1 ) ) {\n\t\to = PROMOTION_RULES[ dtype1 ];\n\t\tdtype2 = resolve( dtype2 );\n\t\tif ( hasOwnProp( o, dtype2 ) ) {\n\t\t\treturn o[ dtype2 ];\n\t\t}\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = promotionRules;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return the ndarray data type with the smallest size and closest \"kind\" to which ndarray data types can be safely cast.\n*\n* @module @stdlib/ndarray/promotion-rules\n*\n* @example\n* var promotionRules = require( '@stdlib/ndarray/promotion-rules' );\n*\n* var table = promotionRules();\n* // returns {...}\n*\n* var dt = promotionRules( 'float32', 'uint32' );\n* // returns 'float64'\n*\n* dt = promotionRules( 'binary', 'generic' );\n* // returns -1\n*\n* dt = promotionRules( 'float32', 'foo' );\n* // returns null\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );\nvar isMultiSlice = require( '@stdlib/assert/is-multi-slice' );\nvar isArrayLikeObject = require( '@stdlib/assert/is-array-like-object' );\nvar isPlainObject = require( '@stdlib/assert/is-plain-object' );\nvar isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar MultiSlice = require( '@stdlib/slice/multi' );\nvar base = require( './../../base/slice' );\nvar getShape = require( './../../shape' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns a read-only view of an input ndarray.\n*\n* @param {ndarray} x - input array\n* @param {...*} s - slice arguments\n* @param {Options} [options] - options\n* @param {boolean} [options.strict] - boolean indicating whether to enforce strict bounds checking\n* @throws {TypeError} first argument must be an ndarray\n* @throws {TypeError} must provide valid slice arguments\n* @throws {Error} insufficient arguments\n* @throws {Error} too many arguments\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {RangeError} number of slice dimensions must match the number of array dimensions\n* @throws {RangeError} slice exceeds array bounds\n* @returns {ndarray} ndarray view\n*\n* @example\n* var Slice = require( '@stdlib/slice/ctor' );\n* var MultiSlice = require( '@stdlib/slice/multi' );\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n*\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n* // returns \n*\n* var sh = x.shape;\n* // returns [ 3, 2 ]\n*\n* var arr = ndarray2array( x );\n* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]\n*\n* var s = new MultiSlice( new Slice( null, null, -2 ), new Slice( null, null, -1 ) );\n* // returns \n*\n* var y = slice( x, s );\n* // returns \n*\n* sh = y.shape;\n* // returns [ 2, 2 ]\n*\n* arr = ndarray2array( y );\n* // returns [ [ 6.0, 5.0 ], [ 2.0, 1.0 ] ]\n*/\nfunction slice( x, s ) {\n\tvar options;\n\tvar nargs;\n\tvar opts;\n\tvar args;\n\tvar sh;\n\tvar S;\n\tvar i;\n\n\topts = {\n\t\t'strict': true\n\t};\n\tnargs = arguments.length;\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ndarray. Value: `%s`.', x ) );\n\t}\n\tif ( isPlainObject( arguments[ nargs-1 ] ) ) {\n\t\tnargs -= 1;\n\t\toptions = arguments[ nargs ];\n\t\tif ( hasOwnProp( options, 'strict' ) ) {\n\t\t\tif ( !isBoolean( options.strict ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'strict', options.strict ) );\n\t\t\t}\n\t\t\topts.strict = options.strict;\n\t\t}\n\t\tsh = getShape( x );\n\t\tif ( nargs === 1 && sh.length > 0 ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Number of slice dimensions does not match the number of array dimensions. Array shape: (%s). Slice dimensions: %u.', sh.join( ',' ), 0 ) );\n\t\t}\n\t}\n\tif ( isMultiSlice( s ) ) {\n\t\tS = s;\n\t\tif ( nargs > 2 ) {\n\t\t\tthrow new Error( 'invalid invocation. Too many arguments.' );\n\t\t}\n\t} else {\n\t\tif ( isArrayLikeObject( s ) ) {\n\t\t\targs = s;\n\t\t\tif ( nargs > 2 ) {\n\t\t\t\tthrow new Error( 'invalid invocation. Too many arguments.' );\n\t\t\t}\n\t\t} else {\n\t\t\targs = [];\n\t\t\tfor ( i = 1; i < nargs; i++ ) {\n\t\t\t\targs.push( arguments[ i ] );\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tS = MultiSlice.apply( null, args );\n\t\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\t\t// Search for the first offending value...\n\t\t\tfor ( i = 0; i < args.length; i++ ) {\n\t\t\t\ttry {\n\t\t\t\t\tnew MultiSlice( args[ i ] ); // eslint-disable-line no-new\n\t\t\t\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Slice arguments must be either a Slice, integer, null, or undefined. Value: `%s`.', String( args[ i ] ) ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn base( x, S, opts.strict, false );\n}\n\n\n// EXPORTS //\n\nmodule.exports = slice;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a read-only view of an input ndarray.\n*\n* @module @stdlib/ndarray/slice\n*\n* @example\n* var Slice = require( '@stdlib/slice/ctor' );\n* var MultiSlice = require( '@stdlib/slice/multi' );\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n* var slice = require( '@stdlib/ndarray/slice' );\n*\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n* // returns \n*\n* var sh = x.shape;\n* // returns [ 3, 2 ]\n*\n* var arr = ndarray2array( x );\n* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]\n*\n* var s = new MultiSlice( new Slice( null, null, -2 ), new Slice( null, null, -1 ) );\n* // returns \n*\n* var y = slice( x, s );\n* // returns \n*\n* sh = y.shape;\n* // returns [ 2, 2 ]\n*\n* arr = ndarray2array( y );\n* // returns [ [ 6.0, 5.0 ], [ 2.0, 1.0 ] ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );\nvar isMultiSlice = require( '@stdlib/assert/is-multi-slice' );\nvar isArrayLikeObject = require( '@stdlib/assert/is-array-like-object' );\nvar isPlainObject = require( '@stdlib/assert/is-plain-object' );\nvar isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;\nvar isReadOnly = require( './../../base/assert/is-read-only' );\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar MultiSlice = require( '@stdlib/slice/multi' );\nvar base = require( './../../base/slice-assign' );\nvar getShape = require( './../../shape' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Assigns element values from a broadcasted input ndarray to corresponding elements in an output ndarray view.\n*\n* @param {ndarray} x - input array\n* @param {ndarray} y - output array\n* @param {...*} s - slice arguments\n* @param {Options} [options] - options\n* @param {boolean} [options.strict] - boolean indicating whether to enforce strict bounds checking\n* @throws {TypeError} first argument must be an ndarray\n* @throws {TypeError} second argument must be an ndarray\n* @throws {TypeError} must provide valid slice arguments\n* @throws {Error} insufficient arguments\n* @throws {Error} too many arguments\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {RangeError} number of slice dimensions must match the number of output array dimensions\n* @throws {RangeError} slice exceeds array bounds\n* @throws {Error} input array must be broadcast compatible with an output array view\n* @throws {TypeError} input array cannot be safely cast to the output array data type\n* @throws {Error} cannot write to a read-only ndarray\n* @returns {ndarray} output array\n*\n* @example\n* var Slice = require( '@stdlib/slice/ctor' );\n* var MultiSlice = require( '@stdlib/slice/multi' );\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n* var ndzeros = require( '@stdlib/ndarray/zeros' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n*\n* // Define an input array:\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n* // returns \n*\n* var sh = x.shape;\n* // returns [ 3, 2 ]\n*\n* var arr = ndarray2array( x );\n* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]\n*\n* // Define an output array:\n* var y = ndzeros( [ 2, 3, 2 ], {\n* 'dtype': x.dtype\n* });\n*\n* // Create a slice:\n* var s0 = null;\n* var s1 = new Slice( null, null, -1 );\n* var s2 = new Slice( null, null, -1 );\n* var s = new MultiSlice( s0, s1, s2 );\n* // returns \n*\n* // Perform assignment:\n* var out = sliceAssign( x, y, s );\n* // returns \n*\n* var bool = ( out === y );\n* // returns true\n*\n* arr = ndarray2array( y );\n* // returns [ [ [ 6.0, 5.0 ], [ 4.0, 3.0 ], [ 2.0, 1.0 ] ], [ [ 6.0, 5.0 ], [ 4.0, 3.0 ], [ 2.0, 1.0 ] ] ]\n*/\nfunction sliceAssign( x, y, s ) {\n\tvar options;\n\tvar nargs;\n\tvar opts;\n\tvar args;\n\tvar sh;\n\tvar S;\n\tvar i;\n\n\topts = {\n\t\t'strict': true\n\t};\n\tnargs = arguments.length;\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ndarray. Value: `%s`.', x ) );\n\t}\n\tif ( !isndarrayLike( y ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an ndarray. Value: `%s`.', y ) );\n\t}\n\tif ( isReadOnly( y ) ) {\n\t\tthrow new Error( 'invalid argument. Cannot write to a read-only array.' );\n\t}\n\tif ( isPlainObject( arguments[ nargs-1 ] ) ) {\n\t\tnargs -= 1;\n\t\toptions = arguments[ nargs ];\n\t\tif ( hasOwnProp( options, 'strict' ) ) {\n\t\t\tif ( !isBoolean( options.strict ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'strict', options.strict ) );\n\t\t\t}\n\t\t\topts.strict = options.strict;\n\t\t}\n\t\tsh = getShape( y );\n\t\tif ( nargs === 2 && sh.length > 0 ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Number of slice dimensions does not match the number of array dimensions. Array shape: (%s). Slice dimensions: %u.', sh.join( ',' ), 0 ) );\n\t\t}\n\t}\n\tif ( isMultiSlice( s ) ) {\n\t\tS = s;\n\t\tif ( nargs > 3 ) {\n\t\t\tthrow new Error( 'invalid invocation. Too many arguments.' );\n\t\t}\n\t} else {\n\t\tif ( isArrayLikeObject( s ) ) {\n\t\t\targs = s;\n\t\t\tif ( nargs > 3 ) {\n\t\t\t\tthrow new Error( 'invalid invocation. Too many arguments.' );\n\t\t\t}\n\t\t} else {\n\t\t\targs = [];\n\t\t\tfor ( i = 2; i < nargs; i++ ) {\n\t\t\t\targs.push( arguments[ i ] );\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tS = MultiSlice.apply( null, args );\n\t\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\t\t// Search for the first offending value...\n\t\t\tfor ( i = 0; i < args.length; i++ ) {\n\t\t\t\ttry {\n\t\t\t\t\tnew MultiSlice( args[ i ] ); // eslint-disable-line no-new\n\t\t\t\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Slice arguments must be either a Slice, integer, null, or undefined. Value: `%s`.', String( args[ i ] ) ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn base( x, y, S, opts.strict );\n}\n\n\n// EXPORTS //\n\nmodule.exports = sliceAssign;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Assign element values from a broadcasted input ndarray to corresponding elements in an output ndarray view.\n*\n* @module @stdlib/ndarray/slice-assign\n*\n* @example\n* var Slice = require( '@stdlib/slice/ctor' );\n* var MultiSlice = require( '@stdlib/slice/multi' );\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n* var ndzeros = require( '@stdlib/ndarray/zeros' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n* var sliceAssign = require( '@stdlib/ndarray/slice-assign' );\n*\n* // Define an input array:\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n* // returns \n*\n* var sh = x.shape;\n* // returns [ 3, 2 ]\n*\n* var arr = ndarray2array( x );\n* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]\n*\n* // Define an output array:\n* var y = ndzeros( [ 2, 3, 2 ], {\n* 'dtype': x.dtype\n* });\n*\n* // Create a slice:\n* var s0 = null;\n* var s1 = new Slice( null, null, -1 );\n* var s2 = new Slice( null, null, -1 );\n* var s = new MultiSlice( s0, s1, s2 );\n* // returns \n*\n* // Perform assignment:\n* var out = sliceAssign( x, y, s );\n* // returns \n*\n* var bool = ( out === y );\n* // returns true\n*\n* arr = ndarray2array( y );\n* // returns [ [ [ 6.0, 5.0 ], [ 4.0, 3.0 ], [ 2.0, 1.0 ] ], [ [ 6.0, 5.0 ], [ 4.0, 3.0 ], [ 2.0, 1.0 ] ] ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isPlainObject = require( '@stdlib/assert/is-plain-object' );\nvar isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;\nvar isInteger = require( '@stdlib/assert/is-integer' ).isPrimitive;\nvar isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );\nvar isUndefined = require( '@stdlib/assert/is-undefined' );\nvar isSlice = require( '@stdlib/assert/is-slice' );\nvar isNull = require( '@stdlib/assert/is-null' );\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar Slice = require( '@stdlib/slice/ctor' );\nvar base = require( './../../base/slice-dimension' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Returns a read-only view of an input ndarray when sliced along a specified dimension.\n*\n* @param {ndarray} x - input array\n* @param {integer} dim - index of dimension to slice\n* @param {(Slice|integer|null|undefined)} s - slice argument\n* @param {Options} [options] - options\n* @param {boolean} [options.strict] - boolean indicating whether to enforce strict bounds checking\n* @throws {TypeError} first argument must be an ndarray having one or more dimensions\n* @throws {TypeError} second argument must be an integer\n* @throws {TypeError} third argument must be either a Slice, integer, null, or undefined\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {RangeError} dimension index exceeds the number of dimensions\n* @throws {RangeError} slice exceeds array bounds\n* @returns {ndarray} ndarray view\n*\n* @example\n* var Slice = require( '@stdlib/slice/ctor' );\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n*\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n* // returns \n*\n* var sh = x.shape;\n* // returns [ 3, 2 ]\n*\n* var arr = ndarray2array( x );\n* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]\n*\n* var s = new Slice( null, null, -1 );\n* // returns \n*\n* var y = sliceDimension( x, 0, s );\n* // returns \n*\n* sh = y.shape;\n* // returns [ 3, 2 ]\n*\n* arr = ndarray2array( y );\n* // returns [ [ 5.0, 6.0 ], [ 3.0, 4.0 ], [ 1.0, 2.0 ] ]\n*/\nfunction sliceDimension( x, dim, s ) {\n\tvar options;\n\tvar slice;\n\tvar opts;\n\n\topts = {\n\t\t'strict': true\n\t};\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ndarray. Value: `%s`.', x ) );\n\t}\n\tif ( !isInteger( dim ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', dim ) );\n\t}\n\tif ( isInteger( s ) || isSlice( s ) ) {\n\t\tslice = s;\n\t} else if ( isNull( s ) || isUndefined( s ) ) {\n\t\tslice = new Slice();\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. Third argument must be either a Slice, integer, null, or undefined. Value: `%s`.', s ) );\n\t}\n\tif ( arguments.length > 3 ) {\n\t\toptions = arguments[ 3 ];\n\t\tif ( !isPlainObject( options ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t\t}\n\t\tif ( hasOwnProp( options, 'strict' ) ) {\n\t\t\tif ( !isBoolean( options.strict ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'strict', options.strict ) );\n\t\t\t}\n\t\t\topts.strict = options.strict;\n\t\t}\n\t}\n\treturn base( x, dim, slice, opts.strict, false );\n}\n\n\n// EXPORTS //\n\nmodule.exports = sliceDimension;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a read-only view of an input ndarray when sliced along a specified dimension.\n*\n* @module @stdlib/ndarray/slice-dimension\n*\n* @example\n* var Slice = require( '@stdlib/slice/ctor' );\n* var ndarray = require( '@stdlib/ndarray/ctor' );\n* var ndarray2array = require( '@stdlib/ndarray/to-array' );\n* var sliceDimension = require( '@stdlib/ndarray/slice-dimension' );\n*\n* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ];\n* var shape = [ 3, 2 ];\n* var strides = [ 2, 1 ];\n* var offset = 0;\n*\n* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' );\n* // returns \n*\n* var sh = x.shape;\n* // returns [ 3, 2 ]\n*\n* var arr = ndarray2array( x );\n* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ]\n*\n* var s = new Slice( null, null, -1 );\n* // returns \n*\n* var y = sliceDimension( x, 0, s );\n* // returns \n*\n* sh = y.shape;\n* // returns [ 3, 2 ]\n*\n* arr = ndarray2array( y );\n* // returns [ [ 5.0, 6.0 ], [ 3.0, 4.0 ], [ 1.0, 2.0 ] ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "{\n\t\"mode\": [ \"throw\" ],\n\t\"order\": \"row-major\"\n}\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isObject = require( '@stdlib/assert/is-plain-object' );\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar isArray = require( '@stdlib/assert/is-array' );\nvar isOrder = require( './../../base/assert/is-order' );\nvar isIndexMode = require( './../../base/assert/is-index-mode' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Validates function options.\n*\n* @private\n* @param {Object} opts - destination object\n* @param {Options} options - function options\n* @param {(StringArray|string)} [options.mode] - specifies how to handle subscripts which exceed array dimensions\n* @param {string} [options.order] - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @returns {(Error|null)} null or an error object\n*\n* @example\n* var opts = {};\n* var options = {\n* 'mode': 'throw',\n* 'order': 'column-major'\n* };\n* var err = validate( opts, options );\n* if ( err ) {\n* throw err;\n* }\n*/\nfunction validate( opts, options ) {\n\tvar i;\n\tif ( !isObject( options ) ) {\n\t\treturn new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t}\n\tif ( hasOwnProp( options, 'mode' ) ) {\n\t\topts.mode = options.mode;\n\t\tif ( !isArray( opts.mode ) ) {\n\t\t\topts.mode = [ opts.mode ];\n\t\t} else if ( opts.mode.length === 0 ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option cannot be an empty array.', 'mode' ) );\n\t\t}\n\t\tfor ( i = 0; i < opts.mode.length; i++ ) {\n\t\t\tif ( !isIndexMode( opts.mode[ i ] ) ) {\n\t\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a supported/recognized mode. Option: `%s`.', 'mode', opts.mode[ i ] ) );\n\t\t\t}\n\t\t}\n\t}\n\tif ( hasOwnProp( options, 'order' ) ) {\n\t\topts.order = options.order;\n\t\tif ( !isOrder( opts.order ) ) {\n\t\t\treturn new TypeError( format( 'invalid option. `%s` option must be a supported/recognized order. Option: `%s`.', 'order', opts.order ) );\n\t\t}\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nmodule.exports = validate;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isNonNegativeIntegerArray = require( '@stdlib/assert/is-nonnegative-integer-array' ).primitives;\nvar isInteger = require( '@stdlib/assert/is-integer' ).isPrimitive;\nvar shape2strides = require( './../../base/shape2strides' );\nvar getIndex = require( './../../base/sub2ind' );\nvar format = require( '@stdlib/string/format' );\nvar defaults = require( './defaults.json' );\nvar validate = require( './validate.js' );\n\n\n// MAIN //\n\n/**\n* Converts subscripts to a linear index.\n*\n* ## Notes\n*\n* - The function accepts the following \"modes\":\n*\n* - `throw`: throws an error when a subscript exceeds array dimensions.\n* - `wrap`: wrap around subscripts exceeding array dimensions using modulo arithmetic.\n* - `clamp`: set subscripts exceeding array dimensions to either `0` (minimum index) or the maximum index along a particular dimension.\n*\n* - If provided fewer modes than dimensions, the function recycles modes using modulo arithmetic.\n*\n* @param {NonNegativeIntegerArray} shape - array shape\n* @param {...integer} i - subscripts\n* @param {Options} [options] - function options\n* @param {(StringArray|string)} [options.mode=[\"throw\"]] - specifies how to handle subscripts which exceed array dimensions\n* @param {string} [options.order=\"row-major\"] - specifies whether an array is row-major (C-style) or column-major (Fortran-style)\n* @throws {TypeError} first argument must be an array-like object containing nonnegative integers\n* @throws {TypeError} subscripts must be integer valued\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {RangeError} must provide subscripts which do not exceed array dimensions\n* @throws {RangeError} number of subscripts much match the number of dimensions\n* @returns {NonNegativeInteger} linear index\n*\n* @example\n* var i = sub2ind( [ 3, 3, 3 ], 1, 2, 2 );\n* // returns 17\n*/\nfunction sub2ind() {\n\tvar options;\n\tvar shape;\n\tvar ndims;\n\tvar args;\n\tvar opts;\n\tvar err;\n\tvar len;\n\tvar i;\n\tvar j;\n\n\tshape = arguments[ 0 ];\n\tif ( !isNonNegativeIntegerArray( shape ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object containing nonnegative integers. Value: `%s`.', shape ) );\n\t}\n\tlen = arguments.length;\n\tndims = shape.length;\n\n\topts = {};\n\topts.mode = defaults.mode.slice();\n\topts.order = defaults.order;\n\n\tif ( len > ndims+1 ) {\n\t\tj = len - 1;\n\t\toptions = arguments[ j ];\n\t\terr = validate( opts, options );\n\t\tif ( err ) {\n\t\t\tthrow err;\n\t\t}\n\t} else {\n\t\tj = len;\n\t}\n\ti = 1;\n\tif ( j-i !== ndims ) {\n\t\tthrow new RangeError( format( 'invalid argument. Number of provided subscripts must match the number of dimensions. ndims: `%u`. Number of subscripts: `%u`.', ndims, j-i ) );\n\t}\n\targs = new Array( ndims+4 );\n\targs[ 0 ] = shape;\n\targs[ 1 ] = shape2strides( shape, opts.order );\n\targs[ 2 ] = 0; // strides are positive, so offset is always zero\n\tfor ( ; i < j; i++ ) {\n\t\tif ( !isInteger( arguments[ i ] ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Subscripts must be integer valued. Argument: `%u`. Value: `%s`.', i, arguments[ i ] ) );\n\t\t}\n\t\targs[ i+2 ] = arguments[ i ];\n\t}\n\targs[ i+2 ] = opts.mode; // i+2 == args.length-1\n\treturn getIndex.apply( null, args );\n}\n\n\n// EXPORTS //\n\nmodule.exports = sub2ind;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Convert subscripts to a linear index.\n*\n* @module @stdlib/ndarray/sub2ind\n*\n* @example\n* var sub2ind = require( '@stdlib/ndarray/sub2ind' );\n*\n* var i = sub2ind( [ 3, 3, 3 ], 1, 2, 2 );\n* // returns 17\n*/\n\n// MODULES //\n\nvar sub2ind = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = sub2ind;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isPlainObject = require( '@stdlib/assert/is-plain-object' );\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar isArrayLike = require( '@stdlib/assert/is-array-like' );\nvar shape2strides = require( './../../base/shape2strides' );\nvar strides2offset = require( './../../base/strides2offset' );\nvar buffer = require( './../../base/buffer' );\nvar numel = require( './../../base/numel' );\nvar ndarray = require( './../../ctor' );\nvar defaults = require( './../../defaults' );\nvar format = require( '@stdlib/string/format' );\n\n\n// VARIABLES //\n\nvar DTYPE = defaults.get( 'dtypes.default' );\nvar ORDER = defaults.get( 'order' );\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled ndarray having a specified shape and data type.\n*\n* @param {(NonNegativeIntegerArray|NonNegativeInteger)} shape - array shape\n* @param {Options} [options] - options\n* @param {string} [options.dtype='float64'] - data type\n* @param {string} [options.order='row-major'] - array order\n* @param {string} [options.mode=\"throw\"] - specifies how to handle indices which exceed array dimensions\n* @param {StringArray} [options.submode=[\"throw\"]] - specifies how to handle subscripts which exceed array dimensions on a per dimension basis\n* @param {boolean} [options.readonly=false] - boolean indicating whether an array should be read-only\n* @throws {TypeError} first argument must be either a nonnegative integer or an array of nonnegative integers\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} `dtype` option must be a recognized data type\n* @throws {TypeError} `order` option must be a recognized array order\n* @throws {TypeError} must provide valid options\n* @returns {ndarray} ndarray\n*\n* @example\n* var arr = zeros( [ 2, 2 ] );\n* // returns \n*\n* var sh = arr.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = arr.dtype;\n* // returns 'float64'\n*/\nfunction zeros( shape ) {\n\tvar options;\n\tvar dtype;\n\tvar order;\n\tvar ndims;\n\tvar opts;\n\tvar buf;\n\tvar len;\n\tvar st;\n\tvar sh;\n\n\topts = {};\n\tif ( arguments.length > 1 ) {\n\t\toptions = arguments[ 1 ];\n\t\tif ( !isPlainObject( options ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t\t}\n\t\tif ( hasOwnProp( options, 'dtype' ) ) {\n\t\t\tdtype = options.dtype;\n\t\t} else {\n\t\t\tdtype = DTYPE;\n\t\t}\n\t\tif ( hasOwnProp( options, 'order' ) ) {\n\t\t\torder = options.order;\n\t\t} else {\n\t\t\torder = ORDER;\n\t\t}\n\t\tif ( hasOwnProp( options, 'mode' ) ) {\n\t\t\topts.mode = options.mode;\n\t\t}\n\t\tif ( hasOwnProp( options, 'submode' ) ) {\n\t\t\topts.submode = options.submode;\n\t\t}\n\t\tif ( hasOwnProp( options, 'readonly' ) ) {\n\t\t\topts.readonly = options.readonly;\n\t\t}\n\t} else {\n\t\tdtype = DTYPE;\n\t\torder = ORDER;\n\t}\n\tif ( typeof shape === 'number' ) {\n\t\tsh = [ shape ];\n\t} else if ( isArrayLike( shape ) ) {\n\t\tsh = shape;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be either a nonnegative integer or an array of nonnegative integers. Value: `%s`.', shape ) );\n\t}\n\tndims = sh.length;\n\tif ( ndims > 0 ) {\n\t\tlen = numel( sh );\n\t\tif ( len !== len || len < 0 ) {\n\t\t\t// We should only get here if we've been provided an invalid shape (e.g., an array containing negative integers, etc)...\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be either a nonnegative integer or an array of nonnegative integers. Value: `%s`.', shape ) );\n\t\t}\n\t\tst = shape2strides( sh, order );\n\t} else {\n\t\t// For 0-dimensional arrays, the buffer should contain a single element...\n\t\tlen = 1;\n\t\tst = [ 0 ];\n\t}\n\tbuf = buffer( dtype, len );\n\tif ( buf === null ) {\n\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a recognized data type. Option: `%s`.', 'dtype', dtype ) );\n\t}\n\treturn new ndarray( dtype, buf, sh, st, strides2offset( sh, st ), order, opts ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = zeros;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create a zero-filled ndarray having a specified shape and data type.\n*\n* @module @stdlib/ndarray/zeros\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var arr = zeros( [ 2, 2 ], {\n* 'dtype': 'float32'\n* });\n* // returns \n*\n* var sh = arr.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = arr.dtype;\n* // returns 'float32'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );\nvar isPlainObject = require( '@stdlib/assert/is-plain-object' );\nvar isNonNegativeIntegerArray = require( '@stdlib/assert/is-nonnegative-integer-array' ).primitives;\nvar hasOwnProp = require( '@stdlib/assert/has-own-property' );\nvar shape2strides = require( './../../base/shape2strides' );\nvar strides2offset = require( './../../base/strides2offset' );\nvar buffer = require( './../../base/buffer' );\nvar numel = require( './../../base/numel' );\nvar getDType = require( './../../dtype' );\nvar getShape = require( './../../shape' );\nvar getOrder = require( './../../order' );\nvar ndarray = require( './../../ctor' );\nvar format = require( '@stdlib/string/format' );\n\n\n// MAIN //\n\n/**\n* Creates a zero-filled ndarray having the same shape and data type as a provided ndarray.\n*\n* @param {ndarray} x - input array\n* @param {Options} [options] - function options\n* @param {string} [options.dtype] - output array data type (overrides the input array's inferred data type)\n* @param {string} [options.order] - specifies whether the output array should be 'row-major' (C-style) or 'column-major' (Fortran-style) (overrides the input array's inferred order)\n* @param {(NonNegativeIntegerArray|NonNegativeInteger)} [options.shape] - output array shape (overrides the input array's inferred shape)\n* @param {string} [options.mode=\"throw\"] - specifies how to handle indices which exceed array dimensions\n* @param {StringArray} [options.submode=[\"throw\"]] - specifies how to handle subscripts which exceed array dimensions on a per dimension basis\n* @param {boolean} [options.readonly=false] - boolean indicating whether an array should be read-only\n* @throws {TypeError} first argument must have a recognized data type\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} `dtype` option must be a supported ndarray data type\n* @throws {TypeError} `order` option must be a supported order\n* @throws {TypeError} `shape` option must be either a nonnegative integer or an array of nonnegative integers\n* @throws {TypeError} must provide valid options\n* @returns {ndarray} ndarray\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n*\n* var x = zeros( [ 2, 2 ] );\n* // returns \n*\n* var y = zerosLike( x );\n* // returns \n*\n* var sh = y.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = y.dtype;\n* // returns 'float64'\n*/\nfunction zerosLike( x ) {\n\tvar options;\n\tvar dtype;\n\tvar order;\n\tvar ndims;\n\tvar opts;\n\tvar buf;\n\tvar len;\n\tvar st;\n\tvar sh;\n\n\tif ( !isndarrayLike( x ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ndarray-like object. Value: `%s`.', x ) );\n\t}\n\topts = {};\n\tif ( arguments.length > 1 ) {\n\t\toptions = arguments[ 1 ];\n\t\tif ( !isPlainObject( options ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t\t}\n\t\tif ( hasOwnProp( options, 'dtype' ) ) {\n\t\t\tdtype = options.dtype;\n\t\t} else {\n\t\t\tdtype = getDType( x );\n\t\t}\n\t\tif ( hasOwnProp( options, 'shape' ) ) {\n\t\t\tsh = options.shape;\n\t\t\tif ( typeof sh === 'number' ) {\n\t\t\t\tsh = [ sh ];\n\t\t\t}\n\t\t\tif ( !isNonNegativeIntegerArray( sh ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a nonnegative integer or an array of nonnegative integers. Option: `%s`.', 'shape', sh ) );\n\t\t\t}\n\t\t} else {\n\t\t\tsh = getShape( x );\n\t\t}\n\t\tif ( hasOwnProp( options, 'order' ) ) {\n\t\t\torder = options.order;\n\t\t} else {\n\t\t\torder = getOrder( x );\n\t\t}\n\t\tif ( hasOwnProp( options, 'mode' ) ) {\n\t\t\topts.mode = options.mode;\n\t\t}\n\t\tif ( hasOwnProp( options, 'submode' ) ) {\n\t\t\topts.submode = options.submode;\n\t\t}\n\t\tif ( hasOwnProp( options, 'readonly' ) ) {\n\t\t\topts.readonly = options.readonly;\n\t\t}\n\t} else {\n\t\tdtype = getDType( x );\n\t\tsh = getShape( x );\n\t\torder = getOrder( x );\n\t}\n\tndims = sh.length;\n\tif ( ndims > 0 ) {\n\t\tlen = numel( sh );\n\t\tst = shape2strides( sh, order );\n\t} else {\n\t\t// For 0-dimensional arrays, the buffer should contain a single element...\n\t\tlen = 1;\n\t\tst = [ 0 ];\n\t}\n\tbuf = buffer( dtype, len );\n\tif ( buf === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must have a recognized data type. Value: `%s`.', dtype ) );\n\t}\n\treturn new ndarray( dtype, buf, sh, st, strides2offset( sh, st ), order, opts ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nmodule.exports = zerosLike;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create a zero-filled ndarray having the same shape and data type as a provided ndarray.\n*\n* @module @stdlib/ndarray/zeros-like\n*\n* @example\n* var zeros = require( '@stdlib/ndarray/zeros' );\n* var zerosLike = require( '@stdlib/ndarray/zeros-like' );\n*\n* var x = zeros( [ 2, 2 ] );\n* // returns \n*\n* var y = zerosLike( x );\n* // returns \n*\n* var sh = y.shape;\n* // returns [ 2, 2 ]\n*\n* var dt = y.dtype;\n* // returns 'float64'\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/*\n* When adding modules to the namespace, ensure that they are added in alphabetical order according to module name.\n*/\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils/define-read-only-property' );\n\n\n// MAIN //\n\n/**\n* Top-level namespace.\n*\n* @namespace ns\n*/\nvar ns = {};\n\n/**\n* @name array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/array}\n*/\nsetReadOnly( ns, 'array', require( './../array' ) );\n\n/**\n* @name base\n* @memberof ns\n* @readonly\n* @type {Namespace}\n* @see {@link module:@stdlib/ndarray/base}\n*/\nsetReadOnly( ns, 'base', require( './../base' ) );\n\n/**\n* @name broadcastArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/broadcast-array}\n*/\nsetReadOnly( ns, 'broadcastArray', require( './../broadcast-array' ) );\n\n/**\n* @name ndarrayCastingModes\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/casting-modes}\n*/\nsetReadOnly( ns, 'ndarrayCastingModes', require( './../casting-modes' ) );\n\n/**\n* @name ndarray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/ctor}\n*/\nsetReadOnly( ns, 'ndarray', require( './../ctor' ) );\n\n/**\n* @name ndarrayDataBuffer\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/data-buffer}\n*/\nsetReadOnly( ns, 'ndarrayDataBuffer', require( './../data-buffer' ) );\n\n/**\n* @name defaults\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/defaults}\n*/\nsetReadOnly( ns, 'defaults', require( './../defaults' ) );\n\n/**\n* @name dispatch\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/dispatch}\n*/\nsetReadOnly( ns, 'dispatch', require( './../dispatch' ) );\n\n/**\n* @name ndarrayDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/dtype}\n*/\nsetReadOnly( ns, 'ndarrayDataType', require( './../dtype' ) );\n\n/**\n* @name ndarrayDataTypes\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/dtypes}\n*/\nsetReadOnly( ns, 'ndarrayDataTypes', require( './../dtypes' ) );\n\n/**\n* @name ndempty\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/empty}\n*/\nsetReadOnly( ns, 'ndempty', require( './../empty' ) );\n\n/**\n* @name ndemptyLike\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/empty-like}\n*/\nsetReadOnly( ns, 'ndemptyLike', require( './../empty-like' ) );\n\n/**\n* @name FancyArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/fancy}\n*/\nsetReadOnly( ns, 'FancyArray', require( './../fancy' ) );\n\n/**\n* @name scalar2ndarray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/from-scalar}\n*/\nsetReadOnly( ns, 'scalar2ndarray', require( './../from-scalar' ) );\n\n/**\n* @name ind2sub\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/ind2sub}\n*/\nsetReadOnly( ns, 'ind2sub', require( './../ind2sub' ) );\n\n/**\n* @name ndarrayIndexModes\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/index-modes}\n*/\nsetReadOnly( ns, 'ndarrayIndexModes', require( './../index-modes' ) );\n\n/**\n* @name iter\n* @memberof ns\n* @readonly\n* @type {Namespace}\n* @see {@link module:@stdlib/ndarray/iter}\n*/\nsetReadOnly( ns, 'iter', require( './../iter' ) );\n\n/**\n* @name maybeBroadcastArray\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/maybe-broadcast-array}\n*/\nsetReadOnly( ns, 'maybeBroadcastArray', require( './../maybe-broadcast-array' ) );\n\n/**\n* @name ndarrayMinDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/min-dtype}\n*/\nsetReadOnly( ns, 'ndarrayMinDataType', require( './../min-dtype' ) );\n\n/**\n* @name ndims\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/ndims}\n*/\nsetReadOnly( ns, 'ndims', require( './../ndims' ) );\n\n/**\n* @name ndarrayNextDataType\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/next-dtype}\n*/\nsetReadOnly( ns, 'ndarrayNextDataType', require( './../next-dtype' ) );\n\n/**\n* @name numel\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/numel}\n*/\nsetReadOnly( ns, 'numel', require( './../numel' ) );\n\n/**\n* @name ndarrayOffset\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/offset}\n*/\nsetReadOnly( ns, 'ndarrayOffset', require( './../offset' ) );\n\n/**\n* @name ndarrayOrder\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/order}\n*/\nsetReadOnly( ns, 'ndarrayOrder', require( './../order' ) );\n\n/**\n* @name ndarrayOrders\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/orders}\n*/\nsetReadOnly( ns, 'ndarrayOrders', require( './../orders' ) );\n\n/**\n* @name ndarrayOutputDataTypePolicies\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/output-dtype-policies}\n*/\nsetReadOnly( ns, 'ndarrayOutputDataTypePolicies', require( './../output-dtype-policies' ) );\n\n/**\n* @name ndarrayPromotionRules\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/promotion-rules}\n*/\nsetReadOnly( ns, 'ndarrayPromotionRules', require( './../promotion-rules' ) );\n\n/**\n* @name ndarraySafeCasts\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/safe-casts}\n*/\nsetReadOnly( ns, 'ndarraySafeCasts', require( './../safe-casts' ) );\n\n/**\n* @name ndarraySameKindCasts\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/same-kind-casts}\n*/\nsetReadOnly( ns, 'ndarraySameKindCasts', require( './../same-kind-casts' ) );\n\n/**\n* @name ndarrayShape\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/shape}\n*/\nsetReadOnly( ns, 'ndarrayShape', require( './../shape' ) );\n\n/**\n* @name ndslice\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/slice}\n*/\nsetReadOnly( ns, 'ndslice', require( './../slice' ) );\n\n/**\n* @name ndsliceAssign\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/slice-assign}\n*/\nsetReadOnly( ns, 'ndsliceAssign', require( './../slice-assign' ) );\n\n/**\n* @name ndsliceDimension\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/slice-dimension}\n*/\nsetReadOnly( ns, 'ndsliceDimension', require( './../slice-dimension' ) );\n\n/**\n* @name ndarrayStrides\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/strides}\n*/\nsetReadOnly( ns, 'ndarrayStrides', require( './../strides' ) );\n\n/**\n* @name sub2ind\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/sub2ind}\n*/\nsetReadOnly( ns, 'sub2ind', require( './../sub2ind' ) );\n\n/**\n* @name ndarray2array\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/to-array}\n*/\nsetReadOnly( ns, 'ndarray2array', require( './../to-array' ) );\n\n/**\n* @name ndzeros\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/zeros}\n*/\nsetReadOnly( ns, 'ndzeros', require( './../zeros' ) );\n\n/**\n* @name ndzerosLike\n* @memberof ns\n* @readonly\n* @type {Function}\n* @see {@link module:@stdlib/ndarray/zeros-like}\n*/\nsetReadOnly( ns, 'ndzerosLike', require( './../zeros-like' ) );\n\n\n// EXPORTS //\n\nmodule.exports = ns;\n"], + "mappings": "uGAAA,IAAAA,GAAAC,EAAA,SAAAC,GAAAC,GAAA,cA6BA,SAASC,GAAUC,EAAQ,CAC1B,IAAIC,EACAC,EACAC,EACAC,EAIJ,IAFAH,EAAQD,EAAM,OACdE,EAAM,CAAC,EACDE,EAAI,E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E,GAErBnB,GAAM3C,EACN4C,GAAMpC,EACNuD,IAAK,EAENpB,GAAM1C,EACN2C,GAAMnC,CACP,CACAkC,GAAMzC,EACN0C,GAAMlC,CACP,CACAiC,GAAMxC,EACNyC,GAAMjC,CACP,CACAgC,GAAMvC,EACNwC,GAAMhC,CACP,CACA+B,GAAMtC,EACNuC,GAAM/B,CACP,CACA8B,GAAMrC,EACNsC,GAAM9B,CACP,CACA6B,GAAMpC,EACNqC,GAAM7B,CACP,CAST,CAKA3B,GAAO,QAAUG,KCzVjB,IAAAyE,GAAAC,EAAA,SAAAC,GAAAC,GAAA,cAwBA,IAAIC,GAAY,KACZC,GAAY,KA6EhB,SAASC,GAAgBC,EAAGC,EAAGC,EAAKC,EAAMC,EAAU,CACnD,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GA2BJ,IAtBAF,GAAI/E,GAAWG,EAAE,MAAOA,EAAE,QAASC,EAAE,OAAQ,EAC7CyC,EAAKkC,GAAE,GACPxB,EAAKwB,GAAE,GACPvB,GAAKuB,GAAE,GAGPvE,EAAQP,GAAWE,EAAE,MAAOC,EAAE,KAAM,EAGpCqD,GAAKtD,EAAE,OACPuD,GAAKtD,EAAE,OAGPK,EAAON,EAAE,KACTO,EAAON,EAAE,KAGTO,EAAM4C,EAAG,CAAC,EACVnC,EAAMoC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B,IAAwB,EASzDD,GAAaC,GAAI,UAAW,IAAwB,EASpDD,GAAaC,GAAI,gBAAiB,IAA+B,EASjED,GAAaC,GAAI,mBAAoB,IAAkC,EASvED,GAAaC,GAAI,iBAAkB,IAA0B,EAS7DD,GAAaC,GAAI,UAAW,IAA0B,EAStDD,GAAaC,GAAI,gBAAiB,IAA2B,EAS7DD,GAAaC,GAAI,UAAW,IAAwB,EASpDD,GAAaC,GAAI,cAAe,IAA6B,EAK7D,OAAO,QAAUA", + "names": ["require_main", "__commonJSMin", "exports", "module", "rowmajor", "shape", "ndims", "out", "s", "i", "columnmajor", "shape2strides", "order", "require_assign", "__commonJSMin", "exports", "module", "rowmajor", "shape", "out", "ndims", "s", "i", "columnmajor", "shape2strides", "order", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "assign", "require_main", "__commonJSMin", "exports", "module", "strides2offset", "shape", "strides", "offset", "ndims", "i", "require_lib", "__commonJSMin", "exports", "module", "strides2offset", "require_main", "__commonJSMin", "exports", "module", "abs", "strides2order", "strides", "column", "ndims", "row", "s1", "s2", "i", "require_lib", "__commonJSMin", "exports", "module", "strides2order", "require_main", "__commonJSMin", "exports", "module", "numel", "shape", "ndims", "n", "require_lib", "__commonJSMin", "exports", "module", "main", "require_orders", "__commonJSMin", "exports", "module", "require_main", "__commonJSMin", "exports", "module", "ORDERS", "orders", "require_enum", "__commonJSMin", "exports", "module", "enumerated", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "enumeration", "require_main", "__commonJSMin", "exports", "module", "orders", "ORDERS", "len", "isOrder", "v", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_dtypes", "__commonJSMin", "exports", "module", "require_main", "__commonJSMin", "exports", "module", "DTYPES", "dtypes", "out", "require_enum", "__commonJSMin", "exports", "module", "enumeration", "require_assign", "__commonJSMin", "exports", "module", "setReadOnly", "objectKeys", "assign", "target", "source", "keys", "k", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "enumeration", "assign", "require_main", "__commonJSMin", "exports", "module", "contains", "dtypes", "isDataType", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "minmaxViewBufferIndex", "shape", "strides", "offset", "ndims", "min", "max", "s", "i", "require_assign", "__commonJSMin", "exports", "module", "minmaxViewBufferIndex", "shape", "strides", "offset", "out", "ndims", "min", "max", "s", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "assign", "require_main", "__commonJSMin", "exports", "module", "minmax", "isBufferLengthCompatible", "len", "shape", "strides", "offset", "buf", "require_lib", "__commonJSMin", "exports", "module", "main", "require_bytes_per_element", "__commonJSMin", "exports", "module", "require_main", "__commonJSMin", "exports", "module", "BYTES_PER_ELEMENT", "bytesPerElement", "dtype", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "iterationOrder", "strides", "cnt", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_is_column_major_contiguous", "__commonJSMin", "exports", "module", "isColumnMajorContiguous", "order", "contiguous", "require_is_row_major_contiguous", "__commonJSMin", "exports", "module", "isRowMajorContiguous", "order", "contiguous", "require_is_contiguous", "__commonJSMin", "exports", "module", "minmaxViewBufferIndex", "isContiguous", "len", "shape", "strides", "offset", "iterationOrder", "buf", "require_copy_flags", "__commonJSMin", "exports", "module", "copyFlags", "flags", "require_iget", "__commonJSMin", "exports", "module", "iget", "idx", "strides", "shape", "ndims", "ind", "s", "i", "require_iset", "__commonJSMin", "exports", "module", "iset", "idx", "v", "strides", "shape", "ndims", "ind", "s", "i", "require_set", "__commonJSMin", "exports", "module", "set", "idx", "i", "require_get", "__commonJSMin", "exports", "module", "get", "idx", "i", "require_tojson", "__commonJSMin", "exports", "module", "real", "imag", "toJSON", "out", "len", "v", "require_tostring", "__commonJSMin", "exports", "module", "replace", "real", "imag", "CTORS", "toString", "buffer", "ndims", "ctor", "str", "dt", "v", "i", "require_modes", "__commonJSMin", "exports", "module", "require_main", "__commonJSMin", "exports", "module", "MODES", "modes", "require_enum", "__commonJSMin", "exports", "module", "enumerated", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "modes", "enumeration", "require_meta2dataview", "__commonJSMin", "exports", "module", "IS_LITTLE_ENDIAN", "ArrayBuffer", "DataView", "BigInt", "dtypes", "orders", "modes", "DTYPES", "ORDERS", "MODES", "meta2dataview", "nbytes", "flgs", "len", "dt", "sh", "st", "sm", "v", "m", "o", "s", "N", "M", "i", "require_meta2dataview_polyfill", "__commonJSMin", "exports", "module", "IS_LITTLE_ENDIAN", "ArrayBuffer", "DataView", "Uint8Array", "dtypes", "orders", "modes", "float64ToInt64Bytes", "DTYPES", "ORDERS", "MODES", "meta2dataview", "nbytes", "bytes", "flgs", "len", "dt", "sh", "st", "sm", "v", "m", "o", "s", "N", "M", "i", "require_main", "__commonJSMin", "exports", "module", "hasBigIntSupport", "setReadOnly", "setReadOnlyAccessor", "bytesPerElement", "iterationOrder", "strides2order", "Boolean", "isColumnMajorContiguous", "isRowMajorContiguous", "isContiguous", "copyFlags", "igetValue", "isetValue", "setValue", "getValue", "toJSON", "toString", "meta2dataview", "meta2dataviewPolyfill", "ndarray", "dtype", "buffer", "shape", "strides", "offset", "order", "contiguous", "nbytes", "ord", "len", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "defaults", "require_get", "__commonJSMin", "exports", "module", "defaults", "DEFAULTS", "HASH", "get", "name", "v", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "get", "require_main", "__commonJSMin", "exports", "module", "clampIndex", "idx", "max", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "wrapIndex", "idx", "max", "mp1", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "clampIndex", "wrapIndex", "format", "ind", "idx", "max", "mode", "require_lib", "__commonJSMin", "exports", "module", "main", "require_iget", "__commonJSMin", "exports", "module", "isInteger", "getIndex", "parent", "format", "base", "iget", "idx", "require_iset", "__commonJSMin", "exports", "module", "isInteger", "getIndex", "parent", "format", "base", "iset", "idx", "v", "require_get", "__commonJSMin", "exports", "module", "isInteger", "getIndex", "format", "get", "idx", "ind", "M", "require_set", "__commonJSMin", "exports", "module", "isInteger", "getIndex", "format", "set", "idx", "ind", "M", "require_copy_array", "__commonJSMin", "exports", "module", "copy", "arr", "len", "out", "require_main", "__commonJSMin", "exports", "module", "modes", "MODES", "len", "isIndexMode", "v", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_validate", "__commonJSMin", "exports", "module", "isObject", "hasOwnProp", "isArray", "isIndexMode", "isBoolean", "format", "validate", "opts", "options", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "isCollection", "isNonNegativeIntegerArray", "isNonNegativeInteger", "isIntegerArray", "isFunction", "isOrder", "isDataType", "isBufferLengthCompatible", "numel", "parent", "defaults", "inherit", "format", "iget", "iset", "get", "set", "copy", "validate", "MAX_DIMS", "INDEX_MODE", "READONLY", "ndarray", "dtype", "buffer", "shape", "strides", "offset", "order", "options", "ndims", "opts", "err", "sh", "st", "require_lib", "__commonJSMin", "exports", "module", "main", "require_modes", "__commonJSMin", "exports", "module", "require_main", "__commonJSMin", "exports", "module", "MODES", "modes", "require_enum", "__commonJSMin", "exports", "module", "enumerated", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "modes", "enumeration", "require_main", "__commonJSMin", "exports", "module", "modes", "MODES", "len", "isCastingMode", "v", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "objectInverse", "enumeration", "hash", "enum2str", "dtype", "v", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "enumeration", "ENUM", "str2enum", "dtype", "v", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "enum2str", "str2enum", "resolve", "dtype", "t", "require_lib", "__commonJSMin", "exports", "module", "main", "require_safe_casts", "__commonJSMin", "exports", "module", "require_main", "__commonJSMin", "exports", "module", "objectKeys", "hasOwnProp", "resolve", "SAFE_CASTS", "TABLE", "generateFullTable", "dtypes", "ntypes", "out", "tmp", "dt1", "dt2", "o", "j", "i", "generateTable", "safeCasts", "dtype", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "safeCasts", "TABLE", "isSafeCast", "from", "to", "require_lib", "__commonJSMin", "exports", "module", "main", "require_same_kind_casts", "__commonJSMin", "exports", "module", "require_main", "__commonJSMin", "exports", "module", "objectKeys", "hasOwnProp", "resolve", "SAME_KIND_CASTS", "TABLE", "generateFullTable", "dtypes", "ntypes", "out", "tmp", "dt1", "dt2", "o", "j", "i", "generateTable", "sameKindCasts", "dtype", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "sameKindCasts", "TABLE", "isSameKindCast", "from", "to", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isSafeCast", "isSameKindCast", "isAllowedCast", "from", "to", "casting", "require_lib", "__commonJSMin", "exports", "module", "main", "require_ctors", "__commonJSMin", "exports", "module", "Buffer", "Float64Array", "Float32Array", "Int16Array", "Int32Array", "Int8Array", "Uint16Array", "Uint32Array", "Uint8Array", "Uint8ClampedArray", "Complex64Array", "Complex128Array", "ctors", "require_main", "__commonJSMin", "exports", "module", "table", "ctors", "dtype", "require_lib", "__commonJSMin", "exports", "module", "main", "require_zeros", "__commonJSMin", "exports", "module", "zeros", "v", "i", "require_main", "__commonJSMin", "exports", "module", "bufferCtors", "allocUnsafe", "zeros", "generic", "size", "buf", "i", "binary", "typedarray", "dtype", "ctor", "buffer", "require_lib", "__commonJSMin", "exports", "module", "main", "require_ctor2dtype", "__commonJSMin", "exports", "module", "dtypes", "require_ctors", "__commonJSMin", "exports", "module", "Float64Array", "Float32Array", "Uint32Array", "Int32Array", "Uint16Array", "Int16Array", "Uint8Array", "Uint8ClampedArray", "Int8Array", "Complex64Array", "Complex128Array", "CTORS", "require_dtypes", "__commonJSMin", "exports", "module", "DTYPES", "require_main", "__commonJSMin", "exports", "module", "isBuffer", "isArray", "constructorName", "ctor2dtype", "CTORS", "DTYPES", "NTYPES", "dtype", "value", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isDataType", "format", "dtype", "x", "dt", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isNonNegativeInteger", "isCollection", "format", "shape", "x", "out", "sh", "d", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isInteger", "isCollection", "isOrder", "shape2strides", "format", "strides", "x", "out", "ord", "sh", "st", "d", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isNonNegativeInteger", "isCollection", "strides2offset", "format", "offset", "x", "st", "sh", "n", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isNonNegativeInteger", "isCollection", "format", "ndims", "x", "sh", "n", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isOrder", "strides", "ndims", "strides2order", "format", "ROW_MAJOR", "COLUMN_MAJOR", "order", "x", "st", "o", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isCollection", "format", "data", "x", "out", "require_lib", "__commonJSMin", "exports", "module", "main", "require_is_array_like_object", "__commonJSMin", "exports", "module", "PINF", "isInteger", "isArrayLikeObject", "value", "require_defaults", "__commonJSMin", "exports", "module", "settings", "defaults", "require_cast_buffer", "__commonJSMin", "exports", "module", "bufferCtors", "allocUnsafe", "castBuffer", "buffer", "len", "dtype", "ctor", "out", "i", "require_copy_view", "__commonJSMin", "exports", "module", "bufferCtors", "allocUnsafe", "generic", "arr", "len", "out", "binary", "typed", "dtype", "ctor", "i", "copyView", "require_expand_shape", "__commonJSMin", "exports", "module", "expandShape", "ndims", "shape", "ndmin", "out", "i", "require_expand_strides", "__commonJSMin", "exports", "module", "abs", "expandStrides", "ndims", "shape", "strides", "order", "out", "N", "s", "i", "j", "require_main", "__commonJSMin", "exports", "module", "hasOwnProp", "isObject", "isBoolean", "isArray", "isNonNegativeInteger", "isndarrayLike", "shape2strides", "strides2offset", "strides2order", "numel", "ndarray", "isDataType", "isOrder", "isCastingMode", "isAllowedCast", "createBuffer", "getBufferDType", "getDType", "getShape", "getStrides", "getOffset", "getOrder", "getData", "arrayShape", "flatten", "format", "isArrayLikeObject", "getDefaults", "castBuffer", "copyView", "expandShape", "expandStrides", "defaults", "array", "options", "strides", "buffer", "offset", "order", "dtype", "btype", "shape", "ndims", "nopts", "opts", "osh", "len", "ord", "FLG", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "numel", "isBufferLengthCompatibleShape", "len", "shape", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "abs", "isColumnMajor", "strides", "ndims", "s1", "s2", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "numel", "minmax", "isSingleSegmentCompatible", "shape", "strides", "offset", "len", "buf", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isSingleSegmentCompatible", "iterationOrder", "isColumnMajor", "isColumnMajorContiguous", "shape", "strides", "offset", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "contains", "dtypes", "isComplexFloatingPointDataType", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isSingleSegmentCompatible", "iterationOrder", "isContiguous", "shape", "strides", "offset", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "contains", "dtypes", "isFloatingPointDataType", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "contains", "dtypes", "isIntegerDataType", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "contains", "dtypes", "isNumericDataType", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isReadOnly", "arr", "flags", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "contains", "dtypes", "isRealDataType", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "contains", "dtypes", "isRealFloatingPointDataType", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "abs", "isRowMajor", "strides", "ndims", "s1", "s2", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isSingleSegmentCompatible", "iterationOrder", "isRowMajor", "isRowMajorContiguous", "shape", "strides", "offset", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "contains", "dtypes", "isSignedIntegerDataType", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "contains", "dtypes", "isUnsignedIntegerDataType", "require_lib", "__commonJSMin", "exports", "module", "main", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "ns", "require_sort2ins", "__commonJSMin", "exports", "module", "sort2ins", "x", "y", "avx", "aux", "ix", "iy", "jx", "jy", "vx", "vy", "ux", "i", "require_main", "__commonJSMin", "exports", "module", "zeroTo", "copy", "take", "filled", "strides2order", "sort2ins", "N", "loopOrder", "sh", "sx", "sy", "sz", "idx", "tmp", "max", "len", "arr", "ox", "oy", "oz", "i", "j", "require_lib", "__commonJSMin", "exports", "module", "main", "require_defaults", "__commonJSMin", "exports", "module", "defaults", "require_main", "__commonJSMin", "exports", "module", "bytesPerElement", "defaults", "binaryBlockSize", "dtypeX", "dtypeY", "dtypeZ", "nbx", "nby", "nbz", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "format", "trunc", "abs", "bind2vind", "shape", "strides", "offset", "order", "idx", "mode", "ndims", "len", "ind", "k", "s", "i", "require_lib", "__commonJSMin", "exports", "module", "bind2vind", "require_main", "__commonJSMin", "exports", "module", "copyIndexed", "shape", "x", "copy", "sh", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "shape2strides", "copyIndexed", "ROW_MAJOR", "strides", "x", "copy", "ord", "sh", "st", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "strides2offset", "offset", "x", "st", "sh", "o", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "strides2order", "ROW_MAJOR", "COLUMN_MAJOR", "order", "x", "st", "o", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "dtype", "x", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "data", "x", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "copy", "ndarray", "getShape", "getStrides", "getOffset", "getOrder", "getDType", "getData", "format", "broadcastArray", "arr", "shape", "strides", "dim", "sh", "st", "N", "M", "d", "i", "j", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isAccessorArray", "accessorSetter", "setter", "zeros", "buffer", "ndarray", "format", "broadcastScalar", "value", "dtype", "shape", "order", "buf", "set", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "broadcastShapes", "shapes", "ndims", "out", "dim", "sh", "n1", "n2", "d", "M", "N", "i", "j", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "str2enum", "dtype", "dtypeEnum", "arr", "dt", "require_lib", "__commonJSMin", "exports", "module", "main", "require_table", "__commonJSMin", "exports", "module", "table", "require_main", "__commonJSMin", "exports", "module", "resolve", "table", "TABLE", "dtypeChar", "dtype", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "objectInverse", "dtypeChar", "TABLE", "char2dtype", "ch", "require_lib", "__commonJSMin", "exports", "module", "char2dtype", "require_table", "__commonJSMin", "exports", "module", "table", "require_main", "__commonJSMin", "exports", "module", "resolve", "table", "TABLE", "dtypeDesc", "dtype", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "enum2str", "str2enum", "resolve", "dtype", "t", "require_lib", "__commonJSMin", "exports", "module", "main", "require_table", "__commonJSMin", "exports", "module", "require_main", "__commonJSMin", "exports", "module", "resolve", "TABLE", "dtype2c", "dtype", "require_lib", "__commonJSMin", "exports", "module", "dtype2c", "require_main", "__commonJSMin", "exports", "module", "isArrayLikeObject", "isNonNegativeInteger", "resolve", "format", "dtypes2signatures", "dtypes", "nin", "nout", "len", "out", "tmp", "dt", "N", "M", "i", "m", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "shape2strides", "strides2offset", "ndarray", "numel", "emptyArray", "allocUnsafe", "empty", "dtype", "shape", "order", "ndims", "buf", "len", "st", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "shape2strides", "strides2offset", "numel", "getDType", "getShape", "getOrder", "emptyArray", "allocUnsafe", "emptyLike", "x", "ndims", "len", "buf", "ord", "sh", "st", "dt", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isReadOnly", "getDType", "getShape", "getStrides", "getOffset", "getOrder", "getData", "format", "expandDimensions", "x", "axis", "strides", "shape", "ord", "sh", "st", "N", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isAccessorArray", "accessorSetter", "setter", "buffer", "ndarray", "format", "scalar2ndarray", "value", "dtype", "order", "buf", "set", "require_lib", "__commonJSMin", "exports", "module", "main", "require_assign", "__commonJSMin", "exports", "module", "format", "trunc", "ind2sub", "shape", "strides", "offset", "order", "idx", "mode", "out", "ndims", "len", "k", "s", "i", "require_main", "__commonJSMin", "exports", "module", "getSubscripts", "ind2sub", "shape", "strides", "offset", "order", "idx", "mode", "out", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "assign", "require_main", "__commonJSMin", "exports", "module", "maxViewBufferIndex", "shape", "strides", "offset", "ndims", "idx", "i", "require_lib", "__commonJSMin", "exports", "module", "maxViewBufferIndex", "require_main", "__commonJSMin", "exports", "module", "broadcast", "getShape", "maybeBroadcastArray", "arr", "shape", "sh", "N", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "setReadOnlyAccessor", "dtypes2signatures", "setProps", "meta", "dtypes", "obj", "types", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "minViewBufferIndex", "shape", "strides", "offset", "ndims", "idx", "i", "require_lib", "__commonJSMin", "exports", "module", "minViewBufferIndex", "require_main", "__commonJSMin", "exports", "module", "isAccessorArray", "accessorGetter", "accessorSetter", "getter", "setter", "numel", "getDType", "getShape", "getStrides", "getOffset", "getOrder", "getData", "ndarraylike2object", "x", "xbuf", "bool", "sh", "dt", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "ndims", "x", "n", "require_lib", "__commonJSMin", "exports", "module", "main", "require_assign", "__commonJSMin", "exports", "module", "ROW_MAJOR", "rowmajor", "ndims", "shape", "idx", "dim", "out", "i", "j", "columnmajor", "nextCartesianIndex", "order", "require_main", "__commonJSMin", "exports", "module", "zeros", "assign", "nextCartesianIndex", "shape", "order", "idx", "dim", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "assign", "require_main", "__commonJSMin", "exports", "module", "nonsingletonDimensions", "shape", "cnt", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_sort2ins", "__commonJSMin", "exports", "module", "sort2ins", "x", "y", "avx", "aux", "ix", "iy", "jx", "jy", "vx", "vy", "ux", "i", "require_main", "__commonJSMin", "exports", "module", "zeroTo", "copy", "take", "sort2ins", "loopOrder", "sh", "sx", "idx", "require_lib", "__commonJSMin", "exports", "module", "main", "require_defaults", "__commonJSMin", "exports", "module", "defaults", "require_main", "__commonJSMin", "exports", "module", "bytesPerElement", "defaults", "nullaryBlockSize", "dtypeX", "nbx", "require_lib", "__commonJSMin", "exports", "module", "main", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary2d", "x", "fcn", "bsize", "xbuf", "set", "dx0", "dx1", "ox1", "sh", "s0", "s1", "sx", "ox", "ix", "i0", "i1", "j0", "j1", "o", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary3d", "x", "fcn", "bsize", "xbuf", "set", "dx0", "dx1", "dx2", "ox1", "ox2", "sh", "s0", "s1", "s2", "sx", "ox", "ix", "i0", "i1", "i2", "j0", "j1", "j2", "o", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary4d", "x", "fcn", "bsize", "xbuf", "set", "dx0", "dx1", "dx2", "dx3", "ox1", "ox2", "ox3", "sh", "s0", "s1", "s2", "s3", "sx", "ox", "ix", "i0", "i1", "i2", "i3", "j0", "j1", "j2", "j3", "o", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary5d", "x", "fcn", "bsize", "xbuf", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "ox1", "ox2", "ox3", "ox4", "sh", "s0", "s1", "s2", "s3", "s4", "sx", "ox", "ix", "i0", "i1", "i2", "i3", "i4", "j0", "j1", "j2", "j3", "j4", "o", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary6d", "x", "fcn", "bsize", "xbuf", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "ox1", "ox2", "ox3", "ox4", "ox5", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "sx", "ox", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "j0", "j1", "j2", "j3", "j4", "j5", "o", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary7d", "x", "fcn", "bsize", "xbuf", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "sx", "ox", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "o", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary8d", "x", "fcn", "bsize", "xbuf", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "sx", "ox", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "o", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary9d", "x", "fcn", "bsize", "xbuf", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "ox8", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "sx", "ox", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "j8", "o", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary10d", "x", "fcn", "bsize", "xbuf", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dx9", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "ox8", "ox9", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "sx", "ox", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "i9", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "j8", "j9", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary2d", "x", "fcn", "bsize", "xbuf", "dx0", "dx1", "ox1", "sh", "s0", "s1", "sx", "ox", "ix", "i0", "i1", "j0", "j1", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary3d", "x", "fcn", "bsize", "xbuf", "dx0", "dx1", "dx2", "ox1", "ox2", "sh", "s0", "s1", "s2", "sx", "ox", "ix", "i0", "i1", "i2", "j0", "j1", "j2", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary4d", "x", "fcn", "bsize", "xbuf", "dx0", "dx1", "dx2", "dx3", "ox1", "ox2", "ox3", "sh", "s0", "s1", "s2", "s3", "sx", "ox", "ix", "i0", "i1", "i2", "i3", "j0", "j1", "j2", "j3", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary5d", "x", "fcn", "bsize", "xbuf", "dx0", "dx1", "dx2", "dx3", "dx4", "ox1", "ox2", "ox3", "ox4", "sh", "s0", "s1", "s2", "s3", "s4", "sx", "ox", "ix", "i0", "i1", "i2", "i3", "i4", "j0", "j1", "j2", "j3", "j4", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary6d", "x", "fcn", "bsize", "xbuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "ox1", "ox2", "ox3", "ox4", "ox5", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "sx", "ox", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "j0", "j1", "j2", "j3", "j4", "j5", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary7d", "x", "fcn", "bsize", "xbuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "sx", "ox", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary8d", "x", "fcn", "bsize", "xbuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "sx", "ox", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary9d", "x", "fcn", "bsize", "xbuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "ox8", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "sx", "ox", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "j8", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockednullary10d", "x", "fcn", "bsize", "xbuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dx9", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "ox8", "ox9", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "sx", "ox", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "i9", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "j8", "j9", "o", "require_d_accessors", "__commonJSMin", "exports", "module", "nullary0d", "x", "fcn", "require_d_accessors", "__commonJSMin", "exports", "module", "nullary1d", "x", "fcn", "xbuf", "set", "dx0", "S0", "ix", "i0", "require_d_accessors", "__commonJSMin", "exports", "module", "nullary2d", "x", "fcn", "xbuf", "set", "dx0", "dx1", "sh", "S0", "S1", "sx", "ix", "i0", "i1", "require_d_accessors", "__commonJSMin", "exports", "module", "nullary3d", "x", "fcn", "xbuf", "set", "dx0", "dx1", "dx2", "sh", "S0", "S1", "S2", "sx", "ix", "i0", "i1", "i2", "require_d_accessors", "__commonJSMin", "exports", "module", "nullary4d", "x", "fcn", "xbuf", "set", "dx0", "dx1", "dx2", "dx3", "sh", "S0", "S1", "S2", "S3", "sx", "ix", "i0", "i1", "i2", "i3", "require_d_accessors", "__commonJSMin", "exports", "module", "nullary5d", "x", "fcn", "xbuf", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "sh", "S0", "S1", "S2", "S3", "S4", "sx", "ix", "i0", "i1", "i2", "i3", "i4", "require_d_accessors", "__commonJSMin", "exports", "module", "nullary6d", "x", "fcn", "xbuf", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "sx", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "require_d_accessors", "__commonJSMin", "exports", "module", "nullary7d", "x", "fcn", "xbuf", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "sx", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "require_d_accessors", "__commonJSMin", "exports", "module", "nullary8d", "x", "fcn", "xbuf", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "sx", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "require_d_accessors", "__commonJSMin", "exports", "module", "nullary9d", "x", "fcn", "xbuf", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "sx", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "require_d_accessors", "__commonJSMin", "exports", "module", "nullary10d", "x", "fcn", "xbuf", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dx9", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "S9", "sx", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "i9", "require_main", "__commonJSMin", "exports", "module", "format", "vind2bind", "shape", "strides", "offset", "order", "idx", "mode", "ndims", "len", "ind", "s", "i", "require_lib", "__commonJSMin", "exports", "module", "vind2bind", "require_nd_accessors", "__commonJSMin", "exports", "module", "numel", "vind2bind", "MODE", "nullarynd", "x", "fcn", "xbuf", "ordx", "len", "set", "sh", "sx", "ox", "ix", "i", "require_d", "__commonJSMin", "exports", "module", "nullary0d", "x", "fcn", "require_d", "__commonJSMin", "exports", "module", "nullary1d", "x", "fcn", "xbuf", "dx0", "S0", "ix", "i0", "require_d", "__commonJSMin", "exports", "module", "nullary2d", "x", "fcn", "xbuf", "dx0", "dx1", "sh", "S0", "S1", "sx", "ix", "i0", "i1", "require_d", "__commonJSMin", "exports", "module", "nullary3d", "x", "fcn", "xbuf", "dx0", "dx1", "dx2", "sh", "S0", "S1", "S2", "sx", "ix", "i0", "i1", "i2", "require_d", "__commonJSMin", "exports", "module", "nullary4d", "x", "fcn", "xbuf", "dx0", "dx1", "dx2", "dx3", "sh", "S0", "S1", "S2", "S3", "sx", "ix", "i0", "i1", "i2", "i3", "require_d", "__commonJSMin", "exports", "module", "nullary5d", "x", "fcn", "xbuf", "dx0", "dx1", "dx2", "dx3", "dx4", "sh", "S0", "S1", "S2", "S3", "S4", "sx", "ix", "i0", "i1", "i2", "i3", "i4", "require_d", "__commonJSMin", "exports", "module", "nullary6d", "x", "fcn", "xbuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "sx", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "require_d", "__commonJSMin", "exports", "module", "nullary7d", "x", "fcn", "xbuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "sx", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "require_d", "__commonJSMin", "exports", "module", "nullary8d", "x", "fcn", "xbuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "sx", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "require_d", "__commonJSMin", "exports", "module", "nullary9d", "x", "fcn", "xbuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "sx", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "require_d", "__commonJSMin", "exports", "module", "nullary10d", "x", "fcn", "xbuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dx9", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "S9", "sx", "ix", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "i9", "require_nd", "__commonJSMin", "exports", "module", "numel", "vind2bind", "MODE", "nullarynd", "x", "fcn", "xbuf", "ordx", "len", "sh", "sx", "ox", "ix", "i", "require_main", "__commonJSMin", "exports", "module", "iterationOrder", "minmaxViewBufferIndex", "ndarray2object", "blockedaccessornullary2d", "blockedaccessornullary3d", "blockedaccessornullary4d", "blockedaccessornullary5d", "blockedaccessornullary6d", "blockedaccessornullary7d", "blockedaccessornullary8d", "blockedaccessornullary9d", "blockedaccessornullary10d", "blockednullary2d", "blockednullary3d", "blockednullary4d", "blockednullary5d", "blockednullary6d", "blockednullary7d", "blockednullary8d", "blockednullary9d", "blockednullary10d", "accessornullary0d", "accessornullary1d", "accessornullary2d", "accessornullary3d", "accessornullary4d", "accessornullary5d", "accessornullary6d", "accessornullary7d", "accessornullary8d", "accessornullary9d", "accessornullary10d", "accessornullarynd", "nullary0d", "nullary1d", "nullary2d", "nullary3d", "nullary4d", "nullary5d", "nullary6d", "nullary7d", "nullary8d", "nullary9d", "nullary10d", "nullarynd", "NULLARY", "ACCESSOR_NULLARY", "BLOCKED_NULLARY", "BLOCKED_ACCESSOR_NULLARY", "MAX_DIMS", "nullary", "arrays", "fcn", "ndims", "xmmv", "shx", "iox", "len", "sx", "ox", "ns", "x", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_policies", "__commonJSMin", "exports", "module", "require_main", "__commonJSMin", "exports", "module", "POLICIES", "policies", "require_enum", "__commonJSMin", "exports", "module", "enumeration", "require_assign", "__commonJSMin", "exports", "module", "setReadOnly", "objectKeys", "assign", "target", "source", "keys", "k", "i", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "enumeration", "assign", "require_main", "__commonJSMin", "exports", "module", "objectInverse", "enumeration", "hash", "enum2str", "policy", "v", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "enumeration", "ENUM", "str2enum", "policy", "v", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "enum2str", "str2enum", "resolve", "policy", "t", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "enum2str", "str2enum", "resolve", "policy", "t", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isReadOnly", "getDType", "getShape", "getStrides", "getOffset", "getOrder", "getData", "prependSingletonDimensions", "x", "n", "strides", "shape", "sh", "st", "N", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isReadOnly", "getDType", "getShape", "getStrides", "getOffset", "getOrder", "getData", "removeSingletonDimensions", "x", "strides", "shape", "sh", "st", "N", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "IS_LITTLE_ENDIAN", "ArrayBuffer", "DataView", "BigInt", "bytesPerElement", "dtypes", "orders", "modes", "getDType", "getShape", "getStrides", "getOffset", "getOrder", "DTYPES", "ORDERS", "MODES", "serialize", "x", "nbytes", "flgs", "len", "dt", "sh", "st", "sm", "v", "m", "o", "s", "N", "M", "i", "require_polyfill", "__commonJSMin", "exports", "module", "IS_LITTLE_ENDIAN", "float64ToInt64Bytes", "ArrayBuffer", "Uint8Array", "DataView", "bytesPerElement", "dtypes", "orders", "modes", "getDType", "getShape", "getStrides", "getOffset", "getOrder", "DTYPES", "ORDERS", "MODES", "serialize", "x", "nbytes", "bytes", "flgs", "len", "dt", "sh", "st", "sm", "v", "m", "o", "s", "N", "M", "i", "require_lib", "__commonJSMin", "exports", "module", "hasBigIntSupport", "builtin", "polyfill", "main", "require_main", "__commonJSMin", "exports", "module", "singletonDimensions", "shape", "cnt", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_slice_start", "__commonJSMin", "exports", "module", "sliceStart", "slice", "strides", "offset", "data", "idx", "i", "require_slice_strides", "__commonJSMin", "exports", "module", "slice2strides", "slice", "strides", "rdims", "data", "out", "i", "j", "require_empty", "__commonJSMin", "exports", "module", "buffer", "zeros", "empty", "ctor", "dtype", "shape", "order", "readonly", "strides", "ndims", "require_main", "__commonJSMin", "exports", "module", "normalizeMultiSlice", "nonreducedDimensions", "sliceShape", "take", "zeros", "numel", "getDType", "getShape", "getStrides", "getOffset", "getOrder", "getData", "format", "sliceStart", "slice2strides", "empty", "slice", "x", "s", "strict", "writable", "strides", "offset", "dtype", "shape", "order", "sdims", "ndims", "ctor", "sh", "ns", "require_lib", "__commonJSMin", "exports", "module", "main", "require_sort2ins", "__commonJSMin", "exports", "module", "sort2ins", "x", "y", "avx", "aux", "ix", "iy", "jx", "jy", "vx", "vy", "ux", "i", "require_main", "__commonJSMin", "exports", "module", "zeroTo", "copy", "take", "sort2ins", "loopOrder", "sh", "sx", "sy", "idx", "require_lib", "__commonJSMin", "exports", "module", "main", "require_defaults", "__commonJSMin", "exports", "module", "defaults", "require_main", "__commonJSMin", "exports", "module", "bytesPerElement", "defaults", "unaryBlockSize", "dtypeX", "dtypeY", "nbx", "nby", "require_lib", "__commonJSMin", "exports", "module", "main", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary2d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dy0", "dy1", "ox1", "oy1", "sh", "s0", "s1", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "j0", "j1", "o", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary3d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dy0", "dy1", "dy2", "ox1", "ox2", "oy1", "oy2", "sh", "s0", "s1", "s2", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "j0", "j1", "j2", "o", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary4d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dy0", "dy1", "dy2", "dy3", "ox1", "ox2", "ox3", "oy1", "oy2", "oy3", "sh", "s0", "s1", "s2", "s3", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "j0", "j1", "j2", "j3", "o", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary5d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dy0", "dy1", "dy2", "dy3", "dy4", "ox1", "ox2", "ox3", "ox4", "oy1", "oy2", "oy3", "oy4", "sh", "s0", "s1", "s2", "s3", "s4", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "j0", "j1", "j2", "j3", "j4", "o", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary6d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "ox1", "ox2", "ox3", "ox4", "ox5", "oy1", "oy2", "oy3", "oy4", "oy5", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "j0", "j1", "j2", "j3", "j4", "j5", "o", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary7d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "oy1", "oy2", "oy3", "oy4", "oy5", "oy6", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "o", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary8d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "oy1", "oy2", "oy3", "oy4", "oy5", "oy6", "oy7", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "o", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary9d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "dy8", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "ox8", "oy1", "oy2", "oy3", "oy4", "oy5", "oy6", "oy7", "oy8", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "j8", "o", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary10d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dx9", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "dy8", "dy9", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "ox8", "ox9", "oy1", "oy2", "oy3", "oy4", "oy5", "oy6", "oy7", "oy8", "oy9", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "i9", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "j8", "j9", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary2d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dy0", "dy1", "ox1", "oy1", "sh", "s0", "s1", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "j0", "j1", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary3d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dy0", "dy1", "dy2", "ox1", "ox2", "oy1", "oy2", "sh", "s0", "s1", "s2", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "j0", "j1", "j2", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary4d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dy0", "dy1", "dy2", "dy3", "ox1", "ox2", "ox3", "oy1", "oy2", "oy3", "sh", "s0", "s1", "s2", "s3", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "j0", "j1", "j2", "j3", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary5d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dy0", "dy1", "dy2", "dy3", "dy4", "ox1", "ox2", "ox3", "ox4", "oy1", "oy2", "oy3", "oy4", "sh", "s0", "s1", "s2", "s3", "s4", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "j0", "j1", "j2", "j3", "j4", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary6d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "ox1", "ox2", "ox3", "ox4", "ox5", "oy1", "oy2", "oy3", "oy4", "oy5", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "j0", "j1", "j2", "j3", "j4", "j5", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary7d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "oy1", "oy2", "oy3", "oy4", "oy5", "oy6", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary8d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "oy1", "oy2", "oy3", "oy4", "oy5", "oy6", "oy7", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary9d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "dy8", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "ox8", "oy1", "oy2", "oy3", "oy4", "oy5", "oy6", "oy7", "oy8", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "j8", "o", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary10d", "x", "y", "fcn", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dx9", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "dy8", "dy9", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "ox8", "ox9", "oy1", "oy2", "oy3", "oy4", "oy5", "oy6", "oy7", "oy8", "oy9", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "i9", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "j8", "j9", "o", "require_d_accessors", "__commonJSMin", "exports", "module", "unary0d", "x", "y", "fcn", "require_d_accessors", "__commonJSMin", "exports", "module", "unary1d", "x", "y", "fcn", "xbuf", "ybuf", "get", "set", "dx0", "dy0", "S0", "ix", "iy", "i0", "require_d_accessors", "__commonJSMin", "exports", "module", "unary2d", "x", "y", "fcn", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dy0", "dy1", "sh", "S0", "S1", "sx", "sy", "ix", "iy", "i0", "i1", "require_d_accessors", "__commonJSMin", "exports", "module", "unary3d", "x", "y", "fcn", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dy0", "dy1", "dy2", "sh", "S0", "S1", "S2", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "require_d_accessors", "__commonJSMin", "exports", "module", "unary4d", "x", "y", "fcn", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dy0", "dy1", "dy2", "dy3", "sh", "S0", "S1", "S2", "S3", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "require_d_accessors", "__commonJSMin", "exports", "module", "unary5d", "x", "y", "fcn", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dy0", "dy1", "dy2", "dy3", "dy4", "sh", "S0", "S1", "S2", "S3", "S4", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "require_d_accessors", "__commonJSMin", "exports", "module", "unary6d", "x", "y", "fcn", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "require_d_accessors", "__commonJSMin", "exports", "module", "unary7d", "x", "y", "fcn", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "require_d_accessors", "__commonJSMin", "exports", "module", "unary8d", "x", "y", "fcn", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "require_d_accessors", "__commonJSMin", "exports", "module", "unary9d", "x", "y", "fcn", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "dy8", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "require_d_accessors", "__commonJSMin", "exports", "module", "unary10d", "x", "y", "fcn", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dx9", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "dy8", "dy9", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "S9", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "i9", "require_nd_accessors", "__commonJSMin", "exports", "module", "numel", "vind2bind", "MODE", "unarynd", "x", "y", "fcn", "xbuf", "ybuf", "ordx", "ordy", "len", "get", "set", "sh", "sx", "sy", "ox", "oy", "ix", "iy", "i", "require_d", "__commonJSMin", "exports", "module", "unary0d", "x", "y", "fcn", "require_d", "__commonJSMin", "exports", "module", "unary1d", "x", "y", "fcn", "xbuf", "ybuf", "dx0", "dy0", "S0", "ix", "iy", "i0", "require_d", "__commonJSMin", "exports", "module", "unary2d", "x", "y", "fcn", "xbuf", "ybuf", "dx0", "dx1", "dy0", "dy1", "sh", "S0", "S1", "sx", "sy", "ix", "iy", "i0", "i1", "require_d", "__commonJSMin", "exports", "module", "unary3d", "x", "y", "fcn", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dy0", "dy1", "dy2", "sh", "S0", "S1", "S2", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "require_d", "__commonJSMin", "exports", "module", "unary4d", "x", "y", "fcn", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dy0", "dy1", "dy2", "dy3", "sh", "S0", "S1", "S2", "S3", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "require_d", "__commonJSMin", "exports", "module", "unary5d", "x", "y", "fcn", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dy0", "dy1", "dy2", "dy3", "dy4", "sh", "S0", "S1", "S2", "S3", "S4", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "require_d", "__commonJSMin", "exports", "module", "unary6d", "x", "y", "fcn", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "require_d", "__commonJSMin", "exports", "module", "unary7d", "x", "y", "fcn", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "require_d", "__commonJSMin", "exports", "module", "unary8d", "x", "y", "fcn", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "require_d", "__commonJSMin", "exports", "module", "unary9d", "x", "y", "fcn", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "dy8", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "require_d", "__commonJSMin", "exports", "module", "unary10d", "x", "y", "fcn", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dx9", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "dy8", "dy9", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "S9", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "i9", "require_nd", "__commonJSMin", "exports", "module", "numel", "vind2bind", "MODE", "unarynd", "x", "y", "fcn", "xbuf", "ybuf", "ordx", "ordy", "len", "sh", "sx", "sy", "ox", "oy", "ix", "iy", "i", "require_main", "__commonJSMin", "exports", "module", "iterationOrder", "minmaxViewBufferIndex", "ndarray2object", "blockedaccessorunary2d", "blockedaccessorunary3d", "blockedaccessorunary4d", "blockedaccessorunary5d", "blockedaccessorunary6d", "blockedaccessorunary7d", "blockedaccessorunary8d", "blockedaccessorunary9d", "blockedaccessorunary10d", "blockedunary2d", "blockedunary3d", "blockedunary4d", "blockedunary5d", "blockedunary6d", "blockedunary7d", "blockedunary8d", "blockedunary9d", "blockedunary10d", "accessorunary0d", "accessorunary1d", "accessorunary2d", "accessorunary3d", "accessorunary4d", "accessorunary5d", "accessorunary6d", "accessorunary7d", "accessorunary8d", "accessorunary9d", "accessorunary10d", "accessorunarynd", "unary0d", "unary1d", "unary2d", "unary3d", "unary4d", "unary5d", "unary6d", "unary7d", "unary8d", "unary9d", "unary10d", "unarynd", "UNARY", "ACCESSOR_UNARY", "BLOCKED_UNARY", "BLOCKED_ACCESSOR_UNARY", "MAX_DIMS", "unary", "arrays", "fcn", "ndims", "xmmv", "ymmv", "shx", "shy", "iox", "ioy", "len", "sx", "sy", "ox", "oy", "ns", "x", "y", "d", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isSafeCast", "isSameKindCast", "isFloatingPointDataType", "isComplexDataType", "isRealDataType", "broadcast", "unary", "identity", "castReturn", "complexCtors", "slice", "getDType", "getShape", "format", "sliceAssign", "x", "y", "s", "strict", "view", "fcn", "xdt", "ydt", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "MultiSlice", "ndims", "slice", "filled", "format", "sliceDimension", "x", "dim", "s", "strict", "writable", "args", "N", "d", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "format", "sub2ind", "strides", "offset", "nmodes", "shape", "ndims", "modes", "mode", "idx", "m", "s", "j", "i", "require_lib", "__commonJSMin", "exports", "module", "sub2ind", "require_recurse", "__commonJSMin", "exports", "module", "recurse", "obj", "shape", "strides", "offset", "order", "dim", "stride", "item", "out", "n", "i", "require_main", "__commonJSMin", "exports", "module", "arraylike2object", "recurse", "ndarray2array", "buffer", "shape", "strides", "offset", "order", "i", "require_lib", "__commonJSMin", "exports", "module", "ndarray2array", "require_main", "__commonJSMin", "exports", "module", "strides2offset", "getDType", "getShape", "getStrides", "getOrder", "getData", "transpose", "x", "tmp", "sh", "st", "N", "require_lib", "__commonJSMin", "exports", "module", "main", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary2d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dy0", "dy1", "ox1", "oy1", "sh", "s0", "s1", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "j0", "j1", "o", "v", "i", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary3d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dy0", "dy1", "dy2", "ox1", "ox2", "oy1", "oy2", "sh", "s0", "s1", "s2", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "j0", "j1", "j2", "o", "v", "i", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary4d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dy0", "dy1", "dy2", "dy3", "ox1", "ox2", "ox3", "oy1", "oy2", "oy3", "sh", "s0", "s1", "s2", "s3", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "j0", "j1", "j2", "j3", "o", "v", "i", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary5d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dy0", "dy1", "dy2", "dy3", "dy4", "ox1", "ox2", "ox3", "ox4", "oy1", "oy2", "oy3", "oy4", "sh", "s0", "s1", "s2", "s3", "s4", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "j0", "j1", "j2", "j3", "j4", "o", "v", "i", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary6d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "ox1", "ox2", "ox3", "ox4", "ox5", "oy1", "oy2", "oy3", "oy4", "oy5", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "j0", "j1", "j2", "j3", "j4", "j5", "o", "v", "i", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary7d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "oy1", "oy2", "oy3", "oy4", "oy5", "oy6", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "o", "v", "i", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary8d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "oy1", "oy2", "oy3", "oy4", "oy5", "oy6", "oy7", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "o", "v", "i", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary9d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "dy8", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "ox8", "oy1", "oy2", "oy3", "oy4", "oy5", "oy6", "oy7", "oy8", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "j8", "o", "v", "i", "require_d_blocked_accessors", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary10d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dx9", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "dy8", "dy9", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "ox8", "ox9", "oy1", "oy2", "oy3", "oy4", "oy5", "oy6", "oy7", "oy8", "oy9", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "i9", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "j8", "j9", "o", "v", "i", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary2d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dy0", "dy1", "ox1", "oy1", "sh", "s0", "s1", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "j0", "j1", "o", "v", "i", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary3d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dy0", "dy1", "dy2", "ox1", "ox2", "oy1", "oy2", "sh", "s0", "s1", "s2", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "j0", "j1", "j2", "o", "v", "i", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary4d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dy0", "dy1", "dy2", "dy3", "ox1", "ox2", "ox3", "oy1", "oy2", "oy3", "sh", "s0", "s1", "s2", "s3", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "j0", "j1", "j2", "j3", "o", "v", "i", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary5d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dy0", "dy1", "dy2", "dy3", "dy4", "ox1", "ox2", "ox3", "ox4", "oy1", "oy2", "oy3", "oy4", "sh", "s0", "s1", "s2", "s3", "s4", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "j0", "j1", "j2", "j3", "j4", "o", "v", "i", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary6d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "ox1", "ox2", "ox3", "ox4", "ox5", "oy1", "oy2", "oy3", "oy4", "oy5", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "j0", "j1", "j2", "j3", "j4", "j5", "o", "v", "i", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary7d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "oy1", "oy2", "oy3", "oy4", "oy5", "oy6", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "o", "v", "i", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary8d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "oy1", "oy2", "oy3", "oy4", "oy5", "oy6", "oy7", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "o", "v", "i", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary9d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "dy8", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "ox8", "oy1", "oy2", "oy3", "oy4", "oy5", "oy6", "oy7", "oy8", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "j8", "o", "v", "i", "require_d_blocked", "__commonJSMin", "exports", "module", "loopOrder", "blockSize", "blockedunary10d", "x", "y", "fcn", "clbk", "thisArg", "bsize", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dx9", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "dy8", "dy9", "ox1", "ox2", "ox3", "ox4", "ox5", "ox6", "ox7", "ox8", "ox9", "oy1", "oy2", "oy3", "oy4", "oy5", "oy6", "oy7", "oy8", "oy9", "sh", "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "sx", "sy", "ox", "oy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "i9", "j0", "j1", "j2", "j3", "j4", "j5", "j6", "j7", "j8", "j9", "o", "v", "i", "require_d_accessors", "__commonJSMin", "exports", "module", "unary0d", "x", "y", "fcn", "clbk", "thisArg", "ox", "oy", "v", "require_d_accessors", "__commonJSMin", "exports", "module", "unary1d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "get", "set", "dx0", "dy0", "S0", "ix", "iy", "i0", "v", "i", "require_d_accessors", "__commonJSMin", "exports", "module", "unary2d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dy0", "dy1", "sh", "S0", "S1", "sx", "sy", "ix", "iy", "i0", "i1", "v", "i", "require_d_accessors", "__commonJSMin", "exports", "module", "unary3d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dy0", "dy1", "dy2", "sh", "S0", "S1", "S2", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "v", "i", "require_d_accessors", "__commonJSMin", "exports", "module", "unary4d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dy0", "dy1", "dy2", "dy3", "sh", "S0", "S1", "S2", "S3", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "v", "i", "require_d_accessors", "__commonJSMin", "exports", "module", "unary5d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dy0", "dy1", "dy2", "dy3", "dy4", "sh", "S0", "S1", "S2", "S3", "S4", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "v", "i", "require_d_accessors", "__commonJSMin", "exports", "module", "unary6d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "v", "i", "require_d_accessors", "__commonJSMin", "exports", "module", "unary7d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "v", "i", "require_d_accessors", "__commonJSMin", "exports", "module", "unary8d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "v", "i", "require_d_accessors", "__commonJSMin", "exports", "module", "unary9d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "dy8", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "v", "i", "require_d_accessors", "__commonJSMin", "exports", "module", "unary10d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "get", "set", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dx9", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "dy8", "dy9", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "S9", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "i9", "v", "i", "require_nd_accessors", "__commonJSMin", "exports", "module", "numel", "vind2bind", "MODE", "unarynd", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "ordx", "ordy", "len", "get", "set", "sh", "sx", "sy", "ox", "oy", "ix", "iy", "v", "i", "require_d", "__commonJSMin", "exports", "module", "unary0d", "x", "y", "fcn", "clbk", "thisArg", "ox", "oy", "v", "require_d", "__commonJSMin", "exports", "module", "unary1d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "dx0", "dy0", "S0", "ix", "iy", "i0", "v", "i", "require_d", "__commonJSMin", "exports", "module", "unary2d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "dx0", "dx1", "dy0", "dy1", "sh", "S0", "S1", "sx", "sy", "ix", "iy", "i0", "i1", "v", "i", "require_d", "__commonJSMin", "exports", "module", "unary3d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dy0", "dy1", "dy2", "sh", "S0", "S1", "S2", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "v", "i", "require_d", "__commonJSMin", "exports", "module", "unary4d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dy0", "dy1", "dy2", "dy3", "sh", "S0", "S1", "S2", "S3", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "v", "i", "require_d", "__commonJSMin", "exports", "module", "unary5d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dy0", "dy1", "dy2", "dy3", "dy4", "sh", "S0", "S1", "S2", "S3", "S4", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "v", "i", "require_d", "__commonJSMin", "exports", "module", "unary6d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "v", "i", "require_d", "__commonJSMin", "exports", "module", "unary7d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "v", "i", "require_d", "__commonJSMin", "exports", "module", "unary8d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "v", "i", "require_d", "__commonJSMin", "exports", "module", "unary9d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "dy8", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "v", "i", "require_d", "__commonJSMin", "exports", "module", "unary10d", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "dx0", "dx1", "dx2", "dx3", "dx4", "dx5", "dx6", "dx7", "dx8", "dx9", "dy0", "dy1", "dy2", "dy3", "dy4", "dy5", "dy6", "dy7", "dy8", "dy9", "sh", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "S9", "sx", "sy", "ix", "iy", "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8", "i9", "v", "i", "require_nd", "__commonJSMin", "exports", "module", "numel", "vind2bind", "MODE", "unarynd", "x", "y", "fcn", "clbk", "thisArg", "xbuf", "ybuf", "ordx", "ordy", "len", "sh", "sx", "sy", "ox", "oy", "ix", "iy", "v", "i", "require_main", "__commonJSMin", "exports", "module", "iterationOrder", "minmaxViewBufferIndex", "ndarray2object", "blockedaccessorunary2d", "blockedaccessorunary3d", "blockedaccessorunary4d", "blockedaccessorunary5d", "blockedaccessorunary6d", "blockedaccessorunary7d", "blockedaccessorunary8d", "blockedaccessorunary9d", "blockedaccessorunary10d", "blockedunary2d", "blockedunary3d", "blockedunary4d", "blockedunary5d", "blockedunary6d", "blockedunary7d", "blockedunary8d", "blockedunary9d", "blockedunary10d", "accessorunary0d", "accessorunary1d", "accessorunary2d", "accessorunary3d", "accessorunary4d", "accessorunary5d", "accessorunary6d", "accessorunary7d", "accessorunary8d", "accessorunary9d", "accessorunary10d", "accessorunarynd", "unary0d", "unary1d", "unary2d", "unary3d", "unary4d", "unary5d", "unary6d", "unary7d", "unary8d", "unary9d", "unary10d", "unarynd", "UNARY", "ACCESSOR_UNARY", "BLOCKED_UNARY", "BLOCKED_ACCESSOR_UNARY", "MAX_DIMS", "unaryBy", "arrays", "fcn", "clbk", "thisArg", "ndims", "xmmv", "ymmv", "shx", "shy", "iox", "ioy", "len", "sx", "sy", "ox", "oy", "ns", "x", "y", "d", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isFloatingPointDataType", "isRealFloatingPointDataType", "isComplexFloatingPointDataType", "isIntegerDataType", "isSignedIntegerDataType", "isUnsignedIntegerDataType", "isRealDataType", "isNumericDataType", "isDataType", "defaults", "format", "POLICY_TABLE", "DEFAULT_DTYPE", "resolve", "dtype", "policy", "p", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "shape2strides", "strides2offset", "buffer", "format", "ndarray", "numel", "zeros", "dtype", "shape", "order", "ndims", "buf", "len", "st", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "shape2strides", "strides2offset", "buffer", "numel", "getDType", "getShape", "getOrder", "format", "zerosLike", "x", "ndims", "len", "buf", "ord", "sh", "st", "dt", "require_lib", "__commonJSMin", "exports", "module", "main", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "ns", "require_main", "__commonJSMin", "exports", "module", "isndarrayLike", "isCollection", "isNonNegativeInteger", "copy", "getDType", "getShape", "getStrides", "getOffset", "getOrder", "getData", "format", "broadcastArray", "x", "shape", "strides", "dim", "sh", "st", "N", "M", "d", "i", "j", "require_lib", "__commonJSMin", "exports", "module", "main", "require_index_of_types", "__commonJSMin", "exports", "module", "indexOfTypes", "N", "M", "x", "strideX1", "strideX2", "offsetX", "y", "strideY", "offsetY", "ix", "iy", "i", "j", "require_main", "__commonJSMin", "exports", "module", "isNonNegativeInteger", "isPositiveInteger", "isInteger", "isFunctionArray", "isFunction", "isCollection", "isndarrayLike", "format", "getDType", "resolveEnum", "indexOfTypes", "types2enums", "types", "out", "i", "dispatch", "fcns", "data", "nargs", "nin", "nout", "narrays", "nfcns", "fcn", "dispatcher", "arrays", "dtypes", "argc", "idx", "v", "f", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isPlainObject", "hasOwnProp", "isArrayLike", "shape2strides", "strides2offset", "emptyArray", "allocUnsafe", "numel", "ndarray", "defaults", "format", "DTYPE", "ORDER", "empty", "shape", "options", "dtype", "order", "ndims", "opts", "buf", "len", "st", "sh", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isndarrayLike", "isPlainObject", "isNonNegativeIntegerArray", "hasOwnProp", "shape2strides", "strides2offset", "numel", "getDType", "getShape", "getOrder", "ndarray", "emptyArray", "allocUnsafe", "format", "emptyLike", "x", "options", "dtype", "order", "ndims", "opts", "buf", "len", "st", "sh", "require_lib", "__commonJSMin", "exports", "module", "main", "require_re_integer", "__commonJSMin", "exports", "module", "RE_INTEGER", "require_re_subseq", "__commonJSMin", "exports", "module", "RE_SUBSEQ", "require_prop2slice_0d", "__commonJSMin", "exports", "module", "trim", "replace", "MultiSlice", "str2multislice", "seq2multislice", "str2slice", "format", "RE_INTEGER", "RE_SUBSEQ", "prop2slice", "target", "property", "shape", "prop", "ch", "s", "require_prop2slice_1d", "__commonJSMin", "exports", "module", "trim", "replace", "MultiSlice", "str2multislice", "seq2multislice", "str2slice", "format", "RE_INTEGER", "prop2slice", "target", "property", "strict", "shape", "prop", "ch", "s", "require_prop2slice_nd", "__commonJSMin", "exports", "module", "trim", "str2multislice", "seq2multislice", "sargs2multislice", "format", "RE_SUBSEQ", "prop2slice", "target", "property", "strict", "shape", "prop", "ch", "s", "require_has_property", "__commonJSMin", "exports", "module", "propertiesIn", "contains", "ndarray", "defaults", "hasProperty", "require_get_value", "__commonJSMin", "exports", "module", "isFunction", "getValue", "target", "property", "receiver", "value", "wrapper", "args", "i", "require_error_message", "__commonJSMin", "exports", "module", "replace", "errMessage", "msg", "require_error_constructor", "__commonJSMin", "exports", "module", "isRangeError", "isTypeError", "isSyntaxError", "errConstructor", "err", "require_get_slice", "__commonJSMin", "exports", "module", "slice", "errMessage", "errConstructor", "getSlice", "target", "property", "receiver", "prop2slice", "strict", "E", "s", "err", "require_get", "__commonJSMin", "exports", "module", "hasProperty", "getValue", "getSlice", "factory", "prop2slice", "get", "target", "property", "receiver", "require_set_value", "__commonJSMin", "exports", "module", "setValue", "target", "property", "value", "require_main", "__commonJSMin", "exports", "module", "isInteger", "isNegativeZero", "isComplexLike", "PINF", "NINF", "FLOAT32_SMALLEST_SUBNORMAL", "FLOAT32_MAX_SAFE_INTEGER", "FLOAT32_MIN_SAFE_INTEGER", "INT8_MIN", "INT16_MIN", "INT32_MIN", "UINT8_MAX", "UINT16_MAX", "UINT32_MAX", "minFloatDataType", "value", "minDataType", "require_lib", "__commonJSMin", "exports", "module", "minDataType", "require_main", "__commonJSMin", "exports", "module", "hasOwnProp", "isPlainObject", "isNumber", "isComplexLike", "isAccessorArray", "accessorSetter", "setter", "buffer", "ndarray", "defaults", "format", "ORDER", "scalar2ndarray", "value", "options", "opts", "buf", "flg", "set", "dt", "v", "require_lib", "__commonJSMin", "exports", "module", "main", "require_set_slice", "__commonJSMin", "exports", "module", "sliceAssign", "isndarrayLike", "isNumber", "isInteger", "isComplexLike", "isComplexDataType", "isFloatingDataType", "isUnsignedIntegerDataType", "isSignedIntegerDataType", "isSafeCast", "INT8_MAX", "INT16_MAX", "INT32_MAX", "minDataType", "complexDataType", "scalar2ndarray", "format", "errMessage", "errConstructor", "options", "dtype", "setSlice", "target", "property", "value", "receiver", "prop2slice", "strict", "vdt", "dt", "E", "s", "err", "require_set", "__commonJSMin", "exports", "module", "hasProperty", "setValue", "setSlice", "factory", "prop2slice", "set", "target", "property", "value", "receiver", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "parent", "inherit", "Proxy", "prop2slice0d", "prop2slice1d", "prop2slicend", "get", "set", "get0d", "set0d", "get1d", "set1d", "getnd", "setnd", "FancyArray", "dtype", "buffer", "shape", "strides", "offset", "order", "options", "handlers", "nargs", "ndims", "require_lib", "__commonJSMin", "exports", "module", "main", "require_defaults", "__commonJSMin", "exports", "module", "require_validate", "__commonJSMin", "exports", "module", "isObject", "hasOwnProp", "isOrder", "isIndexMode", "format", "validate", "opts", "options", "require_main", "__commonJSMin", "exports", "module", "isNonNegativeIntegerArray", "isInteger", "shape2strides", "getSubscripts", "format", "defaults", "validate", "ind2sub", "shape", "idx", "options", "opts", "err", "require_assign", "__commonJSMin", "exports", "module", "isNonNegativeIntegerArray", "isInteger", "shape2strides", "getSubscripts", "format", "defaults", "validate", "ind2sub", "shape", "idx", "options", "out", "opts", "dest", "err", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "main", "assign", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "isPlainObject", "isBoolean", "isndarrayLike", "isReadOnly", "hasOwnProp", "iteratorSymbol", "zeros", "getShape", "numel", "slice", "nextCartesianIndex", "MultiSlice", "format", "nditerColumns", "x", "options", "shape", "ndims", "opts", "iter", "FLG", "idx", "dim", "S0", "N", "i", "next", "end", "factory", "s", "j", "value", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "isPlainObject", "isOrder", "isndarrayLike", "hasOwnProp", "iteratorSymbol", "zeros", "getShape", "numel", "nextCartesianIndex", "format", "nditerEntries", "x", "options", "shape", "ndims", "opts", "iter", "FLG", "idx", "dim", "N", "i", "next", "end", "factory", "value", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "isPlainObject", "isOrder", "isCollection", "isNonNegativeInteger", "hasOwnProp", "iteratorSymbol", "zeros", "numel", "nextCartesianIndex", "format", "nditerIndices", "shape", "options", "ndims", "opts", "iter", "FLG", "idx", "dim", "sh", "N", "i", "next", "end", "factory", "value", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "isPlainObject", "isBoolean", "isndarrayLike", "isReadOnly", "hasOwnProp", "iteratorSymbol", "zeros", "getShape", "numel", "slice", "nextCartesianIndex", "MultiSlice", "format", "nditerRows", "x", "options", "shape", "ndims", "opts", "iter", "FLG", "idx", "dim", "S1", "N", "i", "next", "end", "factory", "s", "j", "value", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isndarrayLike", "toArray", "getStrides", "getOffset", "getShape", "getOrder", "getData", "format", "ndarray2array", "x", "require_lib", "__commonJSMin", "exports", "module", "ndarray2array", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "isFunction", "isIteratorLike", "iteratorSymbol", "ndarray2array", "format", "nditer2arrayEach", "iterator", "iter", "FLG", "next", "end", "factory", "value", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "isPlainObject", "isOrder", "isndarrayLike", "hasOwnProp", "iteratorSymbol", "zeros", "getShape", "numel", "nextCartesianIndex", "format", "nditerValues", "x", "options", "shape", "ndims", "opts", "iter", "FLG", "idx", "dim", "N", "i", "next", "end", "factory", "value", "require_lib", "__commonJSMin", "exports", "module", "main", "require_lib", "__commonJSMin", "exports", "module", "setReadOnly", "ns", "require_main", "__commonJSMin", "exports", "module", "isndarrayLike", "isCollection", "isNonNegativeInteger", "broadcast", "format", "maybeBroadcastArray", "x", "shape", "sh", "N", "d", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_next_dtypes", "__commonJSMin", "exports", "module", "require_main", "__commonJSMin", "exports", "module", "objectKeys", "hasOwnProp", "resolveStr", "NEXT_DTYPES", "generateTable", "dtypes", "ntypes", "out", "nextDataType", "dtype", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isNonNegativeInteger", "isCollection", "format", "numel", "x", "ndims", "sh", "n", "d", "i", "require_lib", "__commonJSMin", "exports", "module", "main", "require_promotion_rules", "__commonJSMin", "exports", "module", "require_main", "__commonJSMin", "exports", "module", "objectKeys", "hasOwnProp", "resolve", "PROMOTION_RULES", "generateFullTable", "dtypes", "ntypes", "out", "tmp", "dt1", "dt2", "o", "j", "i", "promotionRules", "dtype1", "dtype2", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isndarrayLike", "isMultiSlice", "isArrayLikeObject", "isPlainObject", "isBoolean", "hasOwnProp", "MultiSlice", "base", "getShape", "format", "slice", "x", "s", "options", "nargs", "opts", "args", "sh", "S", "i", "err", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isndarrayLike", "isMultiSlice", "isArrayLikeObject", "isPlainObject", "isBoolean", "isReadOnly", "hasOwnProp", "MultiSlice", "base", "getShape", "format", "sliceAssign", "x", "y", "s", "options", "nargs", "opts", "args", "sh", "S", "i", "err", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isPlainObject", "isBoolean", "isInteger", "isndarrayLike", "isUndefined", "isSlice", "isNull", "hasOwnProp", "Slice", "base", "format", "sliceDimension", "x", "dim", "s", "options", "slice", "opts", "require_lib", "__commonJSMin", "exports", "module", "main", "require_defaults", "__commonJSMin", "exports", "module", "require_validate", "__commonJSMin", "exports", "module", "isObject", "hasOwnProp", "isArray", "isOrder", "isIndexMode", "format", "validate", "opts", "options", "i", "require_main", "__commonJSMin", "exports", "module", "isNonNegativeIntegerArray", "isInteger", "shape2strides", "getIndex", "format", "defaults", "validate", "sub2ind", "options", "shape", "ndims", "args", "opts", "err", "len", "i", "j", "require_lib", "__commonJSMin", "exports", "module", "sub2ind", "require_main", "__commonJSMin", "exports", "module", "isPlainObject", "hasOwnProp", "isArrayLike", "shape2strides", "strides2offset", "buffer", "numel", "ndarray", "defaults", "format", "DTYPE", "ORDER", "zeros", "shape", "options", "dtype", "order", "ndims", "opts", "buf", "len", "st", "sh", "require_lib", "__commonJSMin", "exports", "module", "main", "require_main", "__commonJSMin", "exports", "module", "isndarrayLike", "isPlainObject", "isNonNegativeIntegerArray", "hasOwnProp", "shape2strides", "strides2offset", "buffer", "numel", "getDType", "getShape", "getOrder", "ndarray", "format", "zerosLike", "x", "options", "dtype", "order", "ndims", "opts", "buf", "len", "st", "sh", "require_lib", "__commonJSMin", "exports", "module", "main", "setReadOnly", "ns"] } diff --git a/empty-like/package.json b/empty-like/package.json index d9cd4c9b..d3bd7d41 100644 --- a/empty-like/package.json +++ b/empty-like/package.json @@ -57,6 +57,7 @@ "vector", "ndarray", "matrix", - "empty" + "empty", + "numpy.empty_like" ] } diff --git a/empty/package.json b/empty/package.json index 0c0ee280..baebbf91 100644 --- a/empty/package.json +++ b/empty/package.json @@ -57,6 +57,7 @@ "vector", "ndarray", "matrix", - "empty" + "empty", + "numpy.empty" ] } diff --git a/lib/index.js b/lib/index.js index 4952113a..73817ca8 100644 --- a/lib/index.js +++ b/lib/index.js @@ -324,6 +324,15 @@ setReadOnly( ns, 'ndslice', require( './../slice' ) ); */ setReadOnly( ns, 'ndsliceAssign', require( './../slice-assign' ) ); +/** +* @name ndsliceDimension +* @memberof ns +* @readonly +* @type {Function} +* @see {@link module:@stdlib/ndarray/slice-dimension} +*/ +setReadOnly( ns, 'ndsliceDimension', require( './../slice-dimension' ) ); + /** * @name ndarrayStrides * @memberof ns diff --git a/slice-dimension/README.md b/slice-dimension/README.md new file mode 100644 index 00000000..7f75d31f --- /dev/null +++ b/slice-dimension/README.md @@ -0,0 +1,238 @@ + + +# sliceDimension + +> Return a read-only view of an input [`ndarray`][@stdlib/ndarray/ctor] when sliced along a specified dimension. + + + +
+ +
+ + + + + +
+ +## Usage + +```javascript +var sliceDimension = require( '@stdlib/ndarray/slice-dimension' ); +``` + +#### sliceDimension( x, dim, slice\[, options] ) + +Returns a **read-only** view of an input [`ndarray`][@stdlib/ndarray/ctor] when sliced along a specified dimension. + +```javascript +var Slice = require( '@stdlib/slice/ctor' ); +var ndarray = require( '@stdlib/ndarray/ctor' ); +var ndarray2array = require( '@stdlib/ndarray/to-array' ); + +var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ]; +var shape = [ 3, 2 ]; +var strides = [ 2, 1 ]; +var offset = 0; + +var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' ); +// returns + +var sh = x.shape; +// returns [ 3, 2 ] + +var arr = ndarray2array( x ); +// returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ] + +var s = new Slice( null, null, -1 ); +// returns + +var y = sliceDimension( x, 0, s ); +// returns + +sh = y.shape; +// returns [ 3, 2 ] + +arr = ndarray2array( y ); +// returns [ [ 5.0, 6.0 ], [ 3.0, 4.0 ], [ 1.0, 2.0 ] ] +``` + +The function accepts the following arguments: + +- **x**: input [`ndarray`][@stdlib/ndarray/ctor]. +- **dim**: index of dimension along which to slice. If provided an integer less than zero, the dimension index is resolved relative to the last dimension, with the last dimension corresponding to the value `-1`. +- **slice**: a [`Slice`][@stdlib/slice/ctor] instance, `null`, `undefined`, or an integer. If provided `null` or `undefined`, the argument is equivalent to `new Slice()` (i.e., the returned view should include all elements along a specified dimension). If provided an integer less than zero, the corresponding element along the specified dimension is resolved relative to the last element along that dimension. For negative integers, the last element corresponds to the value `-1`. +- **options**: function options. + +The function supports the following `options`: + +- **strict**: boolean indicating whether to enforce strict bounds checking. + +By default, the function throws an error when provided a slice which exceeds array bounds. To return an empty array when a slice exceeds array bounds, set the `strict` option to `false`. + +```javascript +var Slice = require( '@stdlib/slice/ctor' ); +var ndarray = require( '@stdlib/ndarray/ctor' ); +var ndarray2array = require( '@stdlib/ndarray/to-array' ); + +var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ]; +var shape = [ 3, 2 ]; +var strides = [ 2, 1 ]; +var offset = 0; + +var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' ); +// returns + +var sh = x.shape; +// returns [ 3, 2 ] + +var arr = ndarray2array( x ); +// returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ] + +var s = new Slice( 10, 20, 2 ); +// returns + +var y = sliceDimension( x, 1, s, { + 'strict': false +}); +// returns + +sh = y.shape; +// returns [ 3, 0 ] + +arr = ndarray2array( y ); +// returns [] +``` + +
+ + + + + +
+ +
+ + + + + +
+ +## Examples + + + + + +```javascript +var S = require( '@stdlib/slice/ctor' ); +var array = require( '@stdlib/ndarray/array' ); +var ndarray2array = require( '@stdlib/ndarray/to-array' ); +var zeroTo = require( '@stdlib/array/base/zero-to' ); +var sliceDimension = require( '@stdlib/ndarray/slice-dimension' ); + +// Alias `null` to allow for more compact indexing expressions: +var _ = null; + +// Create a linear ndarray buffer: +var buf = zeroTo( 27 ); + +// Create an ndarray: +var x = array( buf, { + 'shape': [ 3, 3, 3 ] +}); + +// Get each matrix... +var y1 = sliceDimension( x, 0, 0 ); +// returns + +var a1 = ndarray2array( y1 ); +// returns [ [ 0, 1, 2 ], [ 3, 4, 5 ], [ 6, 7, 8 ] ] + +var y2 = sliceDimension( x, 0, 1 ); +// returns + +var a2 = ndarray2array( y2 ); +// returns [ [ 9, 10, 11 ], [ 12, 13, 14 ], [ 15, 16, 17 ] ] + +var y3 = sliceDimension( x, 0, 2 ); +// returns + +var a3 = ndarray2array( y3 ); +// returns [ [ 18, 19, 20 ], [ 21, 22, 23 ], [ 24, 25, 26 ] ] + +// Reverse the matrix order: +var s = S( _, _, -1 ); +var y4 = sliceDimension( x, 0, s ); +// returns + +var a4 = ndarray2array( y4 ); +// returns [...] + +// Get the second rows from each matrix: +var y5 = sliceDimension( x, 1, 1 ); +// returns + +var a5 = ndarray2array( y5 ); +// returns [ [ 3, 4, 5 ], [ 12, 13, 14 ], [ 21, 22, 23 ] ] + +// Get the second columns from each matrix: +var y6 = sliceDimension( x, 2, 1 ); +// returns + +var a6 = ndarray2array( y6 ); +// returns [ [ 1, 4, 7 ], [ 10, 13, 16 ], [ 19, 22, 25 ] ] +``` + +
+ + + + + +
+ +
+ + + + + + + + + + + + + + diff --git a/slice-dimension/benchmark/benchmark.js b/slice-dimension/benchmark/benchmark.js new file mode 100644 index 00000000..26ecacf4 --- /dev/null +++ b/slice-dimension/benchmark/benchmark.js @@ -0,0 +1,1047 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2023 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var bench = require( '@stdlib/bench' ); +var isndarrayLike = require( '@stdlib/assert/is-ndarray-like' ); +var Slice = require( '@stdlib/slice/ctor' ); +var baseEmpty = require( './../../base/empty' ); +var empty = require( './../../empty' ); +var pkg = require( './../package.json' ).name; +var sliceDimension = require( './../lib' ); + + +// MAIN // + +bench( pkg+'::1d,base', function benchmark( b ) { + var values; + var v; + var s; + var i; + + values = [ + baseEmpty( 'float64', [ 2 ], 'row-major' ), + baseEmpty( 'float32', [ 2 ], 'row-major' ), + baseEmpty( 'int32', [ 2 ], 'row-major' ), + baseEmpty( 'complex128', [ 2 ], 'row-major' ), + baseEmpty( 'generic', [ 2 ], 'row-major' ) + ]; + s = new Slice( null ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = sliceDimension( values[ i%values.length ], 0, s ); + if ( typeof v !== 'object' ) { + b.fail( 'should return an ndarray' ); + } + } + b.toc(); + if ( !isndarrayLike( v ) ) { + b.fail( 'should return an ndarray' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::1d,non-base', function benchmark( b ) { + var values; + var v; + var s; + var i; + + /* eslint-disable object-curly-newline */ + + values = [ + empty( [ 2 ], { 'dtype': 'float64' } ), + empty( [ 2 ], { 'dtype': 'float32' } ), + empty( [ 2 ], { 'dtype': 'int32' } ), + empty( [ 2 ], { 'dtype': 'complex128' } ), + empty( [ 2 ], { 'dtype': 'generic' } ) + ]; + + /* eslint-enable object-curly-newline */ + + s = new Slice( null ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = sliceDimension( values[ i%values.length ], 0, s ); + if ( typeof v !== 'object' ) { + b.fail( 'should return an ndarray' ); + } + } + b.toc(); + if ( !isndarrayLike( v ) ) { + b.fail( 'should return an ndarray' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::1d,base,reduced', function benchmark( b ) { + var values; + var v; + var s; + var i; + + values = [ + baseEmpty( 'float64', [ 2 ], 'row-major' ), + baseEmpty( 'float32', [ 2 ], 'row-major' ), + baseEmpty( 'int32', [ 2 ], 'row-major' ), + baseEmpty( 'complex128', [ 2 ], 'row-major' ), + baseEmpty( 'generic', [ 2 ], 'row-major' ) + ]; + s = 1; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = sliceDimension( values[ i%values.length ], 0, s ); + if ( typeof v !== 'object' ) { + b.fail( 'should return an ndarray' ); + } + } + b.toc(); + if ( !isndarrayLike( v ) ) { + b.fail( 'should return an ndarray' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::1d,non-base,reduced', function benchmark( b ) { + var values; + var v; + var s; + var i; + + /* eslint-disable object-curly-newline */ + + values = [ + empty( [ 2 ], { 'dtype': 'float64' } ), + empty( [ 2 ], { 'dtype': 'float32' } ), + empty( [ 2 ], { 'dtype': 'int32' } ), + empty( [ 2 ], { 'dtype': 'complex128' } ), + empty( [ 2 ], { 'dtype': 'generic' } ) + ]; + + /* eslint-enable object-curly-newline */ + + s = 1; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = sliceDimension( values[ i%values.length ], 0, s ); + if ( typeof v !== 'object' ) { + b.fail( 'should return an ndarray' ); + } + } + b.toc(); + if ( !isndarrayLike( v ) ) { + b.fail( 'should return an ndarray' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::1d,base,out-of-bounds', function benchmark( b ) { + var values; + var opts; + var v; + var s; + var i; + + values = [ + baseEmpty( 'float64', [ 2 ], 'row-major' ), + baseEmpty( 'float32', [ 2 ], 'row-major' ), + baseEmpty( 'int32', [ 2 ], 'row-major' ), + baseEmpty( 'complex128', [ 2 ], 'row-major' ), + baseEmpty( 'generic', [ 2 ], 'row-major' ) + ]; + s = new Slice( 10, 20, 1 ); + opts = { + 'strict': false + }; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = sliceDimension( values[ i%values.length ], 0, s, opts ); + if ( typeof v !== 'object' ) { + b.fail( 'should return an ndarray' ); + } + } + b.toc(); + if ( !isndarrayLike( v ) ) { + b.fail( 'should return an ndarray' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::1d,non-base,out-of-bounds', function benchmark( b ) { + var values; + var opts; + var v; + var s; + var i; + + /* eslint-disable object-curly-newline */ + + values = [ + empty( [ 2 ], { 'dtype': 'float64' } ), + empty( [ 2 ], { 'dtype': 'float32' } ), + empty( [ 2 ], { 'dtype': 'int32' } ), + empty( [ 2 ], { 'dtype': 'complex128' } ), + empty( [ 2 ], { 'dtype': 'generic' } ) + ]; + + /* eslint-enable object-curly-newline */ + + s = new Slice( 10, 20, 1 ); + opts = { + 'strict': false + }; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = sliceDimension( values[ i%values.length ], 0, s, opts ); + if ( typeof v !== 'object' ) { + b.fail( 'should return an ndarray' ); + } + } + b.toc(); + if ( !isndarrayLike( v ) ) { + b.fail( 'should return an ndarray' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::2d,base', function benchmark( b ) { + var values; + var v; + var s; + var i; + + values = [ + baseEmpty( 'float64', [ 2, 2 ], 'row-major' ), + baseEmpty( 'float32', [ 2, 2 ], 'row-major' ), + baseEmpty( 'int32', [ 2, 2 ], 'row-major' ), + baseEmpty( 'complex128', [ 2, 2 ], 'row-major' ), + baseEmpty( 'generic', [ 2, 2 ], 'row-major' ) + ]; + s = new Slice( null ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = sliceDimension( values[ i%values.length ], 1, s ); + if ( typeof v !== 'object' ) { + b.fail( 'should return an ndarray' ); + } + } + b.toc(); + if ( !isndarrayLike( v ) ) { + b.fail( 'should return an ndarray' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::2d,non-base', function benchmark( b ) { + var values; + var v; + var s; + var i; + + /* eslint-disable object-curly-newline */ + + values = [ + empty( [ 2, 2 ], { 'dtype': 'float64' } ), + empty( [ 2, 2 ], { 'dtype': 'float32' } ), + empty( [ 2, 2 ], { 'dtype': 'int32' } ), + empty( [ 2, 2 ], { 'dtype': 'complex128' } ), + empty( [ 2, 2 ], { 'dtype': 'generic' } ) + ]; + + /* eslint-enable object-curly-newline */ + + s = new Slice( null ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = sliceDimension( values[ i%values.length ], 1, s ); + if ( typeof v !== 'object' ) { + b.fail( 'should return an ndarray' ); + } + } + b.toc(); + if ( !isndarrayLike( v ) ) { + b.fail( 'should return an ndarray' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::2d,base,reduced', function benchmark( b ) { + var values; + var v; + var s; + var i; + + values = [ + baseEmpty( 'float64', [ 2, 2 ], 'row-major' ), + baseEmpty( 'float32', [ 2, 2 ], 'row-major' ), + baseEmpty( 'int32', [ 2, 2 ], 'row-major' ), + baseEmpty( 'complex128', [ 2, 2 ], 'row-major' ), + baseEmpty( 'generic', [ 2, 2 ], 'row-major' ) + ]; + s = 1; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = sliceDimension( values[ i%values.length ], 1, s ); + if ( typeof v !== 'object' ) { + b.fail( 'should return an ndarray' ); + } + } + b.toc(); + if ( !isndarrayLike( v ) ) { + b.fail( 'should return an ndarray' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::2d,non-base,reduced', function benchmark( b ) { + var values; + var v; + var s; + var i; + + /* eslint-disable object-curly-newline */ + + values = [ + empty( [ 2, 2 ], { 'dtype': 'float64' } ), + empty( [ 2, 2 ], { 'dtype': 'float32' } ), + empty( [ 2, 2 ], { 'dtype': 'int32' } ), + empty( [ 2, 2 ], { 'dtype': 'complex128' } ), + empty( [ 2, 2 ], { 'dtype': 'generic' } ) + ]; + + /* eslint-enable object-curly-newline */ + + s = 1; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = sliceDimension( values[ i%values.length ], 1, s ); + if ( typeof v !== 'object' ) { + b.fail( 'should return an ndarray' ); + } + } + b.toc(); + if ( !isndarrayLike( v ) ) { + b.fail( 'should return an ndarray' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::2d,base,out-of-bounds', function benchmark( b ) { + var values; + var opts; + var v; + var s; + var i; + + values = [ + baseEmpty( 'float64', [ 2, 2 ], 'row-major' ), + baseEmpty( 'float32', [ 2, 2 ], 'row-major' ), + baseEmpty( 'int32', [ 2, 2 ], 'row-major' ), + baseEmpty( 'complex128', [ 2, 2 ], 'row-major' ), + baseEmpty( 'generic', [ 2, 2 ], 'row-major' ) + ]; + s = new Slice( 10, 20, 1 ); + opts = { + 'strict': false + }; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = sliceDimension( values[ i%values.length ], 1, s, opts ); + if ( typeof v !== 'object' ) { + b.fail( 'should return an ndarray' ); + } + } + b.toc(); + if ( !isndarrayLike( v ) ) { + b.fail( 'should return an ndarray' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::2d,non-base,out-of-bounds', function benchmark( b ) { + var values; + var opts; + var v; + var s; + var i; + + /* eslint-disable object-curly-newline */ + + values = [ + empty( [ 2, 2 ], { 'dtype': 'float64' } ), + empty( [ 2, 2 ], { 'dtype': 'float32' } ), + empty( [ 2, 2 ], { 'dtype': 'int32' } ), + empty( [ 2, 2 ], { 'dtype': 'complex128' } ), + empty( [ 2, 2 ], { 'dtype': 'generic' } ) + ]; + + /* eslint-enable object-curly-newline */ + + s = new Slice( 10, 20, 1 ); + opts = { + 'strict': false + }; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = sliceDimension( values[ i%values.length ], 1, s, opts ); + if ( typeof v !== 'object' ) { + b.fail( 'should return an ndarray' ); + } + } + b.toc(); + if ( !isndarrayLike( v ) ) { + b.fail( 'should return an ndarray' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::3d,base', function benchmark( b ) { + var values; + var v; + var s; + var i; + + values = [ + baseEmpty( 'float64', [ 2, 2, 2 ], 'row-major' ), + baseEmpty( 'float32', [ 2, 2, 2 ], 'row-major' ), + baseEmpty( 'int32', [ 2, 2, 2 ], 'row-major' ), + baseEmpty( 'complex128', [ 2, 2, 2 ], 'row-major' ), + baseEmpty( 'generic', [ 2, 2, 2 ], 'row-major' ) + ]; + s = new Slice( null ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = sliceDimension( values[ i%values.length ], 1, s ); + if ( typeof v !== 'object' ) { + b.fail( 'should return an ndarray' ); + } + } + b.toc(); + if ( !isndarrayLike( v ) ) { + b.fail( 'should return an ndarray' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::3d,non-base', function benchmark( b ) { + var values; + var v; + var s; + var i; + + /* eslint-disable object-curly-newline */ + + values = [ + empty( [ 2, 2, 2 ], { 'dtype': 'float64' } ), + empty( [ 2, 2, 2 ], { 'dtype': 'float32' } ), + empty( [ 2, 2, 2 ], { 'dtype': 'int32' } ), + empty( [ 2, 2, 2 ], { 'dtype': 'complex128' } ), + empty( [ 2, 2, 2 ], { 'dtype': 'generic' } ) + ]; + + /* eslint-enable object-curly-newline */ + + s = new Slice( null ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = sliceDimension( values[ i%values.length ], 1, s ); + if ( typeof v !== 'object' ) { + b.fail( 'should return an ndarray' ); + } + } + b.toc(); + if ( !isndarrayLike( v ) ) { + b.fail( 'should return an ndarray' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::3d,base,reduced', function benchmark( b ) { + var values; + var v; + var s; + var i; + + values = [ + baseEmpty( 'float64', [ 2, 2, 2 ], 'row-major' ), + baseEmpty( 'float32', [ 2, 2, 2 ], 'row-major' ), + baseEmpty( 'int32', [ 2, 2, 2 ], 'row-major' ), + baseEmpty( 'complex128', [ 2, 2, 2 ], 'row-major' ), + baseEmpty( 'generic', [ 2, 2, 2 ], 'row-major' ) + ]; + s = 1; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = sliceDimension( values[ i%values.length ], 1, s ); + if ( typeof v !== 'object' ) { + b.fail( 'should return an ndarray' ); + } + } + b.toc(); + if ( !isndarrayLike( v ) ) { + b.fail( 'should return an ndarray' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::3d,non-base,reduced', function benchmark( b ) { + var values; + var v; + var s; + var i; + + /* eslint-disable object-curly-newline */ + + values = [ + empty( [ 2, 2, 2 ], { 'dtype': 'float64' } ), + empty( [ 2, 2, 2 ], { 'dtype': 'float32' } ), + empty( [ 2, 2, 2 ], { 'dtype': 'int32' } ), + empty( [ 2, 2, 2 ], { 'dtype': 'complex128' } ), + empty( [ 2, 2, 2 ], { 'dtype': 'generic' } ) + ]; + + /* eslint-enable object-curly-newline */ + + s = 1; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = sliceDimension( values[ i%values.length ], 1, s ); + if ( typeof v !== 'object' ) { + b.fail( 'should return an ndarray' ); + } + } + b.toc(); + if ( !isndarrayLike( v ) ) { + b.fail( 'should return an ndarray' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::3d,base,out-of-bounds', function benchmark( b ) { + var values; + var opts; + var v; + var s; + var i; + + values = [ + baseEmpty( 'float64', [ 2, 2, 2 ], 'row-major' ), + baseEmpty( 'float32', [ 2, 2, 2 ], 'row-major' ), + baseEmpty( 'int32', [ 2, 2, 2 ], 'row-major' ), + baseEmpty( 'complex128', [ 2, 2, 2 ], 'row-major' ), + baseEmpty( 'generic', [ 2, 2, 2 ], 'row-major' ) + ]; + s = new Slice( 10, 20, 1 ); + opts = { + 'strict': false + }; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = sliceDimension( values[ i%values.length ], 1, s, opts ); + if ( typeof v !== 'object' ) { + b.fail( 'should return an ndarray' ); + } + } + b.toc(); + if ( !isndarrayLike( v ) ) { + b.fail( 'should return an ndarray' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::3d,non-base,out-of-bounds', function benchmark( b ) { + var values; + var opts; + var v; + var s; + var i; + + /* eslint-disable object-curly-newline */ + + values = [ + empty( [ 2, 2, 2 ], { 'dtype': 'float64' } ), + empty( [ 2, 2, 2 ], { 'dtype': 'float32' } ), + empty( [ 2, 2, 2 ], { 'dtype': 'int32' } ), + empty( [ 2, 2, 2 ], { 'dtype': 'complex128' } ), + empty( [ 2, 2, 2 ], { 'dtype': 'generic' } ) + ]; + + /* eslint-enable object-curly-newline */ + + s = new Slice( 10, 20, 1 ); + opts = { + 'strict': false + }; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = sliceDimension( values[ i%values.length ], 1, s, opts ); + if ( typeof v !== 'object' ) { + b.fail( 'should return an ndarray' ); + } + } + b.toc(); + if ( !isndarrayLike( v ) ) { + b.fail( 'should return an ndarray' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::4d,base', function benchmark( b ) { + var values; + var v; + var s; + var i; + + values = [ + baseEmpty( 'float64', [ 2, 2, 2, 2 ], 'row-major' ), + baseEmpty( 'float32', [ 2, 2, 2, 2 ], 'row-major' ), + baseEmpty( 'int32', [ 2, 2, 2, 2 ], 'row-major' ), + baseEmpty( 'complex128', [ 2, 2, 2, 2 ], 'row-major' ), + baseEmpty( 'generic', [ 2, 2, 2, 2 ], 'row-major' ) + ]; + s = new Slice( null ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = sliceDimension( values[ i%values.length ], 1, s ); + if ( typeof v !== 'object' ) { + b.fail( 'should return an ndarray' ); + } + } + b.toc(); + if ( !isndarrayLike( v ) ) { + b.fail( 'should return an ndarray' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::4d,non-base', function benchmark( b ) { + var values; + var v; + var s; + var i; + + /* eslint-disable object-curly-newline */ + + values = [ + empty( [ 2, 2, 2, 2 ], { 'dtype': 'float64' } ), + empty( [ 2, 2, 2, 2 ], { 'dtype': 'float32' } ), + empty( [ 2, 2, 2, 2 ], { 'dtype': 'int32' } ), + empty( [ 2, 2, 2, 2 ], { 'dtype': 'complex128' } ), + empty( [ 2, 2, 2, 2 ], { 'dtype': 'generic' } ) + ]; + + /* eslint-enable object-curly-newline */ + + s = new Slice( null ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = sliceDimension( values[ i%values.length ], 1, s ); + if ( typeof v !== 'object' ) { + b.fail( 'should return an ndarray' ); + } + } + b.toc(); + if ( !isndarrayLike( v ) ) { + b.fail( 'should return an ndarray' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::4d,base,reduced', function benchmark( b ) { + var values; + var v; + var s; + var i; + + values = [ + baseEmpty( 'float64', [ 2, 2, 2, 2 ], 'row-major' ), + baseEmpty( 'float32', [ 2, 2, 2, 2 ], 'row-major' ), + baseEmpty( 'int32', [ 2, 2, 2, 2 ], 'row-major' ), + baseEmpty( 'complex128', [ 2, 2, 2, 2 ], 'row-major' ), + baseEmpty( 'generic', [ 2, 2, 2, 2 ], 'row-major' ) + ]; + s = 1; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = sliceDimension( values[ i%values.length ], 1, s ); + if ( typeof v !== 'object' ) { + b.fail( 'should return an ndarray' ); + } + } + b.toc(); + if ( !isndarrayLike( v ) ) { + b.fail( 'should return an ndarray' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::4d,non-base,reduced', function benchmark( b ) { + var values; + var v; + var s; + var i; + + /* eslint-disable object-curly-newline */ + + values = [ + empty( [ 2, 2, 2, 2 ], { 'dtype': 'float64' } ), + empty( [ 2, 2, 2, 2 ], { 'dtype': 'float32' } ), + empty( [ 2, 2, 2, 2 ], { 'dtype': 'int32' } ), + empty( [ 2, 2, 2, 2 ], { 'dtype': 'complex128' } ), + empty( [ 2, 2, 2, 2 ], { 'dtype': 'generic' } ) + ]; + + /* eslint-enable object-curly-newline */ + + s = 1; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = sliceDimension( values[ i%values.length ], 1, s ); + if ( typeof v !== 'object' ) { + b.fail( 'should return an ndarray' ); + } + } + b.toc(); + if ( !isndarrayLike( v ) ) { + b.fail( 'should return an ndarray' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::4d,base,out-of-bounds', function benchmark( b ) { + var values; + var opts; + var v; + var s; + var i; + + values = [ + baseEmpty( 'float64', [ 2, 2, 2, 2 ], 'row-major' ), + baseEmpty( 'float32', [ 2, 2, 2, 2 ], 'row-major' ), + baseEmpty( 'int32', [ 2, 2, 2, 2 ], 'row-major' ), + baseEmpty( 'complex128', [ 2, 2, 2, 2 ], 'row-major' ), + baseEmpty( 'generic', [ 2, 2, 2, 2 ], 'row-major' ) + ]; + s = new Slice( 10, 20, 1 ); + opts = { + 'strict': false + }; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = sliceDimension( values[ i%values.length ], 1, s, opts ); + if ( typeof v !== 'object' ) { + b.fail( 'should return an ndarray' ); + } + } + b.toc(); + if ( !isndarrayLike( v ) ) { + b.fail( 'should return an ndarray' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::4d,non-base,out-of-bounds', function benchmark( b ) { + var values; + var opts; + var v; + var s; + var i; + + /* eslint-disable object-curly-newline */ + + values = [ + empty( [ 2, 2, 2, 2 ], { 'dtype': 'float64' } ), + empty( [ 2, 2, 2, 2 ], { 'dtype': 'float32' } ), + empty( [ 2, 2, 2, 2 ], { 'dtype': 'int32' } ), + empty( [ 2, 2, 2, 2 ], { 'dtype': 'complex128' } ), + empty( [ 2, 2, 2, 2 ], { 'dtype': 'generic' } ) + ]; + + /* eslint-enable object-curly-newline */ + + s = new Slice( 10, 20, 1 ); + opts = { + 'strict': false + }; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = sliceDimension( values[ i%values.length ], 1, s, opts ); + if ( typeof v !== 'object' ) { + b.fail( 'should return an ndarray' ); + } + } + b.toc(); + if ( !isndarrayLike( v ) ) { + b.fail( 'should return an ndarray' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::5d,base', function benchmark( b ) { + var values; + var v; + var s; + var i; + + values = [ + baseEmpty( 'float64', [ 2, 2, 2, 2, 2 ], 'row-major' ), + baseEmpty( 'float32', [ 2, 2, 2, 2, 2 ], 'row-major' ), + baseEmpty( 'int32', [ 2, 2, 2, 2, 2 ], 'row-major' ), + baseEmpty( 'complex128', [ 2, 2, 2, 2, 2 ], 'row-major' ), + baseEmpty( 'generic', [ 2, 2, 2, 2, 2 ], 'row-major' ) + ]; + s = new Slice( null ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = sliceDimension( values[ i%values.length ], 1, s ); + if ( typeof v !== 'object' ) { + b.fail( 'should return an ndarray' ); + } + } + b.toc(); + if ( !isndarrayLike( v ) ) { + b.fail( 'should return an ndarray' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::5d,non-base', function benchmark( b ) { + var values; + var v; + var s; + var i; + + /* eslint-disable object-curly-newline */ + + values = [ + empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'float64' } ), + empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'float32' } ), + empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'int32' } ), + empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'complex128' } ), + empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'generic' } ) + ]; + + /* eslint-enable object-curly-newline */ + + s = new Slice( null ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = sliceDimension( values[ i%values.length ], 1, s ); + if ( typeof v !== 'object' ) { + b.fail( 'should return an ndarray' ); + } + } + b.toc(); + if ( !isndarrayLike( v ) ) { + b.fail( 'should return an ndarray' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::5d,base,reduced', function benchmark( b ) { + var values; + var v; + var s; + var i; + + values = [ + baseEmpty( 'float64', [ 2, 2, 2, 2, 2 ], 'row-major' ), + baseEmpty( 'float32', [ 2, 2, 2, 2, 2 ], 'row-major' ), + baseEmpty( 'int32', [ 2, 2, 2, 2, 2 ], 'row-major' ), + baseEmpty( 'complex128', [ 2, 2, 2, 2, 2 ], 'row-major' ), + baseEmpty( 'generic', [ 2, 2, 2, 2, 2 ], 'row-major' ) + ]; + s = 1; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = sliceDimension( values[ i%values.length ], 1, s ); + if ( typeof v !== 'object' ) { + b.fail( 'should return an ndarray' ); + } + } + b.toc(); + if ( !isndarrayLike( v ) ) { + b.fail( 'should return an ndarray' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::5d,non-base,reduced', function benchmark( b ) { + var values; + var v; + var s; + var i; + + /* eslint-disable object-curly-newline */ + + values = [ + empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'float64' } ), + empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'float32' } ), + empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'int32' } ), + empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'complex128' } ), + empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'generic' } ) + ]; + + /* eslint-enable object-curly-newline */ + + s = 1; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = sliceDimension( values[ i%values.length ], 1, s ); + if ( typeof v !== 'object' ) { + b.fail( 'should return an ndarray' ); + } + } + b.toc(); + if ( !isndarrayLike( v ) ) { + b.fail( 'should return an ndarray' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::5d,base,out-of-bounds', function benchmark( b ) { + var values; + var opts; + var v; + var s; + var i; + + values = [ + baseEmpty( 'float64', [ 2, 2, 2, 2, 2 ], 'row-major' ), + baseEmpty( 'float32', [ 2, 2, 2, 2, 2 ], 'row-major' ), + baseEmpty( 'int32', [ 2, 2, 2, 2, 2 ], 'row-major' ), + baseEmpty( 'complex128', [ 2, 2, 2, 2, 2 ], 'row-major' ), + baseEmpty( 'generic', [ 2, 2, 2, 2, 2 ], 'row-major' ) + ]; + s = new Slice( 10, 20, 1 ); + opts = { + 'strict': false + }; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = sliceDimension( values[ i%values.length ], 1, s, opts ); + if ( typeof v !== 'object' ) { + b.fail( 'should return an ndarray' ); + } + } + b.toc(); + if ( !isndarrayLike( v ) ) { + b.fail( 'should return an ndarray' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); + +bench( pkg+'::5d,non-base,out-of-bounds', function benchmark( b ) { + var values; + var opts; + var v; + var s; + var i; + + /* eslint-disable object-curly-newline */ + + values = [ + empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'float64' } ), + empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'float32' } ), + empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'int32' } ), + empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'complex128' } ), + empty( [ 2, 2, 2, 2, 2 ], { 'dtype': 'generic' } ) + ]; + + /* eslint-enable object-curly-newline */ + + s = new Slice( 10, 20, 1 ); + opts = { + 'strict': false + }; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + v = sliceDimension( values[ i%values.length ], 1, s, opts ); + if ( typeof v !== 'object' ) { + b.fail( 'should return an ndarray' ); + } + } + b.toc(); + if ( !isndarrayLike( v ) ) { + b.fail( 'should return an ndarray' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/slice-dimension/docs/repl.txt b/slice-dimension/docs/repl.txt new file mode 100644 index 00000000..2f55b3ae --- /dev/null +++ b/slice-dimension/docs/repl.txt @@ -0,0 +1,51 @@ + +{{alias}}( x, dim, slice[, options] ) + Returns a read-only view of an input ndarray when sliced along a specified + dimension. + + Parameters + ---------- + x: ndarray + Input array. + + dim: integer + Index of dimension to slice. If less than zero, the index is resolved + relative to the last dimension, with the last dimension corresponding to + the value `-1`. + + slice: Slice|integer|null|undefined + Slice object or an integer. If provided `null` or `undefined`, the + returned view includes all elements along a specified dimension. If + provided an integer less than zero, the corresponding element along the + specified dimension is resolved relative to the last element along that + dimension. For negative integers, the last element corresponds to the + value `-1`. + + options: Object (optional) + Options. + + options.strict: boolean (optional) + Boolean indicating whether to enforce strict bounds checking. + Default: true. + + Returns + ------- + out: ndarray + Output array view. + + Examples + -------- + > var x = {{alias:@stdlib/ndarray/array}}( [ [ 1, 2 ], [ 3, 4 ] ] ) + + > x.shape + [ 2, 2 ] + > var y = {{alias}}( x, 1, 1 ) + + > y.shape + [ 2 ] + > {{alias:@stdlib/ndarray/to-array}}( y ) + [ 2, 4 ] + + See Also + -------- + diff --git a/slice-dimension/docs/types/index.d.ts b/slice-dimension/docs/types/index.d.ts new file mode 100644 index 00000000..ed934de0 --- /dev/null +++ b/slice-dimension/docs/types/index.d.ts @@ -0,0 +1,604 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2023 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// TypeScript Version: 4.1 + +/// + +import { typedndarray, genericndarray, float64ndarray, float32ndarray, int32ndarray, int16ndarray, int8ndarray, uint32ndarray, uint16ndarray, uint8ndarray, uint8cndarray, complex128ndarray, complex64ndarray } from '@stdlib/types/ndarray'; +import { Slice } from '@stdlib/types/slice'; + +/** +* Interface defining function options. +*/ +interface Options { + /** + * Boolean indicating whether to enforce strict bounds checking (default: true). + */ + strict?: boolean; +} + +/** +* Slice argument. +*/ +type SliceArgument = Slice | number | null | undefined; + +/** +* Returns a read-only view of an input ndarray when sliced along a specified dimension. +* +* @param x - input array +* @param dim - index of dimension to slice +* @param s - slice object or an integer +* @param options - function options +* @param options.strict - boolean indicating whether to enforce strict bounds checking +* @returns output array +* +* @example +* var Slice = require( `@stdlib/slice/ctor` ); +* var ndarray = require( `@stdlib/ndarray/ctor` ); +* var typedarray = require( `@stdlib/array/typed` ); +* var ndarray2array = require( `@stdlib/ndarray/to-array` ); +* +* var buffer = typedarray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ], 'float64' ); +* var shape = [ 3, 2 ]; +* var strides = [ 2, 1 ]; +* var offset = 0; +* +* var x = ndarray( 'float64', buffer, shape, strides, offset, 'row-major' ); +* // returns +* +* var sh = x.shape; +* // returns [ 3, 2 ] +* +* var arr = ndarray2array( x ); +* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ] +* +* var s = new Slice( null, null, -1 ); +* // returns +* +* var y = sliceDimension( x, 0, s ); +* // returns +* +* sh = y.shape; +* // returns [ 3, 2 ] +* +* arr = ndarray2array( y ); +* // returns [ [ 5.0, 6.0 ], [ 3.0, 4.0 ], [ 1.0, 2.0 ] ] +*/ +declare function sliceDimension( x: float64ndarray, dim: number, s: SliceArgument, options?: Options ): float64ndarray; + +/** +* Returns a read-only view of an input ndarray when sliced along a specified dimension. +* +* @param x - input array +* @param dim - index of dimension to slice +* @param s - slice object or an integer +* @param options - function options +* @param options.strict - boolean indicating whether to enforce strict bounds checking +* @returns output array +* +* @example +* var Slice = require( `@stdlib/slice/ctor` ); +* var typedarray = require( `@stdlib/array/typed` ); +* var ndarray = require( `@stdlib/ndarray/ctor` ); +* var ndarray2array = require( `@stdlib/ndarray/to-array` ); +* +* var buffer = typedarray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ], 'float32' ); +* var shape = [ 3, 2 ]; +* var strides = [ 2, 1 ]; +* var offset = 0; +* +* var x = ndarray( 'float32', buffer, shape, strides, offset, 'row-major' ); +* // returns +* +* var sh = x.shape; +* // returns [ 3, 2 ] +* +* var arr = ndarray2array( x ); +* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ] +* +* var s = new Slice( null, null, -1 ); +* // returns +* +* var y = sliceDimension( x, 0, s ); +* // returns +* +* sh = y.shape; +* // returns [ 3, 2 ] +* +* arr = ndarray2array( y ); +* // returns [ [ 5.0, 6.0 ], [ 3.0, 4.0 ], [ 1.0, 2.0 ] ] +*/ +declare function sliceDimension( x: float32ndarray, dim: number, s: SliceArgument, options?: Options ): float32ndarray; + +/** +* Returns a read-only view of an input ndarray when sliced along a specified dimension. +* +* @param x - input array +* @param dim - index of dimension to slice +* @param s - slice object or an integer +* @param options - function options +* @param options.strict - boolean indicating whether to enforce strict bounds checking +* @returns output array +* +* @example +* var Slice = require( `@stdlib/slice/ctor` ); +* var typedarray = require( `@stdlib/array/typed` ); +* var ndarray = require( `@stdlib/ndarray/ctor` ); +* var ndarray2array = require( `@stdlib/ndarray/to-array` ); +* +* var buffer = typedarray( [ 1, 2, 3, 4, 5, 6 ], 'int32' ); +* var shape = [ 3, 2 ]; +* var strides = [ 2, 1 ]; +* var offset = 0; +* +* var x = ndarray( 'int32', buffer, shape, strides, offset, 'row-major' ); +* // returns +* +* var sh = x.shape; +* // returns [ 3, 2 ] +* +* var arr = ndarray2array( x ); +* // returns [ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ] ] +* +* var s = new Slice( null, null, -1 ); +* // returns +* +* var y = sliceDimension( x, 0, s ); +* // returns +* +* sh = y.shape; +* // returns [ 3, 2 ] +* +* arr = ndarray2array( y ); +* // returns [ [ 5, 6 ], [ 3, 4 ], [ 1, 2 ] ] +*/ +declare function sliceDimension( x: int32ndarray, dim: number, s: SliceArgument, options?: Options ): int32ndarray; + +/** +* Returns a read-only view of an input ndarray when sliced along a specified dimension. +* +* @param x - input array +* @param dim - index of dimension to slice +* @param s - slice object or an integer +* @param options - function options +* @param options.strict - boolean indicating whether to enforce strict bounds checking +* @returns output array +* +* @example +* var Slice = require( `@stdlib/slice/ctor` ); +* var typedarray = require( `@stdlib/array/typed` ); +* var ndarray = require( `@stdlib/ndarray/ctor` ); +* var ndarray2array = require( `@stdlib/ndarray/to-array` ); +* +* var buffer = typedarray( [ 1, 2, 3, 4, 5, 6 ], 'int16' ); +* var shape = [ 3, 2 ]; +* var strides = [ 2, 1 ]; +* var offset = 0; +* +* var x = ndarray( 'int16', buffer, shape, strides, offset, 'row-major' ); +* // returns +* +* var sh = x.shape; +* // returns [ 3, 2 ] +* +* var arr = ndarray2array( x ); +* // returns [ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ] ] +* +* var s = new Slice( null, null, -1 ); +* // returns +* +* var y = sliceDimension( x, 0, s ); +* // returns +* +* sh = y.shape; +* // returns [ 3, 2 ] +* +* arr = ndarray2array( y ); +* // returns [ [ 5, 6 ], [ 3, 4 ], [ 1, 2 ] ] +*/ +declare function sliceDimension( x: int16ndarray, dim: number, s: SliceArgument, options?: Options ): int16ndarray; + +/** +* Returns a read-only view of an input ndarray when sliced along a specified dimension. +* +* @param x - input array +* @param dim - index of dimension to slice +* @param s - slice object or an integer +* @param options - function options +* @param options.strict - boolean indicating whether to enforce strict bounds checking +* @returns output array +* +* @example +* var Slice = require( `@stdlib/slice/ctor` ); +* var typedarray = require( `@stdlib/array/typed` ); +* var ndarray = require( `@stdlib/ndarray/ctor` ); +* var ndarray2array = require( `@stdlib/ndarray/to-array` ); +* +* var buffer = typedarray( [ 1, 2, 3, 4, 5, 6 ], 'int8' ); +* var shape = [ 3, 2 ]; +* var strides = [ 2, 1 ]; +* var offset = 0; +* +* var x = ndarray( 'int8', buffer, shape, strides, offset, 'row-major' ); +* // returns +* +* var sh = x.shape; +* // returns [ 3, 2 ] +* +* var arr = ndarray2array( x ); +* // returns [ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ] ] +* +* var s = new Slice( null, null, -1 ); +* // returns +* +* var y = sliceDimension( x, 0, s ); +* // returns +* +* sh = y.shape; +* // returns [ 3, 2 ] +* +* arr = ndarray2array( y ); +* // returns [ [ 5, 6 ], [ 3, 4 ], [ 1, 2 ] ] +*/ +declare function sliceDimension( x: int8ndarray, dim: number, s: SliceArgument, options?: Options ): int8ndarray; + +/** +* Returns a read-only view of an input ndarray when sliced along a specified dimension. +* +* @param x - input array +* @param dim - index of dimension to slice +* @param s - slice object or an integer +* @param options - function options +* @param options.strict - boolean indicating whether to enforce strict bounds checking +* @returns output array +* +* @example +* var Slice = require( `@stdlib/slice/ctor` ); +* var typedarray = require( `@stdlib/array/typed` ); +* var ndarray = require( `@stdlib/ndarray/ctor` ); +* var ndarray2array = require( `@stdlib/ndarray/to-array` ); +* +* var buffer = typedarray( [ 1, 2, 3, 4, 5, 6 ], 'uint32' ); +* var shape = [ 3, 2 ]; +* var strides = [ 2, 1 ]; +* var offset = 0; +* +* var x = ndarray( 'uint32', buffer, shape, strides, offset, 'row-major' ); +* // returns +* +* var sh = x.shape; +* // returns [ 3, 2 ] +* +* var arr = ndarray2array( x ); +* // returns [ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ] ] +* +* var s = new Slice( null, null, -1 ); +* // returns +* +* var y = sliceDimension( x, 0, s ); +* // returns +* +* sh = y.shape; +* // returns [ 3, 2 ] +* +* arr = ndarray2array( y ); +* // returns [ [ 5, 6 ], [ 3, 4 ], [ 1, 2 ] ] +*/ +declare function sliceDimension( x: uint32ndarray, dim: number, s: SliceArgument, options?: Options ): uint32ndarray; + +/** +* Returns a read-only view of an input ndarray when sliced along a specified dimension. +* +* @param x - input array +* @param dim - index of dimension to slice +* @param s - slice object or an integer +* @param options - function options +* @param options.strict - boolean indicating whether to enforce strict bounds checking +* @returns output array +* +* @example +* var Slice = require( `@stdlib/slice/ctor` ); +* var typedarray = require( `@stdlib/array/typed` ); +* var ndarray = require( `@stdlib/ndarray/ctor` ); +* var ndarray2array = require( `@stdlib/ndarray/to-array` ); +* +* var buffer = typedarray( [ 1, 2, 3, 4, 5, 6 ], 'uint16' ); +* var shape = [ 3, 2 ]; +* var strides = [ 2, 1 ]; +* var offset = 0; +* +* var x = ndarray( 'uint16', buffer, shape, strides, offset, 'row-major' ); +* // returns +* +* var sh = x.shape; +* // returns [ 3, 2 ] +* +* var arr = ndarray2array( x ); +* // returns [ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ] ] +* +* var s = new Slice( null, null, -1 ); +* // returns +* +* var y = sliceDimension( x, 0, s ); +* // returns +* +* sh = y.shape; +* // returns [ 3, 2 ] +* +* arr = ndarray2array( y ); +* // returns [ [ 5, 6 ], [ 3, 4 ], [ 1, 2 ] ] +*/ +declare function sliceDimension( x: uint16ndarray, dim: number, s: SliceArgument, options?: Options ): uint16ndarray; + +/** +* Returns a read-only view of an input ndarray when sliced along a specified dimension. +* +* @param x - input array +* @param dim - index of dimension to slice +* @param s - slice object or an integer +* @param options - function options +* @param options.strict - boolean indicating whether to enforce strict bounds checking +* @returns output array +* +* @example +* var Slice = require( `@stdlib/slice/ctor` ); +* var typedarray = require( `@stdlib/array/typed` ); +* var ndarray = require( `@stdlib/ndarray/ctor` ); +* var ndarray2array = require( `@stdlib/ndarray/to-array` ); +* +* var buffer = typedarray( [ 1, 2, 3, 4, 5, 6 ], 'uint8' ); +* var shape = [ 3, 2 ]; +* var strides = [ 2, 1 ]; +* var offset = 0; +* +* var x = ndarray( 'uint8', buffer, shape, strides, offset, 'row-major' ); +* // returns +* +* var sh = x.shape; +* // returns [ 3, 2 ] +* +* var arr = ndarray2array( x ); +* // returns [ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ] ] +* +* var s = new Slice( null, null, -1 ); +* // returns +* +* var y = sliceDimension( x, 0, s ); +* // returns +* +* sh = y.shape; +* // returns [ 3, 2 ] +* +* arr = ndarray2array( y ); +* // returns [ [ 5, 6 ], [ 3, 4 ], [ 1, 2 ] ] +*/ +declare function sliceDimension( x: uint8ndarray, dim: number, s: SliceArgument, options?: Options ): uint8ndarray; + +/** +* Returns a read-only view of an input ndarray when sliced along a specified dimension. +* +* @param x - input array +* @param dim - index of dimension to slice +* @param s - slice object or an integer +* @param options - function options +* @param options.strict - boolean indicating whether to enforce strict bounds checking +* @returns output array +* +* @example +* var Slice = require( `@stdlib/slice/ctor` ); +* var typedarray = require( `@stdlib/array/typed` ); +* var ndarray = require( `@stdlib/ndarray/ctor` ); +* var ndarray2array = require( `@stdlib/ndarray/to-array` ); +* +* var buffer = typedarray( [ 1, 2, 3, 4, 5, 6 ], 'uint8c' ); +* var shape = [ 3, 2 ]; +* var strides = [ 2, 1 ]; +* var offset = 0; +* +* var x = ndarray( 'uint8c', buffer, shape, strides, offset, 'row-major' ); +* // returns +* +* var sh = x.shape; +* // returns [ 3, 2 ] +* +* var arr = ndarray2array( x ); +* // returns [ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ] ] +* +* var s = new Slice( null, null, -1 ); +* // returns +* +* var y = sliceDimension( x, 0, s ); +* // returns +* +* sh = y.shape; +* // returns [ 3, 2 ] +* +* arr = ndarray2array( y ); +* // returns [ [ 5, 6 ], [ 3, 4 ], [ 1, 2 ] ] +*/ +declare function sliceDimension( x: uint8cndarray, dim: number, s: SliceArgument, options?: Options ): uint8cndarray; + +/** +* Returns a read-only view of an input ndarray when sliced along a specified dimension. +* +* @param x - input array +* @param dim - index of dimension to slice +* @param s - slice object or an integer +* @param options - function options +* @param options.strict - boolean indicating whether to enforce strict bounds checking +* @returns output array +* +* @example +* var Slice = require( `@stdlib/slice/ctor` ); +* var typedarray = require( `@stdlib/array/typed` ); +* var ndarray = require( `@stdlib/ndarray/ctor` ); +* var ndarray2array = require( `@stdlib/ndarray/to-array` ); +* +* var buffer = typedarray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ], 'complex128' ); +* var shape = [ 3, 2 ]; +* var strides = [ 2, 1 ]; +* var offset = 0; +* +* var x = ndarray( 'complex128', buffer, shape, strides, offset, 'row-major' ); +* // returns +* +* var sh = x.shape; +* // returns [ 3, 2 ] +* +* var s = new Slice( null, null, -1 ); +* // returns +* +* var y = sliceDimension( x, 0, s ); +* // returns +* +* sh = y.shape; +* // returns [ 3, 2 ] +*/ +declare function sliceDimension( x: complex128ndarray, dim: number, s: SliceArgument, options?: Options ): complex128ndarray; + +/** +* Returns a read-only view of an input ndarray when sliced along a specified dimension. +* +* @param x - input array +* @param dim - index of dimension to slice +* @param s - slice object or an integer +* @param options - function options +* @param options.strict - boolean indicating whether to enforce strict bounds checking +* @returns output array +* +* @example +* var Slice = require( `@stdlib/slice/ctor` ); +* var typedarray = require( `@stdlib/array/typed` ); +* var ndarray = require( `@stdlib/ndarray/ctor` ); +* var ndarray2array = require( `@stdlib/ndarray/to-array` ); +* +* var buffer = typedarray( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ], 'complex64' ); +* var shape = [ 3, 2 ]; +* var strides = [ 2, 1 ]; +* var offset = 0; +* +* var x = ndarray( 'complex64', buffer, shape, strides, offset, 'row-major' ); +* // returns +* +* var sh = x.shape; +* // returns [ 3, 2 ] +* +* var s = new Slice( null, null, -1 ); +* // returns +* +* var y = sliceDimension( x, 0, s ); +* // returns +* +* sh = y.shape; +* // returns [ 3, 2 ] +*/ +declare function sliceDimension( x: complex64ndarray, dim: number, s: SliceArgument, options?: Options ): complex64ndarray; + +/** +* Returns a read-only view of an input ndarray when sliced along a specified dimension. +* +* @param x - input array +* @param dim - index of dimension to slice +* @param s - slice object or an integer +* @param options - function options +* @param options.strict - boolean indicating whether to enforce strict bounds checking +* @returns output array +* +* @example +* var Slice = require( `@stdlib/slice/ctor` ); +* var typedarray = require( `@stdlib/array/typed` ); +* var ndarray = require( `@stdlib/ndarray/ctor` ); +* var ndarray2array = require( `@stdlib/ndarray/to-array` ); +* +* var buffer = [ 1, 2, 3, 4, 5, 6 ]; +* var shape = [ 3, 2 ]; +* var strides = [ 2, 1 ]; +* var offset = 0; +* +* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' ); +* // returns +* +* var sh = x.shape; +* // returns [ 3, 2 ] +* +* var arr = ndarray2array( x ); +* // returns [ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ] ] +* +* var s = new Slice( null, null, -1 ); +* // returns +* +* var y = sliceDimension( x, 0, s ); +* // returns +* +* sh = y.shape; +* // returns [ 3, 2 ] +* +* arr = ndarray2array( y ); +* // returns [ [ 5, 6 ], [ 3, 4 ], [ 1, 2 ] ] +*/ +declare function sliceDimension( x: genericndarray, dim: number, s: SliceArgument, options?: Options ): genericndarray; + +/** +* Returns a read-only view of an input ndarray when sliced along a specified dimension. +* +* @param x - input array +* @param dim - index of dimension to slice +* @param s - slice object or an integer +* @param options - function options +* @param options.strict - boolean indicating whether to enforce strict bounds checking +* @returns output array +* +* @example +* var Slice = require( `@stdlib/slice/ctor` ); +* var typedarray = require( `@stdlib/array/typed` ); +* var ndarray = require( `@stdlib/ndarray/ctor` ); +* var ndarray2array = require( `@stdlib/ndarray/to-array` ); +* +* var buffer = [ 1, 2, 3, 4, 5, 6 ]; +* var shape = [ 3, 2 ]; +* var strides = [ 2, 1 ]; +* var offset = 0; +* +* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' ); +* // returns +* +* var sh = x.shape; +* // returns [ 3, 2 ] +* +* var arr = ndarray2array( x ); +* // returns [ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ] ] +* +* var s = new Slice( null, null, -1 ); +* // returns +* +* var y = sliceDimension( x, 0, s ); +* // returns +* +* sh = y.shape; +* // returns [ 3, 2 ] +* +* arr = ndarray2array( y ); +* // returns [ [ 5, 6 ], [ 3, 4 ], [ 1, 2 ] ] +*/ +declare function sliceDimension( x: typedndarray, dim: number, s: SliceArgument, options?: Options ): typedndarray; + + +// EXPORTS // + +export = sliceDimension; diff --git a/slice-dimension/docs/types/test.ts b/slice-dimension/docs/types/test.ts new file mode 100644 index 00000000..12ccf150 --- /dev/null +++ b/slice-dimension/docs/types/test.ts @@ -0,0 +1,170 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2023 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +import empty = require( './../../../base/empty' ); +import Slice = require( '@stdlib/slice/ctor' ); +import sliceDimension = require( './index' ); + + +// TESTS // + +// The function returns an ndarray... +{ + const order = 'row-major'; + const sh = [ 2, 2 ]; + const s = new Slice( null ); + + sliceDimension( empty( 'float64', sh, order ), 1, s ); // $ExpectType float64ndarray + sliceDimension( empty( 'float32', sh, order ), 1, s ); // $ExpectType float32ndarray + sliceDimension( empty( 'complex128', sh, order ), 1, s ); // $ExpectType complex128ndarray + sliceDimension( empty( 'complex64', sh, order ), 1, s ); // $ExpectType complex64ndarray + sliceDimension( empty( 'int32', sh, order ), 1, s ); // $ExpectType int32ndarray + sliceDimension( empty( 'int16', sh, order ), 1, s ); // $ExpectType int16ndarray + sliceDimension( empty( 'int8', sh, order ), 1, s ); // $ExpectType int8ndarray + sliceDimension( empty( 'uint32', sh, order ), 1, s ); // $ExpectType uint32ndarray + sliceDimension( empty( 'uint16', sh, order ), 1, s ); // $ExpectType uint16ndarray + sliceDimension( empty( 'uint8', sh, order ), 1, s ); // $ExpectType uint8ndarray + sliceDimension( empty( 'uint8c', sh, order ), 1, s ); // $ExpectType uint8cndarray + + sliceDimension( empty( 'float64', sh, order ), 1, s, { 'strict': false } ); // $ExpectType float64ndarray + sliceDimension( empty( 'float32', sh, order ), 1, s, { 'strict': false } ); // $ExpectType float32ndarray + sliceDimension( empty( 'complex128', sh, order ), 1, s, { 'strict': false } ); // $ExpectType complex128ndarray + sliceDimension( empty( 'complex64', sh, order ), 1, s, { 'strict': false } ); // $ExpectType complex64ndarray + sliceDimension( empty( 'int32', sh, order ), 1, s, { 'strict': false } ); // $ExpectType int32ndarray + sliceDimension( empty( 'int16', sh, order ), 1, s, { 'strict': false } ); // $ExpectType int16ndarray + sliceDimension( empty( 'int8', sh, order ), 1, s, { 'strict': false } ); // $ExpectType int8ndarray + sliceDimension( empty( 'uint32', sh, order ), 1, s, { 'strict': false } ); // $ExpectType uint32ndarray + sliceDimension( empty( 'uint16', sh, order ), 1, s, { 'strict': false } ); // $ExpectType uint16ndarray + sliceDimension( empty( 'uint8', sh, order ), 1, s, { 'strict': false } ); // $ExpectType uint8ndarray + sliceDimension( empty( 'uint8c', sh, order ), 1, s, { 'strict': false } ); // $ExpectType uint8cndarray + + sliceDimension( empty( 'float64', sh, order ), 1, s, { 'strict': true } ); // $ExpectType float64ndarray + sliceDimension( empty( 'float32', sh, order ), 1, s, { 'strict': true } ); // $ExpectType float32ndarray + sliceDimension( empty( 'complex128', sh, order ), 1, s, { 'strict': true } ); // $ExpectType complex128ndarray + sliceDimension( empty( 'complex64', sh, order ), 1, s, { 'strict': true } ); // $ExpectType complex64ndarray + sliceDimension( empty( 'int32', sh, order ), 1, s, { 'strict': true } ); // $ExpectType int32ndarray + sliceDimension( empty( 'int16', sh, order ), 1, s, { 'strict': true } ); // $ExpectType int16ndarray + sliceDimension( empty( 'int8', sh, order ), 1, s, { 'strict': true } ); // $ExpectType int8ndarray + sliceDimension( empty( 'uint32', sh, order ), 1, s, { 'strict': true } ); // $ExpectType uint32ndarray + sliceDimension( empty( 'uint16', sh, order ), 1, s, { 'strict': true } ); // $ExpectType uint16ndarray + sliceDimension( empty( 'uint8', sh, order ), 1, s, { 'strict': true } ); // $ExpectType uint8ndarray + sliceDimension( empty( 'uint8c', sh, order ), 1, s, { 'strict': true } ); // $ExpectType uint8cndarray +} + +// The compiler throws an error if the function is provided a first argument which is not an ndarray... +{ + const s = new Slice( null ); + + sliceDimension( '10', 1, s ); // $ExpectError + sliceDimension( 10, 1, s ); // $ExpectError + sliceDimension( false, 1, s ); // $ExpectError + sliceDimension( true, 1, s ); // $ExpectError + sliceDimension( null, 1, s ); // $ExpectError + sliceDimension( [], 1, s ); // $ExpectError + sliceDimension( {}, 1, s ); // $ExpectError + sliceDimension( ( x: number ): number => x, 1, s ); // $ExpectError + + sliceDimension( '10', 1, s, {} ); // $ExpectError + sliceDimension( 10, 1, s, {} ); // $ExpectError + sliceDimension( false, 1, s, {} ); // $ExpectError + sliceDimension( true, 1, s, {} ); // $ExpectError + sliceDimension( null, 1, s, {} ); // $ExpectError + sliceDimension( [], 1, s, {} ); // $ExpectError + sliceDimension( {}, 1, s, {} ); // $ExpectError + sliceDimension( ( x: number ): number => x, 1, s, {} ); // $ExpectError +} + +// The compiler throws an error if the function is provided a second argument which is not a number... +{ + const x = empty( 'float64', [ 2, 2 ], 'row-major' ); + const s = new Slice( null ); + + sliceDimension( x, '5', s ); // $ExpectError + sliceDimension( x, false, s ); // $ExpectError + sliceDimension( x, true, s ); // $ExpectError + sliceDimension( x, null, s ); // $ExpectError + sliceDimension( x, undefined, s ); // $ExpectError + sliceDimension( x, [ '5' ], s ); // $ExpectError + sliceDimension( x, {}, s ); // $ExpectError + sliceDimension( x, ( x: number ): number => x, s ); // $ExpectError + + sliceDimension( x, '5', s, {} ); // $ExpectError + sliceDimension( x, false, s, {} ); // $ExpectError + sliceDimension( x, true, s, {} ); // $ExpectError + sliceDimension( x, null, s, {} ); // $ExpectError + sliceDimension( x, undefined, s, {} ); // $ExpectError + sliceDimension( x, [ '5' ], s, {} ); // $ExpectError + sliceDimension( x, {}, s, {} ); // $ExpectError + sliceDimension( x, ( x: number ): number => x, s, {} ); // $ExpectError +} + +// The compiler throws an error if the function is provided a third argument which is not a valid slice argument... +{ + const x = empty( 'float64', [ 2, 2 ], 'row-major' ); + + sliceDimension( x, 1, '5' ); // $ExpectError + sliceDimension( x, 1, false ); // $ExpectError + sliceDimension( x, 1, true ); // $ExpectError + sliceDimension( x, 1, [ '5' ] ); // $ExpectError + sliceDimension( x, 1, {} ); // $ExpectError + sliceDimension( x, 1, ( x: number ): number => x ); // $ExpectError + + sliceDimension( x, 1, '5', {} ); // $ExpectError + sliceDimension( x, 1, false, {} ); // $ExpectError + sliceDimension( x, 1, true, {} ); // $ExpectError + sliceDimension( x, 1, [ '5' ], {} ); // $ExpectError + sliceDimension( x, 1, {}, {} ); // $ExpectError + sliceDimension( x, 1, ( x: number ): number => x, {} ); // $ExpectError +} + +// The compiler throws an error if the function is provided a fourth argument which is not an object... +{ + const x = empty( 'float64', [ 2, 2 ], 'row-major' ); + const s = new Slice( null ); + + sliceDimension( x, 1, s, '5' ); // $ExpectError + sliceDimension( x, 1, s, 5 ); // $ExpectError + sliceDimension( x, 1, s, true ); // $ExpectError + sliceDimension( x, 1, s, false ); // $ExpectError + sliceDimension( x, 1, s, null ); // $ExpectError + sliceDimension( x, 1, s, [ '5' ] ); // $ExpectError + sliceDimension( x, 1, s, ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided a `strict` option which is not a boolean... +{ + const x = empty( 'float64', [ 2, 2 ], 'row-major' ); + const s = new Slice( null ); + + sliceDimension( x, 1, s, { 'strict': '5' } ); // $ExpectError + sliceDimension( x, 1, s, { 'strict': 5 } ); // $ExpectError + sliceDimension( x, 1, s, { 'strict': null } ); // $ExpectError + sliceDimension( x, 1, s, { 'strict': [ '5' ] } ); // $ExpectError + sliceDimension( x, 1, s, { 'strict': {} } ); // $ExpectError + sliceDimension( x, 1, s, { 'strict': ( x: number ): number => x } ); // $ExpectError +} + +// The compiler throws an error if the function is provided an unsupported number of arguments... +{ + const x = empty( 'float64', [ 2, 2 ], 'row-major' ); + const s = new Slice( null ); + + sliceDimension( x ); // $ExpectError + sliceDimension( x, 1 ); // $ExpectError + sliceDimension( x, 1, s, {}, {} ); // $ExpectError +} diff --git a/slice-dimension/examples/index.js b/slice-dimension/examples/index.js new file mode 100644 index 00000000..a964a5eb --- /dev/null +++ b/slice-dimension/examples/index.js @@ -0,0 +1,85 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2023 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable new-cap */ + +'use strict'; + +var S = require( '@stdlib/slice/ctor' ); +var array = require( './../../array' ); +var ndarray2array = require( './../../to-array' ); +var zeroTo = require( '@stdlib/array/base/zero-to' ); +var sliceDimension = require( './../lib' ); + +// Alias `null` to allow for more compact indexing expressions: +var _ = null; + +// Create a linear ndarray buffer: +var buf = zeroTo( 27 ); + +// Create an ndarray: +var x = array( buf, { + 'shape': [ 3, 3, 3 ] +}); + +// Get each matrix... +var y1 = sliceDimension( x, 0, 0 ); +// returns + +var a1 = ndarray2array( y1 ); +console.log( a1 ); +// => [ [ 0, 1, 2 ], [ 3, 4, 5 ], [ 6, 7, 8 ] ] + +var y2 = sliceDimension( x, 0, 1 ); +// returns + +var a2 = ndarray2array( y2 ); +console.log( a2 ); +// => [ [ 9, 10, 11 ], [ 12, 13, 14 ], [ 15, 16, 17 ] ] + +var y3 = sliceDimension( x, 0, 2 ); +// returns + +var a3 = ndarray2array( y3 ); +console.log( a3 ); +// => [ [ 18, 19, 20 ], [ 21, 22, 23 ], [ 24, 25, 26 ] ] + +// Reverse the matrix order: +var s = S( _, _, -1 ); +var y4 = sliceDimension( x, 0, s ); +// returns + +var a4 = ndarray2array( y4 ); +console.log( a4 ); +// => [...] + +// Get the second rows from each matrix: +var y5 = sliceDimension( x, 1, 1 ); +// returns + +var a5 = ndarray2array( y5 ); +console.log( a5 ); +// => [ [ 3, 4, 5 ], [ 12, 13, 14 ], [ 21, 22, 23 ] ] + +// Get the second columns from each matrix: +var y6 = sliceDimension( x, 2, 1 ); +// returns + +var a6 = ndarray2array( y6 ); +console.log( a6 ); +// => [ [ 1, 4, 7 ], [ 10, 13, 16 ], [ 19, 22, 25 ] ] diff --git a/slice-dimension/lib/index.js b/slice-dimension/lib/index.js new file mode 100644 index 00000000..58edf0d6 --- /dev/null +++ b/slice-dimension/lib/index.js @@ -0,0 +1,66 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2023 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +/** +* Return a read-only view of an input ndarray when sliced along a specified dimension. +* +* @module @stdlib/ndarray/slice-dimension +* +* @example +* var Slice = require( '@stdlib/slice/ctor' ); +* var ndarray = require( '@stdlib/ndarray/ctor' ); +* var ndarray2array = require( '@stdlib/ndarray/to-array' ); +* var sliceDimension = require( '@stdlib/ndarray/slice-dimension' ); +* +* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ]; +* var shape = [ 3, 2 ]; +* var strides = [ 2, 1 ]; +* var offset = 0; +* +* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' ); +* // returns +* +* var sh = x.shape; +* // returns [ 3, 2 ] +* +* var arr = ndarray2array( x ); +* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ] +* +* var s = new Slice( null, null, -1 ); +* // returns +* +* var y = sliceDimension( x, 0, s ); +* // returns +* +* sh = y.shape; +* // returns [ 3, 2 ] +* +* arr = ndarray2array( y ); +* // returns [ [ 5.0, 6.0 ], [ 3.0, 4.0 ], [ 1.0, 2.0 ] ] +*/ + +// MODULES // + +var main = require( './main.js' ); + + +// EXPORTS // + +module.exports = main; diff --git a/slice-dimension/lib/main.js b/slice-dimension/lib/main.js new file mode 100644 index 00000000..b0ffc554 --- /dev/null +++ b/slice-dimension/lib/main.js @@ -0,0 +1,125 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2023 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var isPlainObject = require( '@stdlib/assert/is-plain-object' ); +var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive; +var isInteger = require( '@stdlib/assert/is-integer' ).isPrimitive; +var isndarrayLike = require( '@stdlib/assert/is-ndarray-like' ); +var isUndefined = require( '@stdlib/assert/is-undefined' ); +var isSlice = require( '@stdlib/assert/is-slice' ); +var isNull = require( '@stdlib/assert/is-null' ); +var hasOwnProp = require( '@stdlib/assert/has-own-property' ); +var Slice = require( '@stdlib/slice/ctor' ); +var base = require( './../../base/slice-dimension' ); +var format = require( '@stdlib/string/format' ); + + +// MAIN // + +/** +* Returns a read-only view of an input ndarray when sliced along a specified dimension. +* +* @param {ndarray} x - input array +* @param {integer} dim - index of dimension to slice +* @param {(Slice|integer|null|undefined)} s - slice argument +* @param {Options} [options] - options +* @param {boolean} [options.strict] - boolean indicating whether to enforce strict bounds checking +* @throws {TypeError} first argument must be an ndarray having one or more dimensions +* @throws {TypeError} second argument must be an integer +* @throws {TypeError} third argument must be either a Slice, integer, null, or undefined +* @throws {TypeError} options argument must be an object +* @throws {TypeError} must provide valid options +* @throws {RangeError} dimension index exceeds the number of dimensions +* @throws {RangeError} slice exceeds array bounds +* @returns {ndarray} ndarray view +* +* @example +* var Slice = require( '@stdlib/slice/ctor' ); +* var ndarray = require( '@stdlib/ndarray/ctor' ); +* var ndarray2array = require( '@stdlib/ndarray/to-array' ); +* +* var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ]; +* var shape = [ 3, 2 ]; +* var strides = [ 2, 1 ]; +* var offset = 0; +* +* var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' ); +* // returns +* +* var sh = x.shape; +* // returns [ 3, 2 ] +* +* var arr = ndarray2array( x ); +* // returns [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 5.0, 6.0 ] ] +* +* var s = new Slice( null, null, -1 ); +* // returns +* +* var y = sliceDimension( x, 0, s ); +* // returns +* +* sh = y.shape; +* // returns [ 3, 2 ] +* +* arr = ndarray2array( y ); +* // returns [ [ 5.0, 6.0 ], [ 3.0, 4.0 ], [ 1.0, 2.0 ] ] +*/ +function sliceDimension( x, dim, s ) { + var options; + var slice; + var opts; + + opts = { + 'strict': true + }; + if ( !isndarrayLike( x ) ) { + throw new TypeError( format( 'invalid argument. First argument must be an ndarray. Value: `%s`.', x ) ); + } + if ( !isInteger( dim ) ) { + throw new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', dim ) ); + } + if ( isInteger( s ) || isSlice( s ) ) { + slice = s; + } else if ( isNull( s ) || isUndefined( s ) ) { + slice = new Slice(); + } else { + throw new TypeError( format( 'invalid argument. Third argument must be either a Slice, integer, null, or undefined. Value: `%s`.', s ) ); + } + if ( arguments.length > 3 ) { + options = arguments[ 3 ]; + if ( !isPlainObject( options ) ) { + throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) ); + } + if ( hasOwnProp( options, 'strict' ) ) { + if ( !isBoolean( options.strict ) ) { + throw new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'strict', options.strict ) ); + } + opts.strict = options.strict; + } + } + return base( x, dim, slice, opts.strict, false ); +} + + +// EXPORTS // + +module.exports = sliceDimension; diff --git a/slice-dimension/package.json b/slice-dimension/package.json new file mode 100644 index 00000000..e4a3dcbb --- /dev/null +++ b/slice-dimension/package.json @@ -0,0 +1,65 @@ +{ + "name": "@stdlib/ndarray/slice-dimension", + "version": "0.0.0", + "description": "Return a read-only view of an input ndarray when sliced along a specified dimension.", + "license": "Apache-2.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "directories": { + "benchmark": "./benchmark", + "doc": "./docs", + "example": "./examples", + "lib": "./lib", + "test": "./test" + }, + "types": "./docs/types", + "scripts": {}, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "stdtypes", + "types", + "data", + "structure", + "vector", + "ndarray", + "matrix", + "slice", + "view", + "copy", + "select" + ] +} diff --git a/slice-dimension/test/test.js b/slice-dimension/test/test.js new file mode 100644 index 00000000..2147b6b7 --- /dev/null +++ b/slice-dimension/test/test.js @@ -0,0 +1,1218 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2023 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable object-curly-newline */ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var isndarrayLike = require( '@stdlib/assert/is-ndarray-like' ); +var isReadOnly = require( './../../base/assert/is-read-only' ); +var Slice = require( '@stdlib/slice/ctor' ); +var zeroTo = require( '@stdlib/array/base/zero-to' ); +var typedarray = require( '@stdlib/array/typed' ); +var array = require( './../../array' ); +var zeros = require( './../../zeros' ); +var numel = require( './../../base/numel' ); +var ndarray2array = require( './../../to-array' ); +var ctor = require( './../../ctor' ); +var sliceDimension = require( './../lib' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof sliceDimension, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function throws an error if provided a first argument which is not an ndarray', function test( t ) { + var values; + var i; + + values = [ + '5', + 5, + NaN, + true, + false, + null, + void 0, + [], + {}, + function noop() {} + ]; + + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + sliceDimension( value, 0, 0 ); + }; + } +}); + +tape( 'the function throws an error if provided a first argument which is not an ndarray (options)', function test( t ) { + var values; + var i; + + values = [ + '5', + 5, + NaN, + true, + false, + null, + void 0, + [], + {}, + function noop() {} + ]; + + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + sliceDimension( value, 0, 0, {} ); + }; + } +}); + +tape( 'the function throws an error if provided a second argument which is not an integer', function test( t ) { + var values; + var x; + var i; + + values = [ + '5', + 3.14, + NaN, + true, + false, + null, + void 0, + [], + {}, + function noop() {} + ]; + x = zeros( [ 2, 2 ] ); + + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + sliceDimension( x, value, 0 ); + }; + } +}); + +tape( 'the function throws an error if provided a second argument which is not an integer (options)', function test( t ) { + var values; + var x; + var i; + + values = [ + '5', + 3.14, + NaN, + true, + false, + null, + void 0, + [], + {}, + function noop() {} + ]; + x = zeros( [ 2, 2 ] ); + + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + sliceDimension( x, value, 0, {} ); + }; + } +}); + +tape( 'the function throws an error if provided a third argument which is not a valid slice argument', function test( t ) { + var values; + var x; + var i; + + values = [ + '5', + 3.14, + NaN, + true, + false, + [], + {}, + function noop() {} + ]; + x = zeros( [ 2, 2 ] ); + + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + sliceDimension( x, 0, value ); + }; + } +}); + +tape( 'the function throws an error if provided a third argument which is not a valid slice argument (options)', function test( t ) { + var values; + var x; + var i; + + values = [ + '5', + 3.14, + NaN, + true, + false, + [], + {}, + function noop() {} + ]; + x = zeros( [ 2, 2 ] ); + + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + sliceDimension( x, 0, value, {} ); + }; + } +}); + +tape( 'the function throws an error if provided an options argument which is not an object', function test( t ) { + var values; + var x; + var i; + + values = [ + '5', + 5, + NaN, + true, + false, + null, + void 0, + [], + function noop() {} + ]; + x = zeros( [ 2, 2 ] ); + + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + sliceDimension( x, 0, 0, value ); + }; + } +}); + +tape( 'the function throws an error if provided a `strict` option which is not a boolean', function test( t ) { + var values; + var x; + var i; + + values = [ + '5', + 5, + NaN, + null, + void 0, + [], + {}, + function noop() {} + ]; + x = zeros( [ 2, 2 ] ); + + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + sliceDimension( x, 0, 0, { + 'strict': value + }); + }; + } +}); + +tape( 'the function throws an error if provided a zero-dimensional array (default)', function test( t ) { + var values; + var i; + + values = [ + zeros( [] ) + ]; + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), TypeError, 'throws an error' ); + } + t.end(); + + function badValue( x ) { + return function badValue() { + sliceDimension( x, 0, 0 ); + }; + } +}); + +tape( 'the function throws an error if provided a zero-dimensional array (strict=false)', function test( t ) { + var values; + var i; + + values = [ + zeros( [] ) + ]; + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), TypeError, 'throws an error' ); + } + t.end(); + + function badValue( x ) { + return function badValue() { + sliceDimension( x, 0, 0, { + 'strict': false + }); + }; + } +}); + +tape( 'the function throws an error if provided a zero-dimensional array (strict=true)', function test( t ) { + var values; + var i; + + values = [ + zeros( [] ) + ]; + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), TypeError, 'throws an error' ); + } + t.end(); + + function badValue( x ) { + return function badValue() { + sliceDimension( x, 0, 0, { + 'strict': true + }); + }; + } +}); + +tape( 'the function throws an error if the dimension index exceeds the number of dimensions (default)', function test( t ) { + var values; + var i; + + values = [ + zeros( [ 1 ] ), + zeros( [ 1, 1 ] ), + zeros( [ 1, 1, 1 ] ), + zeros( [ 1, 1, 1, 1 ] ) + ]; + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ], 10 ), RangeError, 'throws an error when provided ' + values[ i ].shape.join( 'x' ) ); + t.throws( badValue( values[ i ], -10 ), RangeError, 'throws an error when provided ' + values[ i ].shape.join( 'x' ) ); + } + t.end(); + + function badValue( x, dim ) { + return function badValue() { + sliceDimension( x, dim, 0 ); + }; + } +}); + +tape( 'the function throws an error if the dimension index exceeds the number of dimensions (strict=false)', function test( t ) { + var values; + var i; + + values = [ + zeros( [ 1 ] ), + zeros( [ 1, 1 ] ), + zeros( [ 1, 1, 1 ] ), + zeros( [ 1, 1, 1, 1 ] ) + ]; + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ], 10 ), RangeError, 'throws an error when provided ' + values[ i ].shape.join( 'x' ) ); + t.throws( badValue( values[ i ], -10 ), RangeError, 'throws an error when provided ' + values[ i ].shape.join( 'x' ) ); + } + t.end(); + + function badValue( x, dim ) { + return function badValue() { + sliceDimension( x, dim, 0, { + 'strict': false + }); + }; + } +}); + +tape( 'the function throws an error if the dimension index exceeds the number of dimensions (strict=true)', function test( t ) { + var values; + var i; + + values = [ + zeros( [ 1 ] ), + zeros( [ 1, 1 ] ), + zeros( [ 1, 1, 1 ] ), + zeros( [ 1, 1, 1, 1 ] ) + ]; + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ], 10 ), RangeError, 'throws an error when provided ' + values[ i ].shape.join( 'x' ) ); + t.throws( badValue( values[ i ], -10 ), RangeError, 'throws an error when provided ' + values[ i ].shape.join( 'x' ) ); + } + t.end(); + + function badValue( x, dim ) { + return function badValue() { + sliceDimension( x, dim, 0, { + 'strict': true + }); + }; + } +}); + +tape( 'by default, the function throws an error when a slice exceeds array bounds', function test( t ) { + var values; + var slices; + var i; + + values = [ + zeros( [ 1 ] ), + zeros( [ 1, 1 ] ), + zeros( [ 1, 1, 1 ] ), + zeros( [ 1, 1, 1, 1 ] ) + ]; + + slices = [ + new Slice( 5, 20, 1 ), + 10, + new Slice( 7, 8, 1 ), + 20 + ]; + for ( i = 0; i < values.length; i++ ) { + t.throws( badValues( values[ i ], slices[ i ] ), RangeError, 'throws an error when provided ' + slices[ i ].toString() ); + } + t.end(); + + function badValues( x, s ) { + return function badValues() { + sliceDimension( x, 0, s ); + }; + } +}); + +tape( 'in strict mode, the function throws an error when a slice exceeds array bounds', function test( t ) { + var values; + var slices; + var i; + + values = [ + zeros( [ 1 ] ), + zeros( [ 1, 1 ] ), + zeros( [ 1, 1, 1 ] ), + zeros( [ 1, 1, 1, 1 ] ) + ]; + + slices = [ + new Slice( 5, 20, 1 ), + 10, + new Slice( 7, 8, 1 ), + 20 + ]; + for ( i = 0; i < values.length; i++ ) { + t.throws( badValues( values[ i ], slices[ i ] ), RangeError, 'throws an error when provided ' + slices[ i ].toString() ); + } + t.end(); + + function badValues( x, s ) { + return function badValues() { + sliceDimension( x, 0, s, { + 'strict': true + }); + }; + } +}); + +tape( 'in non-strict mode, the function returns an empty array when a slice exceeds array bounds', function test( t ) { + var actual; + var values; + var slices; + var i; + + values = [ + zeros( [ 1 ], { 'dtype': 'float64' } ), + zeros( [ 1, 1 ], { 'dtype': 'float32' } ), + zeros( [ 1, 1, 1 ], { 'dtype': 'int32' } ), + zeros( [ 1, 1, 1, 1 ], { 'dtype': 'uint32' } ), + zeros( [ 1, 1, 1, 1, 1 ], { 'dtype': 'complex128' } ) + ]; + + slices = [ + new Slice( 5, 20, 1 ), + 10, + new Slice( 7, 8, 1 ), + 20, + new Slice( -25, -50, -1 ) + ]; + for ( i = 0; i < values.length; i++ ) { + actual = sliceDimension( values[ i ], 0, slices[ i ], { + 'strict': false + }); + t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' ); + t.strictEqual( numel( actual.shape ), 0, 'returns expected value' ); + t.strictEqual( actual.dtype, values[ i ].dtype, 'returns expected value' ); + } + t.end(); +}); + +tape( 'if all dimensions are reduced, the function returns a zero-dimensional array view (non-base)', function test( t ) { + var expected; + var actual; + var values; + var slices; + var x; + var s; + var i; + + values = [ + array( typedarray( zeroTo( 4 ), 'float64' ), { + 'shape': [ 4 ], + 'dtype': 'float64' + }), + array( typedarray( zeroTo( 8 ), 'float32' ), { + 'shape': [ 8 ], + 'dtype': 'float32' + }), + array( typedarray( zeroTo( 2 ), 'int32' ), { + 'shape': [ 2 ], + 'dtype': 'int32' + }), + array( typedarray( zeroTo( 16 ), 'uint32' ), { + 'shape': [ 16 ], + 'dtype': 'uint32' + }) + ]; + slices = [ + 2, + 3, + 1, + 8 + ]; + expected = [ + 2, + 3, + 1, + 8 + ]; + for ( i = 0; i < values.length; i++ ) { + x = values[ i ]; + s = slices[ i ]; + actual = sliceDimension( x, 0, s ); + t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' ); + t.strictEqual( actual.dtype, x.dtype, 'returns expected value' ); + t.strictEqual( actual.ndims, 0, 'returns expected value' ); + t.strictEqual( actual.get(), expected[ i ], 'returns expected value' ); + t.strictEqual( actual.data, x.data, 'returns expected value' ); + t.strictEqual( isReadOnly( actual ), true, 'returns expected value' ); + } + t.end(); +}); + +tape( 'if all dimensions are reduced, the function returns a zero-dimensional array view (non-base, offset)', function test( t ) { + var actual; + var buf; + var ord; + var sh; + var st; + var dt; + var o; + var x; + var s; + + ord = 'row-major'; + dt = 'float64'; + buf = typedarray( zeroTo( 30 ), dt ); + + sh = [ 6 ]; + st = [ 2 ]; + o = 5; + x = new ctor( dt, buf, sh, st, o, ord ); + s = 1; + + actual = sliceDimension( x, 0, s ); + t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' ); + t.strictEqual( actual.dtype, x.dtype, 'returns expected value' ); + t.strictEqual( actual.ndims, 0, 'returns expected value' ); + t.strictEqual( actual.get(), 7, 'returns expected value' ); + t.strictEqual( actual.data, x.data, 'returns expected value' ); + t.strictEqual( isReadOnly( actual ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function returns a view of a provided input array (ndims=1)', function test( t ) { + var expected; + var actual; + var buf; + var ord; + var sh; + var st; + var o; + var x; + var s; + var i; + + buf = typedarray( zeroTo( 30 ), 'float64' ); + sh = [ 6 ]; + st = [ 2 ]; + o = 4; + ord = 'row-major'; + + x = new ctor( 'float64', buf, sh, st, o, ord ); + + s = null; + actual = sliceDimension( x, 0, s ); + + t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' ); + t.strictEqual( actual.ndims, 1, 'returns expected value' ); + t.strictEqual( actual.length, 6, 'returns expected value' ); + t.strictEqual( actual.dtype, x.dtype, 'returns expected value' ); + t.strictEqual( actual.data, x.data, 'returns expected value' ); + + expected = [ 4, 6, 8, 10, 12, 14 ]; + for ( i = 0; i < expected.length; i++ ) { + t.strictEqual( actual.iget( i ), expected[ i ], 'returns expected value' ); + } + + s = void 0; + actual = sliceDimension( x, 0, s ); + + t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' ); + t.strictEqual( actual.ndims, 1, 'returns expected value' ); + t.strictEqual( actual.length, 6, 'returns expected value' ); + t.strictEqual( actual.dtype, x.dtype, 'returns expected value' ); + t.strictEqual( actual.data, x.data, 'returns expected value' ); + + expected = [ 4, 6, 8, 10, 12, 14 ]; + for ( i = 0; i < expected.length; i++ ) { + t.strictEqual( actual.iget( i ), expected[ i ], 'returns expected value' ); + } + + s = new Slice( null ); + actual = sliceDimension( x, 0, s ); + + t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' ); + t.strictEqual( actual.ndims, 1, 'returns expected value' ); + t.strictEqual( actual.length, 6, 'returns expected value' ); + t.strictEqual( actual.dtype, x.dtype, 'returns expected value' ); + t.strictEqual( actual.data, x.data, 'returns expected value' ); + + expected = [ 4, 6, 8, 10, 12, 14 ]; + for ( i = 0; i < expected.length; i++ ) { + t.strictEqual( actual.iget( i ), expected[ i ], 'returns expected value' ); + } + + // Reverse order and skip every other element: + s = new Slice( null, null, -2 ); + actual = sliceDimension( x, 0, s ); + + t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' ); + t.strictEqual( actual.ndims, 1, 'returns expected value' ); + t.strictEqual( actual.length, 3, 'returns expected value' ); + t.strictEqual( actual.dtype, x.dtype, 'returns expected value' ); + t.strictEqual( actual.data, x.data, 'returns expected value' ); + + expected = [ 14, 10, 6 ]; + for ( i = 0; i < expected.length; i++ ) { + t.strictEqual( actual.iget( i ), expected[ i ], 'returns expected value' ); + } + + // Reverse order and skip every other element, starting from second-to-last element: + s = new Slice( 4, null, -2 ); + actual = sliceDimension( x, 0, s ); + + t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' ); + t.strictEqual( actual.ndims, 1, 'returns expected value' ); + t.strictEqual( actual.length, 3, 'returns expected value' ); + t.strictEqual( actual.dtype, x.dtype, 'returns expected value' ); + t.strictEqual( actual.data, x.data, 'returns expected value' ); + + expected = [ 12, 8, 4 ]; + for ( i = 0; i < expected.length; i++ ) { + t.strictEqual( actual.iget( i ), expected[ i ], 'returns expected value' ); + } + + // Skip every three elements, starting from second element: + s = new Slice( 1, null, 3 ); + actual = sliceDimension( x, 0, s ); + + t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' ); + t.strictEqual( actual.ndims, 1, 'returns expected value' ); + t.strictEqual( actual.length, 2, 'returns expected value' ); + t.strictEqual( actual.dtype, x.dtype, 'returns expected value' ); + t.strictEqual( actual.data, x.data, 'returns expected value' ); + + expected = [ 6, 12 ]; + for ( i = 0; i < expected.length; i++ ) { + t.strictEqual( actual.iget( i ), expected[ i ], 'returns expected value' ); + } + + // Get a sub-array: + s = new Slice( 4, 1, -1 ); + actual = sliceDimension( x, 0, s ); + + t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' ); + t.strictEqual( actual.ndims, 1, 'returns expected value' ); + t.strictEqual( actual.length, 3, 'returns expected value' ); + t.strictEqual( actual.dtype, x.dtype, 'returns expected value' ); + t.strictEqual( actual.data, x.data, 'returns expected value' ); + + expected = [ 12, 10, 8 ]; + for ( i = 0; i < expected.length; i++ ) { + t.strictEqual( actual.iget( i ), expected[ i ], 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function returns a view of a provided input array (ndims=2)', function test( t ) { + var expected; + var actual; + var buf; + var ord; + var sh; + var st; + var o; + var x; + var s; + + buf = typedarray( zeroTo( 30 ), 'float64' ); + sh = [ 4, 3 ]; + st = [ 6, 2 ]; + o = 4; + ord = 'row-major'; + + x = new ctor( 'float64', buf, sh, st, o, ord ); + + s = null; + actual = sliceDimension( x, 0, s ); + + t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' ); + t.strictEqual( actual.ndims, 2, 'returns expected value' ); + t.deepEqual( actual.shape, [ 4, 3 ], 'returns expected value' ); + t.strictEqual( actual.dtype, x.dtype, 'returns expected value' ); + t.strictEqual( actual.data, x.data, 'returns expected value' ); + + expected = [ + [ 4, 6, 8 ], + [ 10, 12, 14 ], + [ 16, 18, 20 ], + [ 22, 24, 26 ] + ]; + actual = ndarray2array( actual ); + t.deepEqual( actual, expected, 'returns expected value' ); + + s = void 0; + actual = sliceDimension( x, 1, s ); + + t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' ); + t.strictEqual( actual.ndims, 2, 'returns expected value' ); + t.deepEqual( actual.shape, [ 4, 3 ], 'returns expected value' ); + t.strictEqual( actual.dtype, x.dtype, 'returns expected value' ); + t.strictEqual( actual.data, x.data, 'returns expected value' ); + + expected = [ + [ 4, 6, 8 ], + [ 10, 12, 14 ], + [ 16, 18, 20 ], + [ 22, 24, 26 ] + ]; + actual = ndarray2array( actual ); + t.deepEqual( actual, expected, 'returns expected value' ); + + s = new Slice( null ); + actual = sliceDimension( x, 0, s ); + + t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' ); + t.strictEqual( actual.ndims, 2, 'returns expected value' ); + t.deepEqual( actual.shape, [ 4, 3 ], 'returns expected value' ); + t.strictEqual( actual.dtype, x.dtype, 'returns expected value' ); + t.strictEqual( actual.data, x.data, 'returns expected value' ); + + expected = [ + [ 4, 6, 8 ], + [ 10, 12, 14 ], + [ 16, 18, 20 ], + [ 22, 24, 26 ] + ]; + actual = ndarray2array( actual ); + t.deepEqual( actual, expected, 'returns expected value' ); + + s = new Slice( null ); + actual = sliceDimension( x, 1, s ); + + t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' ); + t.strictEqual( actual.ndims, 2, 'returns expected value' ); + t.deepEqual( actual.shape, [ 4, 3 ], 'returns expected value' ); + t.strictEqual( actual.dtype, x.dtype, 'returns expected value' ); + t.strictEqual( actual.data, x.data, 'returns expected value' ); + + expected = [ + [ 4, 6, 8 ], + [ 10, 12, 14 ], + [ 16, 18, 20 ], + [ 22, 24, 26 ] + ]; + actual = ndarray2array( actual ); + t.deepEqual( actual, expected, 'returns expected value' ); + + // Reverse order and skip every other element: + s = new Slice( null, null, -2 ); + actual = sliceDimension( x, 0, s ); + + t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' ); + t.strictEqual( actual.ndims, 2, 'returns expected value' ); + t.deepEqual( actual.shape, [ 2, 3 ], 'returns expected value' ); + t.strictEqual( actual.dtype, x.dtype, 'returns expected value' ); + t.strictEqual( actual.data, x.data, 'returns expected value' ); + + expected = [ + [ 22, 24, 26 ], + [ 10, 12, 14 ] + ]; + actual = ndarray2array( actual ); + t.deepEqual( actual, expected, 'returns expected value' ); + + s = new Slice( null, null, -2 ); + actual = sliceDimension( x, 1, s ); + + t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' ); + t.strictEqual( actual.ndims, 2, 'returns expected value' ); + t.deepEqual( actual.shape, [ 4, 2 ], 'returns expected value' ); + t.strictEqual( actual.dtype, x.dtype, 'returns expected value' ); + t.strictEqual( actual.data, x.data, 'returns expected value' ); + + expected = [ + [ 8, 4 ], + [ 14, 10 ], + [ 20, 16 ], + [ 26, 22 ] + ]; + actual = ndarray2array( actual ); + t.deepEqual( actual, expected, 'returns expected value' ); + + // Reverse order and skip every other element, starting from second-to-last element: + s = new Slice( -2, null, -2 ); + actual = sliceDimension( x, 0, s ); + + t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' ); + t.strictEqual( actual.ndims, 2, 'returns expected value' ); + t.deepEqual( actual.shape, [ 2, 3 ], 'returns expected value' ); + t.strictEqual( actual.dtype, x.dtype, 'returns expected value' ); + t.strictEqual( actual.data, x.data, 'returns expected value' ); + + expected = [ + [ 16, 18, 20 ], + [ 4, 6, 8 ] + ]; + actual = ndarray2array( actual ); + t.deepEqual( actual, expected, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function returns a view of a provided input array (ndims=2, partial reduction)', function test( t ) { + var expected; + var actual; + var buf; + var ord; + var sh; + var st; + var o; + var x; + var s; + + buf = typedarray( zeroTo( 30 ), 'float64' ); + sh = [ 4, 3 ]; + st = [ 6, 2 ]; + o = 5; + ord = 'row-major'; + + x = new ctor( 'float64', buf, sh, st, o, ord ); + + s = 1; + actual = sliceDimension( x, 0, s ); + + t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' ); + t.strictEqual( actual.ndims, 1, 'returns expected value' ); + t.deepEqual( actual.shape, [ 3 ], 'returns expected value' ); + t.strictEqual( actual.dtype, x.dtype, 'returns expected value' ); + t.strictEqual( actual.data, x.data, 'returns expected value' ); + + expected = [ 11, 13, 15 ]; + actual = ndarray2array( actual ); + t.deepEqual( actual, expected, 'returns expected value' ); + + s = 1; + actual = sliceDimension( x, 1, s ); + + t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' ); + t.strictEqual( actual.ndims, 1, 'returns expected value' ); + t.deepEqual( actual.shape, [ 4 ], 'returns expected value' ); + t.strictEqual( actual.dtype, x.dtype, 'returns expected value' ); + t.strictEqual( actual.data, x.data, 'returns expected value' ); + + expected = [ 7, 13, 19, 25 ]; + actual = ndarray2array( actual ); + t.deepEqual( actual, expected, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function returns a view of a provided input array (ndims=3)', function test( t ) { + var expected; + var actual; + var buf; + var ord; + var sh; + var st; + var o; + var x; + var s; + + buf = typedarray( zeroTo( 100 ), 'float64' ); + sh = [ 2, 4, 3 ]; + st = [ 24, 6, 2 ]; + o = 10; + ord = 'row-major'; + + x = new ctor( 'float64', buf, sh, st, o, ord ); + + s = null; + actual = sliceDimension( x, 0, s ); + + t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' ); + t.strictEqual( actual.ndims, 3, 'returns expected value' ); + t.deepEqual( actual.shape, [ 2, 4, 3 ], 'returns expected value' ); + t.strictEqual( actual.dtype, x.dtype, 'returns expected value' ); + t.strictEqual( actual.data, x.data, 'returns expected value' ); + + expected = [ + [ + [ 10, 12, 14 ], + [ 16, 18, 20 ], + [ 22, 24, 26 ], + [ 28, 30, 32 ] + ], + [ + [ 34, 36, 38 ], + [ 40, 42, 44 ], + [ 46, 48, 50 ], + [ 52, 54, 56 ] + ] + ]; + actual = ndarray2array( actual ); + t.deepEqual( actual, expected, 'returns expected value' ); + + s = void 0; + actual = sliceDimension( x, 1, s ); + + t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' ); + t.strictEqual( actual.ndims, 3, 'returns expected value' ); + t.deepEqual( actual.shape, [ 2, 4, 3 ], 'returns expected value' ); + t.strictEqual( actual.dtype, x.dtype, 'returns expected value' ); + t.strictEqual( actual.data, x.data, 'returns expected value' ); + + expected = [ + [ + [ 10, 12, 14 ], + [ 16, 18, 20 ], + [ 22, 24, 26 ], + [ 28, 30, 32 ] + ], + [ + [ 34, 36, 38 ], + [ 40, 42, 44 ], + [ 46, 48, 50 ], + [ 52, 54, 56 ] + ] + ]; + actual = ndarray2array( actual ); + t.deepEqual( actual, expected, 'returns expected value' ); + + s = new Slice( null ); + actual = sliceDimension( x, 0, s ); + + t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' ); + t.strictEqual( actual.ndims, 3, 'returns expected value' ); + t.deepEqual( actual.shape, [ 2, 4, 3 ], 'returns expected value' ); + t.strictEqual( actual.dtype, x.dtype, 'returns expected value' ); + t.strictEqual( actual.data, x.data, 'returns expected value' ); + + expected = [ + [ + [ 10, 12, 14 ], + [ 16, 18, 20 ], + [ 22, 24, 26 ], + [ 28, 30, 32 ] + ], + [ + [ 34, 36, 38 ], + [ 40, 42, 44 ], + [ 46, 48, 50 ], + [ 52, 54, 56 ] + ] + ]; + actual = ndarray2array( actual ); + t.deepEqual( actual, expected, 'returns expected value' ); + + s = new Slice( null ); + actual = sliceDimension( x, 1, s ); + + t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' ); + t.strictEqual( actual.ndims, 3, 'returns expected value' ); + t.deepEqual( actual.shape, [ 2, 4, 3 ], 'returns expected value' ); + t.strictEqual( actual.dtype, x.dtype, 'returns expected value' ); + t.strictEqual( actual.data, x.data, 'returns expected value' ); + + expected = [ + [ + [ 10, 12, 14 ], + [ 16, 18, 20 ], + [ 22, 24, 26 ], + [ 28, 30, 32 ] + ], + [ + [ 34, 36, 38 ], + [ 40, 42, 44 ], + [ 46, 48, 50 ], + [ 52, 54, 56 ] + ] + ]; + actual = ndarray2array( actual ); + t.deepEqual( actual, expected, 'returns expected value' ); + + s = new Slice( null ); + actual = sliceDimension( x, 2, s ); + + t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' ); + t.strictEqual( actual.ndims, 3, 'returns expected value' ); + t.deepEqual( actual.shape, [ 2, 4, 3 ], 'returns expected value' ); + t.strictEqual( actual.dtype, x.dtype, 'returns expected value' ); + t.strictEqual( actual.data, x.data, 'returns expected value' ); + + expected = [ + [ + [ 10, 12, 14 ], + [ 16, 18, 20 ], + [ 22, 24, 26 ], + [ 28, 30, 32 ] + ], + [ + [ 34, 36, 38 ], + [ 40, 42, 44 ], + [ 46, 48, 50 ], + [ 52, 54, 56 ] + ] + ]; + actual = ndarray2array( actual ); + t.deepEqual( actual, expected, 'returns expected value' ); + + // Reverse order: + s = new Slice( null, null, -1 ); + actual = sliceDimension( x, 0, s ); + + t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' ); + t.strictEqual( actual.ndims, 3, 'returns expected value' ); + t.deepEqual( actual.shape, [ 2, 4, 3 ], 'returns expected value' ); + t.strictEqual( actual.dtype, x.dtype, 'returns expected value' ); + t.strictEqual( actual.data, x.data, 'returns expected value' ); + + expected = [ + [ + [ 34, 36, 38 ], + [ 40, 42, 44 ], + [ 46, 48, 50 ], + [ 52, 54, 56 ] + ], + [ + [ 10, 12, 14 ], + [ 16, 18, 20 ], + [ 22, 24, 26 ], + [ 28, 30, 32 ] + ] + + ]; + actual = ndarray2array( actual ); + t.deepEqual( actual, expected, 'returns expected value' ); + + s = new Slice( null, null, -1 ); + actual = sliceDimension( x, 2, s ); + + t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' ); + t.strictEqual( actual.ndims, 3, 'returns expected value' ); + t.deepEqual( actual.shape, [ 2, 4, 3 ], 'returns expected value' ); + t.strictEqual( actual.dtype, x.dtype, 'returns expected value' ); + t.strictEqual( actual.data, x.data, 'returns expected value' ); + + expected = [ + [ + [ 14, 12, 10 ], + [ 20, 18, 16 ], + [ 26, 24, 22 ], + [ 32, 30, 28 ] + ], + [ + [ 38, 36, 34 ], + [ 44, 42, 40 ], + [ 50, 48, 46 ], + [ 56, 54, 52 ] + ] + + ]; + actual = ndarray2array( actual ); + t.deepEqual( actual, expected, 'returns expected value' ); + + // Skip elements: + s = new Slice( null, null, 2 ); + actual = sliceDimension( x, 1, s ); + + t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' ); + t.strictEqual( actual.ndims, 3, 'returns expected value' ); + t.deepEqual( actual.shape, [ 2, 2, 3 ], 'returns expected value' ); + t.strictEqual( actual.dtype, x.dtype, 'returns expected value' ); + t.strictEqual( actual.data, x.data, 'returns expected value' ); + + expected = [ + [ + [ 10, 12, 14 ], + [ 22, 24, 26 ] + ], + [ + [ 34, 36, 38 ], + [ 46, 48, 50 ] + ] + + ]; + actual = ndarray2array( actual ); + t.deepEqual( actual, expected, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function returns a view of a provided input array (ndims=3, partial reduction)', function test( t ) { + var expected; + var actual; + var buf; + var ord; + var sh; + var st; + var o; + var x; + var s; + + buf = typedarray( zeroTo( 100 ), 'float64' ); + sh = [ 2, 4, 3 ]; + st = [ -24, -6, -2 ]; + o = 99; + ord = 'row-major'; + + x = new ctor( 'float64', buf, sh, st, o, ord ); + + s = 1; + actual = sliceDimension( x, 0, s ); + + t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' ); + t.strictEqual( actual.ndims, 2, 'returns expected value' ); + t.deepEqual( actual.shape, [ 4, 3 ], 'returns expected value' ); + t.strictEqual( actual.dtype, x.dtype, 'returns expected value' ); + t.strictEqual( actual.data, x.data, 'returns expected value' ); + + expected = [ + [ 75, 73, 71 ], + [ 69, 67, 65 ], + [ 63, 61, 59 ], + [ 57, 55, 53 ] + ]; + actual = ndarray2array( actual ); + t.deepEqual( actual, expected, 'returns expected value' ); + + s = 2; + actual = sliceDimension( x, 1, s ); + + t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' ); + t.strictEqual( actual.ndims, 2, 'returns expected value' ); + t.deepEqual( actual.shape, [ 2, 3 ], 'returns expected value' ); + t.strictEqual( actual.dtype, x.dtype, 'returns expected value' ); + t.strictEqual( actual.data, x.data, 'returns expected value' ); + + expected = [ + [ 87, 85, 83 ], + [ 63, 61, 59 ] + ]; + actual = ndarray2array( actual ); + t.deepEqual( actual, expected, 'returns expected value' ); + + s = 0; + actual = sliceDimension( x, 2, s ); + + t.strictEqual( isndarrayLike( actual ), true, 'returns expected value' ); + t.strictEqual( actual.ndims, 2, 'returns expected value' ); + t.deepEqual( actual.shape, [ 2, 4 ], 'returns expected value' ); + t.strictEqual( actual.dtype, x.dtype, 'returns expected value' ); + t.strictEqual( actual.data, x.data, 'returns expected value' ); + + expected = [ + [ 99, 93, 87, 81 ], + [ 75, 69, 63, 57 ] + ]; + actual = ndarray2array( actual ); + t.deepEqual( actual, expected, 'returns expected value' ); + + t.end(); +}); diff --git a/zeros-like/package.json b/zeros-like/package.json index 9ea24702..162ebdbd 100644 --- a/zeros-like/package.json +++ b/zeros-like/package.json @@ -59,6 +59,7 @@ "matrix", "fill", "filled", - "zeros" + "zeros", + "numpy.zeros_like" ] } diff --git a/zeros/package.json b/zeros/package.json index 630b65f1..6c972228 100644 --- a/zeros/package.json +++ b/zeros/package.json @@ -59,6 +59,7 @@ "matrix", "fill", "filled", - "zeros" + "zeros", + "numpy.zeros" ] }