diff --git a/.github/.keepalive b/.github/.keepalive
deleted file mode 100644
index a4586f26..00000000
--- a/.github/.keepalive
+++ /dev/null
@@ -1 +0,0 @@
-2023-10-01T05:44:13.972Z
diff --git a/README.md b/README.md
index 19d15c56..513c4064 100644
--- a/README.md
+++ b/README.md
@@ -85,7 +85,7 @@ The namespace exports the following functions to create multidimensional arrays:
The namespace contains the following sub-namespaces:
-
+
diff --git a/dist/index.js b/dist/index.js
index f55f8d42..fbd6e9fa 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -1,4 +1,4 @@
-"use strict";var C=function(r,e){return function(){return e||r((e={exports:{}}).exports,e),e.exports}};var Pi=C(function(CN,zi){"use strict";function bx(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 Sx(r){var e,a,i;for(e=[],a=1,i=0;i=0;v--)e[v]=i,i*=r[v];return e}function _x(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}Zi.exports=Ax});var Re=C(function(BN,Xi){"use strict";var Rx=Ji();Xi.exports=Rx});var Wi=C(function(UN,Qi){"use strict";function Nx(r){var e,a,i;if(e=r.length,e===0)return 0;for(a=1,i=0;i0?t+=o*(r[s]-1):o<0&&(v+=o*(r[s]-1))}return[v,t]}wt.exports=i3});var Et=C(function(tD,_t){"use strict";function t3(r,e,a,i){var v,t,o,s,u;for(v=r.length,t=a,o=a,u=0;u0?o+=s*(r[u]-1):s<0&&(t+=s*(r[u]-1))}return i[0]=t,i[1]=o,i}_t.exports=t3});var ne=C(function(vD,Tt){"use strict";var v3=require("@stdlib/utils/define-nonenumerable-read-only-property"),Ot=jt(),s3=Et();v3(Ot,"assign",s3);Tt.exports=Ot});var kt=C(function(sD,It){"use strict";var o3=ne();function n3(r,e,a,i){var v=o3(e,a,i);return v[0]>=0&&v[1]=0;o--)t=r%a[o],r-=t,r/=a[o],v+=t*e[o];return this._accessors?this._buffer.get(v):this._buffer[v]}Zt.exports=b3});var Qt=C(function(hD,Xt){"use strict";function S3(r,e){var a,i,v,t,o,s;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(s=0;s=0;s--)o=r%i[s],r-=o,r/=i[s],t+=o*a[s];return this._accessors?this._buffer.set(e,t):this._buffer[t]=e,this}Xt.exports=S3});var Ht=C(function(qD,Wt){"use strict";function w3(){var r,e;for(r=this._offset,e=0;e=0;o--)t=this.iget(this._length-1-o),r+=za(t)+", "+Pa(t),o>0&&(r+=", ");else for(o=2;o>=0;o--)r+=this.iget(this._length-1-o),o>0&&(r+=", ")}if(a=I3[this.dtype],i+=T3(a,"{{data}}",r),i+=", ",e===0?i+="[]":i+="[ "+this._shape.join(", ")+" ]",i+=", ",i+="[ ",e===0)i+="0";else for(o=0;oe?e:r}Ev.exports=jh});var Ba=C(function(CD,Tv){"use strict";var _h=Ov();Tv.exports=_h});var kv=C(function(LD,Iv){"use strict";function Eh(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)}Iv.exports=Eh});var Ua=C(function(zD,Av){"use strict";var Oh=kv();Av.exports=Oh});var Nv=C(function(PD,Rv){"use strict";var Th=Ba(),Ih=Ua(),kh=require("@stdlib/string/format");function Ah(r,e,a){if(a==="clamp")return Th(r,e);if(a==="wrap")return Ih(r,e);if(r<0||r>e)throw new RangeError(kh("invalid argument. Index must be on the interval: [0, %d]. Value: `%d`.",e,r));return r}Rv.exports=Ah});var be=C(function(MD,Dv){"use strict";var Rh=Nv();Dv.exports=Rh});var zv=C(function(VD,Lv){"use strict";var Nh=require("@stdlib/assert/is-integer").isPrimitive,Dh=be(),Ch=$r(),Lh=require("@stdlib/string/format"),Cv=Ch.prototype.iget;function zh(r){if(this._ndims>0){if(!Nh(r))throw new TypeError(Lh("invalid argument. Index must be an integer. Value: `%s`.",r));return r=Dh(r,this._length-1,this._mode),Cv.call(this,r)}return Cv.call(this)}Lv.exports=zh});var Vv=C(function(BD,Mv){"use strict";var Ph=require("@stdlib/assert/is-integer").isPrimitive,Mh=be(),Vh=$r(),Bh=require("@stdlib/string/format"),Pv=Vh.prototype.iset;function Uh(r,e){if(this._flags.READONLY)throw new Error("invalid invocation. Cannot write to a read-only array.");if(this._ndims>0){if(!Ph(r))throw new TypeError(Bh("invalid argument. Index must be an integer. Value: `%s`.",r));r=Mh(r,this._length-1,this._mode),Pv.call(this,r,e)}else Pv.call(this,r);return this}Mv.exports=Uh});var Fv=C(function(UD,Uv){"use strict";var Fh=require("@stdlib/assert/is-integer").isPrimitive,Yh=be(),Bv=require("@stdlib/string/format");function Kh(){var r,e,a,i;if(arguments.length!==this._ndims)throw new RangeError(Bv("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(re("invalid argument. Third argument must be an array-like object containing nonnegative integers. Value: `%s`.",a));if(s=a.length,s>vs)throw new RangeError(re("invalid argument. Number of dimensions must not exceed %u due to stack limits. Value: `%u`.",vs,s));if(!s4(i))throw new TypeError(re("invalid argument. Fourth argument must be an array-like object containing integers. Value: `%s`.",i));if(s>0){if(i.length!==s)throw new RangeError(re("invalid argument. Fourth argument length must match the number of dimensions. Expected number of dimensions: `%u`. Strides length: `%u`.",s,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(re("invalid argument. Fourth argument must contain a single element equal to 0. Value: `%d`.",i[0]))}if(!v4(v))throw new TypeError(re("invalid argument. Fifth argument must be a nonnegative integer. Value: `%s`.",v));if(!o4(t))throw new TypeError(re("invalid argument. Sixth argument must be a supported order. Value: `%s`.",t));if(s>0&&!u4(e.length,a,i,v)&&f4(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=h4,u.readonly=q4,arguments.length>6&&(f=x4(u,o),f))throw f;return this._mode=u.mode,u.submode===void 0&&(u.submode=[this._mode]),this._submode=u.submode,n=ts(a,s),d=ts(i,s||1),ss.call(this,r,e,n,d,v,t),this._flags.READONLY=u.readonly,this}l4(ee,ss);ze(ee,"name","ndarray");ze(ee.prototype,"get",p4);ze(ee.prototype,"iget",c4);ze(ee.prototype,"set",m4);ze(ee.prototype,"iset",y4);os.exports=ee});var ae=C(function(XD,us){"use strict";var g4=ns();us.exports=g4});var fs=C(function(QD,b4){b4.exports=["none","equiv","safe","same-kind","unsafe"]});var ls=C(function(WD,ds){"use strict";var S4=fs();function w4(){return S4.slice()}ds.exports=w4});var ys=C(function(HD,cs){"use strict";function j4(){return{none:0,equiv:1,safe:2,"same-kind":3,unsafe:4}}cs.exports=j4});var Ya=C(function($D,ms){"use strict";var _4=require("@stdlib/utils/define-nonenumerable-read-only-property"),ps=ls(),E4=ys();_4(ps,"enum",E4);ms.exports=ps});var qs=C(function(rC,hs){"use strict";var O4=Ya(),xs=O4(),T4=xs.length;function I4(r){var e;for(e=0;e0}Cs.exports=$4});var Me=C(function(lC,zs){"use strict";var rq=Ls();zs.exports=rq});var Ps=C(function(cC,eq){eq.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 Bs=C(function(yC,Vs){"use strict";var Ms=require("@stdlib/utils/keys"),aq=require("@stdlib/assert/has-own-property"),iq=ie(),va=Ps(),ta;function tq(){var r,e,a,i,v,t,o,s,u;for(a={},r=Ms(va),e=r.length,u=0;u0}Fs.exports=fq});var sa=C(function(xC,Ks){"use strict";var dq=Ys();Ks.exports=dq});var Zs=C(function(hC,Gs){"use strict";var lq=Me(),cq=sa();function yq(r,e,a){return a==="unsafe"||r===e?!0:a==="none"||a==="equiv"?!1:a==="safe"?lq(r,e):cq(r,e)}Gs.exports=yq});var Ja=C(function(qC,Js){"use strict";var pq=Zs();Js.exports=pq});var Qs=C(function(gC,Xs){"use strict";var mq=require("@stdlib/buffer/ctor"),xq=require("@stdlib/array/float64"),hq=require("@stdlib/array/float32"),qq=require("@stdlib/array/int16"),gq=require("@stdlib/array/int32"),bq=require("@stdlib/array/int8"),Sq=require("@stdlib/array/uint16"),wq=require("@stdlib/array/uint32"),jq=require("@stdlib/array/uint8"),_q=require("@stdlib/array/uint8c"),Eq=require("@stdlib/array/complex64"),Oq=require("@stdlib/array/complex128"),Tq={binary:mq,float64:xq,float32:hq,generic:Array,int16:qq,int32:gq,int8:bq,uint16:Sq,uint32:wq,uint8:jq,uint8c:_q,complex64:Eq,complex128:Oq};Xs.exports=Tq});var Hs=C(function(bC,Ws){"use strict";var Iq=Qs();function kq(r){return Iq[r]||null}Ws.exports=kq});var Ve=C(function(SC,$s){"use strict";var Aq=Hs();$s.exports=Aq});var eo=C(function(wC,ro){"use strict";function Rq(r){var e;for(e=0;e=0&&r.length=Gg(e)}Lo.exports=Zg});var Mo=C(function(VC,Po){"use strict";var Jg=zo();Po.exports=Jg});var Uo=C(function(BC,Bo){"use strict";var Vo=require("@stdlib/math/base/special/abs");function Xg(r){var e,a,i,v;if(e=r.length,e===0)return!1;for(a=Vo(r[0]),v=1;va)return!1;a=i}return!0}jn.exports=L6});var $a=C(function(fL,En){"use strict";var z6=_n();En.exports=z6});var Tn=C(function(dL,On){"use strict";var P6=Be(),M6=te(),V6=$a();function B6(r,e,a){return M6(e)!==0&&V6(e)&&P6(r,e,a)}On.exports=B6});var kn=C(function(lL,In){"use strict";var U6=Tn();In.exports=U6});var Rn=C(function(cL,An){"use strict";var F6=require("@stdlib/array/base/assert/contains").factory,Y6=Fr(),K6=F6(Y6("signed_integer"));An.exports=K6});var da=C(function(yL,Nn){"use strict";var G6=Rn();Nn.exports=G6});var Cn=C(function(pL,Dn){"use strict";var Z6=require("@stdlib/array/base/assert/contains").factory,J6=Fr(),X6=Z6(J6("unsigned_integer"));Dn.exports=X6});var la=C(function(mL,Ln){"use strict";var Q6=Cn();Ln.exports=Q6});var Pn=C(function(xL,zn){"use strict";var zr=require("@stdlib/utils/define-read-only-property"),Lr={};zr(Lr,"isAllowedDataTypeCast",Ja());zr(Lr,"isBufferLengthCompatible",La());zr(Lr,"isBufferLengthCompatibleShape",Mo());zr(Lr,"isCastingMode",Ka());zr(Lr,"isColumnMajor",Xa());zr(Lr,"isColumnMajorContiguous",Qo());zr(Lr,"isComplexFloatingPointDataType",Ue());zr(Lr,"isContiguous",tn());zr(Lr,"isDataType",Ne());zr(Lr,"isFloatingPointDataType",Fe());zr(Lr,"isIndexMode",Le());zr(Lr,"isIntegerDataType",Qa());zr(Lr,"isNumericDataType",Wa());zr(Lr,"isOrder",ge());zr(Lr,"isReadOnly",we());zr(Lr,"isRealDataType",fa());zr(Lr,"isRealFloatingPointDataType",Ha());zr(Lr,"isRowMajor",$a());zr(Lr,"isRowMajorContiguous",kn());zr(Lr,"isSafeDataTypeCast",Me());zr(Lr,"isSameKindDataTypeCast",sa());zr(Lr,"isSignedIntegerDataType",da());zr(Lr,"isSingleSegmentCompatible",Be());zr(Lr,"isUnsignedIntegerDataType",la());zn.exports=Lr});var Vn=C(function(hL,Mn){"use strict";function W6(r,e){var a,i,v,t,o,s,u,f,n,d;for(v=1,t=1,d=1;d=0&&(n=r[o],i=n<0?-n:n,!(i<=a));)r[o+1]=n,e[s+1]=e[s],o-=1,s-=1;r[o+1]=u,e[s+1]=f,v+=1,t+=1}}Mn.exports=W6});var Fn=C(function(qL,Un){"use strict";var H6=require("@stdlib/array/base/zero-to"),$6=require("@stdlib/array/base/copy-indexed"),ca=require("@stdlib/array/base/take"),rb=require("@stdlib/array/base/filled"),ri=Re(),eb=Vn(),Bn=3;function ab(r,e,a,i){var v,t,o,s,u,f,n,d,p,x;if(v=H6(r.length),f=ri(e),n=ri(a),d=ri(i),t=rb([],4),t[f].push(e),t[n].push(a),t[d].push(i),o=t[0].length,o===Bn)u=e;else if(o===Bn-1){for(p=1;p<4;p++)if(t[p].length){u=t[p][0];break}}else{for(x=0,p=1;p<4;p++)s=t[p].length,s>=o&&(o=s,x=p);u=t[x][0]}return u=$6(u),eb(u,v),r=ca(r,v),e=e===u?u:ca(e,v),a=a===u?u:ca(a,v),i=i===u?u:ca(i,v),{sh:r,sx:e,sy:a,sz:i}}Un.exports=ab});var Kn=C(function(gL,Yn){"use strict";var ib=Fn();Yn.exports=ib});var Zn=C(function(bL,Gn){"use strict";var tb={BLOCK_SIZE_IN_BYTES:64,BLOCK_SIZE_IN_ELEMENTS:8};Gn.exports=tb});var Xn=C(function(SL,Jn){"use strict";var ei=ue(),ya=Zn();function vb(r,e,a){var i,v,t;return i=ei(r),v=ei(e),t=ei(a),i===null||v===null||t===null?ya.BLOCK_SIZE_IN_ELEMENTS:i>v&&i>t?ya.BLOCK_SIZE_IN_BYTES/i|0:v>t?ya.BLOCK_SIZE_IN_BYTES/v|0:ya.BLOCK_SIZE_IN_BYTES/t|0}Jn.exports=vb});var Wn=C(function(wL,Qn){"use strict";var sb=Xn();Qn.exports=sb});var ru=C(function(jL,$n){"use strict";var ob=require("@stdlib/string/format"),pa=require("@stdlib/math/base/special/trunc"),Hn=require("@stdlib/math/base/special/abs");function nb(r,e,a,i,v,t){var o,s,u,f,n,d;for(o=r.length,s=1,d=0;d=s&&(v=s-1);else if(t==="wrap")v<0?(v+=s,v<0&&(v%=s,v!==0&&(v+=s))):v>=s&&(v-=s,v>=s&&(v%=s));else if(v<0||v>=s)throw new RangeError(ob("invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.",s,v));if(u=0,i==="column-major"){for(d=o-1;d>=0;d--)n=e[d],n<0?(f=pa(v/n),v-=f*n,f+=r[d]-1):(f=pa(v/n),v-=f*n),u+=f*Hn(n);return u}for(d=0;d=0;f--)if(n=s-o+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?s=r[d][o]:s=1,i===1){i=s;continue}if(!(s===1||i===s))return null}a[n]=i,n-=1}return a}du.exports=Sb});var yu=C(function(AL,cu){"use strict";var wb=lu();cu.exports=wb});var mu=C(function(RL,pu){"use strict";var jb=Pe(),_b=oa();function Eb(r){var e=_b(r);return e?jb(e):null}pu.exports=Eb});var hu=C(function(NL,xu){"use strict";var Ob=mu();xu.exports=Ob});var gu=C(function(DL,qu){"use strict";function Tb(){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"}}qu.exports=Tb});var wu=C(function(CL,Su){"use strict";var Ib=ie(),bu=gu(),ai;function kb(r){return arguments.length===0?bu():(ai===void 0&&(ai=bu()),ai[Ib(r)]||null)}Su.exports=kb});var ii=C(function(LL,ju){"use strict";var Ab=wu();ju.exports=Ab});var Tu=C(function(zL,Ou){"use strict";var _u=require("@stdlib/utils/object-inverse"),Eu=ii(),ti;function Rb(r){return arguments.length===0?_u(Eu()):(ti===void 0&&(ti=_u(Eu())),ti[r]||null)}Ou.exports=Rb});var ku=C(function(PL,Iu){"use strict";var Nb=Tu();Iu.exports=Nb});var Ru=C(function(ML,Au){"use strict";function Db(){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"}}Au.exports=Db});var Cu=C(function(VL,Du){"use strict";var Cb=ie(),Nu=Ru(),vi;function Lb(r){return arguments.length===0?Nu():(vi===void 0&&(vi=Nu()),vi[Cb(r)]||null)}Du.exports=Lb});var zu=C(function(BL,Lu){"use strict";var zb=Cu();Lu.exports=zb});var Mu=C(function(UL,Pu){"use strict";var Pb=ea(),Mb=Pe();function Vb(r){var e=typeof r;return e==="number"?Pb(r)?r:null:e==="string"?Mb(r):null}Pu.exports=Vb});var si=C(function(FL,Vu){"use strict";var Bb=Mu();Vu.exports=Bb});var Bu=C(function(YL,Ub){Ub.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 Fu=C(function(KL,Uu){"use strict";var Fb=ie(),Yb=Bu();function Kb(r){return Yb[Fb(r)]||null}Uu.exports=Kb});var Ku=C(function(GL,Yu){"use strict";var Gb=Fu();Yu.exports=Gb});var Ju=C(function(ZL,Zu){"use strict";var Zb=require("@stdlib/assert/is-array-like-object"),Gu=require("@stdlib/assert/is-nonnegative-integer").isPrimitive,Jb=ie(),oi=require("@stdlib/string/format");function Xb(r,e,a){var i,v,t,o,s,u,f,n;if(!Zb(r))throw new TypeError(oi("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(!Gu(e))throw new TypeError(oi("invalid argument. Second argument must be a nonnegative integer. Value: `%s`.",e));if(!Gu(a))throw new TypeError(oi("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(s=e+a,i%s!==0)throw new RangeError("invalid arguments. Length of the first argument is incompatible with the second and third arguments.");for(v=[],t=[],u=2*s,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=r5(e),o=Wb(e,a)):(t=1,o=[0]),r==="binary"?v=a5(t):v=e5(t,r),new $b(r,v,e,o,Hb(e,o),a)}Qu.exports=i5});var $u=C(function(QL,Hu){"use strict";var t5=Wu();Hu.exports=t5});var ef=C(function(WL,rf){"use strict";var v5=Yr(),s5=Gr(),o5=Pr(),n5=require("@stdlib/array/empty"),u5=require("@stdlib/buffer/alloc-unsafe");function f5(r){var e,a,i,v,t,o,s;return s=r.dtype,t=r.shape,v=r.order,e=t.length,e>0?(a=o5(t),o=v5(t,v)):(a=1,o=[0]),s==="binary"?i=u5(a):i=n5(a,s),new r.constructor(s,i,t,o,s5(t,o),v)}rf.exports=f5});var tf=C(function(HL,af){"use strict";var d5=ef();af.exports=d5});var of=C(function($L,sf){"use strict";var l5=we(),vf=require("@stdlib/string/format");function c5(r,e){var a,i,v,t,o,s,u;if(t=r.shape,o=r.strides,v=r.order,s=t.length,a=[],i=[],e<0){if(e<-s-1)throw new RangeError(vf("invalid argument. Specified axis is out-of-bounds. Must be on the interval: [-%u-1, %u]. Value: `%d`.",s,s,e));e+=s+1}else if(e>s)throw new RangeError(vf("invalid argument. Specified axis is out-of-bounds. Must be on the interval: [-%u-1, %u]. Value: `%d`.",s,s,e));if(e===0)for(i.push(1),a.push(o[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(w5("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],o[d]=n;return o}if(i==="column-major"){for(d=s-1;d>=0;d--)n=e[d],n<0?(f=xa(v/n),v-=f*n,o[d]=r[d]-1+f):(f=xa(v/n),v-=f*n,o[d]=f);return o}for(d=0;d0&&(v+=e[t]*(r[t]-1))}return v}qf.exports=I5});var Sf=C(function(oz,bf){"use strict";var k5=gf();bf.exports=k5});var _f=C(function(nz,jf){"use strict";var wf=ma();function A5(r,e){var a,i,v;if(i=e.length,a=r.shape,a.length===i){for(v=0;v=0&&(n=r[o],i=n<0?-n:n,!(i<=a));)r[o+1]=n,e[s+1]=e[s],o-=1,s-=1;r[o+1]=u,e[s+1]=f,v+=1,t+=1}}Ff.exports=X5});var Gf=C(function(qz,Kf){"use strict";var Q5=require("@stdlib/array/base/zero-to"),W5=require("@stdlib/array/base/copy-indexed"),H5=require("@stdlib/array/base/take"),$5=Yf();function r8(r,e){var a;return a=Q5(r.length),e=W5(e),$5(e,a),r=H5(r,a),{sh:r,sx:e}}Kf.exports=r8});var Vr=C(function(gz,Zf){"use strict";var e8=Gf();Zf.exports=e8});var Xf=C(function(bz,Jf){"use strict";var a8={BLOCK_SIZE_IN_BYTES:64,BLOCK_SIZE_IN_ELEMENTS:8};Jf.exports=a8});var Hf=C(function(Sz,Wf){"use strict";var i8=ue(),Qf=Xf();function t8(r){var e=i8(r);return e===null?Qf.BLOCK_SIZE_IN_ELEMENTS:Qf.BLOCK_SIZE_IN_BYTES/e|0}Wf.exports=t8});var Br=C(function(wz,$f){"use strict";var v8=Hf();$f.exports=v8});var ed=C(function(jz,rd){"use strict";var s8=Vr(),o8=Br();function n8(r,e){var a,i,v,t,o,s,u,f,n,d,p,x,b,m,w,y,q;for(q=s8(r.shape,r.strides),u=q.sh,d=q.sx,a=o8(r.dtype),p=r.offset,i=r.data,t=d[0],v=r.accessors[1],y=u[1];y>0;)for(y0;)for(w0;)for(E0;)for(h0;)for(g0;)for(S0;)for(O0;)for(l0;)for(_0;)for(I0;)for(R0;)for(A0;)for(T0;)for(k0;)for(M0;)for(z0;)for(N0;)for(L0;)for(D0;)for(I0;)for(F0;)for(U0;)for(B0;)for(V0;)for(P0;)for(M0;)for(z0;)for(G0;)for(J0;)for(K0;)for(Z0;)for(Y0;)for(F0;)for(U0;)for(B0;)for(H0;)for($0;)for(Q0;)for(W0;)for(X0;)for(G0;)for(J0;)for(K0;)for(Z0;)for(ar0;)for(vr0;)for(er0;)for(ir0;)for(rr0;)for(H0;)for($0;)for(Q0;)for(W0;)for(X0;)for(w0;)for(m0;)for(h0;)for(g0;)for(j0;)for(O0;)for(l0;)for(_0;)for(c0;)for(R0;)for(A0;)for(T0;)for(k0;)for(S0;)for(z0;)for(N0;)for(L0;)for(D0;)for(I0;)for(R0;)for(U0;)for(B0;)for(V0;)for(P0;)for(M0;)for(z0;)for(N0;)for(J0;)for(K0;)for(Z0;)for(Y0;)for(F0;)for(U0;)for(B0;)for(V0;)for($0;)for(Q0;)for(W0;)for(X0;)for(G0;)for(J0;)for(K0;)for(Z0;)for(Y0;)for(vr0;)for(er0;)for(ir0;)for(rr0;)for(H0;)for($0;)for(Q0;)for(W0;)for(X0;)for(G=s&&(v=s-1);else if(t==="wrap")v<0?(v+=s,v<0&&(v%=s,v!==0&&(v+=s))):v>=s&&(v-=s,v>=s&&(v%=s));else if(v<0||v>=s)throw new RangeError(xS("invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.",s,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}t0.exports=hS});var le=C(function(r9,s0){"use strict";var qS=v0();s0.exports=qS});var n0=C(function(e9,o0){"use strict";var gS=Pr(),bS=le(),SS="throw";function wS(r,e){var a,i,v,t,o,s,u,f,n;for(o=r.shape,v=gS(o),a=r.data,s=r.strides,u=r.offset,i=r.order,t=r.accessors[1],n=0;n0&&(p=Uj(p.length))}else p=Dl(x);return Cl(p)===0?Kj(d,o,yi(p,f),u,!i):(t=Fj(x,v,t),p=yi(p,f),p.length===0?new d(o,r.data,[],[0],t,u,{readonly:!i}):(v=Yj(x,v,f),new d(o,r.data,p,v,t,u,{readonly:!i})))}zl.exports=Gj});var Xe=C(function(U9,Ml){"use strict";var Zj=Pl();Ml.exports=Zj});var Bl=C(function(F9,Vl){"use strict";function Jj(r,e){var a,i,v,t,o,s,u,f,n,d;for(v=1,t=1,d=1;d=0&&(n=r[o],i=n<0?-n:n,!(i<=a));)r[o+1]=n,e[s+1]=e[s],o-=1,s-=1;r[o+1]=u,e[s+1]=f,v+=1,t+=1}}Vl.exports=Jj});var Yl=C(function(Y9,Fl){"use strict";var Xj=require("@stdlib/array/base/zero-to"),Qj=require("@stdlib/array/base/copy-indexed"),Ul=require("@stdlib/array/base/take"),Wj=Bl();function Hj(r,e,a){var i;return i=Xj(r.length),e=Qj(e),Wj(e,i),r=Ul(r,i),a=Ul(a,i),{sh:r,sx:e,sy:a}}Fl.exports=Hj});var kr=C(function(K9,Kl){"use strict";var $j=Yl();Kl.exports=$j});var Zl=C(function(G9,Gl){"use strict";var r_={BLOCK_SIZE_IN_BYTES:64,BLOCK_SIZE_IN_ELEMENTS:8};Gl.exports=r_});var Ql=C(function(Z9,Xl){"use strict";var Jl=ue(),pi=Zl();function e_(r,e){var a,i;return a=Jl(r),i=Jl(e),a===null||i===null?pi.BLOCK_SIZE_IN_ELEMENTS:a>i?pi.BLOCK_SIZE_IN_BYTES/a|0:pi.BLOCK_SIZE_IN_BYTES/i|0}Xl.exports=e_});var Ar=C(function(J9,Wl){"use strict";var a_=Ql();Wl.exports=a_});var $l=C(function(X9,Hl){"use strict";var i_=kr(),t_=Ar();function v_(r,e,a){var i,v,t,o,s,u,f,n,d,p,x,b,m,w,y,q,j,g,h,E,c,_,l,O,S;for(S=i_(r.shape,r.strides,e.strides),b=S.sh,y=S.sx,q=S.sy,i=t_(r.dtype,e.dtype),j=r.offset,g=e.offset,v=r.data,t=e.data,u=y[0],n=q[0],o=r.accessors[0],s=e.accessors[1],O=b[1];O>0;)for(O0;)for(l0;)for(D0;)for(I0;)for(R0;)for(B0;)for(V0;)for(P0;)for(M0;)for(G0;)for(J0;)for(K0;)for(Z0;)for(Y0;)for(ir0;)for(rr0;)for(H0;)for($0;)for(Q0;)for(W0;)for(nr0;)for(or0;)for(sr0;)for(tr0;)for(ar0;)for(vr0;)for(er0;)for(pr0;)for(lr0;)for(yr0;)for(cr0;)for(dr0;)for(fr0;)for(ur0;)for(nr0;)for(wr0;)for(Sr0;)for(xr0;)for(jr0;)for(gr0;)for(br0;)for(mr0;)for(pr0;)for(lr0;)for(Dr0;)for(Rr0;)for(Ir0;)for(Tr0;)for(Or0;)for(Er0;)for(_r0;)for(wr0;)for(Sr0;)for(xr0;)for(_0;)for(c0;)for(R0;)for(A0;)for(T0;)for(P0;)for(M0;)for(z0;)for(N0;)for(K0;)for(Z0;)for(Y0;)for(F0;)for(U0;)for(H0;)for($0;)for(Q0;)for(W0;)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(gr0;)for(br0;)for(mr0;)for(pr0;)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(gr=u&&(n=u-1);else if(o==="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(DE("invalid argument. Subscripts must not exceed array dimensions. Subscript: `%u`. Value: `%d`.",d,n));f=r[d],f<0&&e===0?s-=n*f:s+=n*f}return s}U1.exports=CE});var hi=C(function(UP,Y1){"use strict";var LE=F1();Y1.exports=LE});var Z1=C(function(FP,G1){"use strict";function K1(r,e,a,i,v,t){var o,s,u,f,n;if(t>=e.length)return r.accessors[0](r.data,i);for(u=[],f=e[t],o=a[t],n=0;n0;)for(k0;)for(S0;)for(N0;)for(L0;)for(D0;)for(F0;)for(U0;)for(B0;)for(V0;)for(W0;)for(X0;)for(G0;)for(J0;)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(mr0;)for(pr0;)for(lr0;)for(yr0;)for(cr0;)for(dr0;)for(fr0;)for(Er0;)for(_r0;)for(wr0;)for(Sr0;)for(xr0;)for(jr0;)for(gr0;)for(br0;)for(mr0;)for(Kr0;)for(Ur0;)for(Dr0;)for(Rr0;)for(Ir0;)for(Tr0;)for(Or0;)for(Er0;)for(_r0;)for(wr0;)for(O0;)for(l0;)for(D0;)for(I0;)for(R0;)for(B0;)for(V0;)for(P0;)for(M0;)for(G0;)for(J0;)for(K0;)for(Z0;)for(Y0;)for(ir0;)for(rr0;)for(H0;)for($0;)for(Q0;)for(W0;)for(nr0;)for(or0;)for(sr0;)for(tr0;)for(ar0;)for(vr0;)for(er0;)for(pr0;)for(lr0;)for(yr0;)for(cr0;)for(dr0;)for(fr0;)for(ur0;)for(nr0;)for(wr0;)for(Sr0;)for(xr0;)for(jr0;)for(gr0;)for(br0;)for(mr0;)for(pr0;)for(lr0;)for(Dr0;)for(Rr0;)for(Ir0;)for(Tr0;)for(Or0;)for(Er0;)for(_r0;)for(wr0;)for(Sr0;)for(xr0?(t=OI(e),o=SI(e,a)):(t=1,o=[0]),v=jI(r,t),v===null)throw new TypeError(_I("invalid argument. First argument must be a recognized data type. Value: `%s`.",r));return new EI(r,v,e,o,wI(e,o),a)}Z2.exports=TI});var Q2=C(function(BM,X2){"use strict";var II=J2();X2.exports=II});var H2=C(function(UM,W2){"use strict";var kI=Yr(),AI=Gr(),RI=Qr(),NI=require("@stdlib/string/format"),DI=Pr();function CI(r){var e,a,i,v,t,o,s;if(s=r.dtype,t=r.shape,v=r.order,e=t.length,e>0?(a=DI(t),o=kI(t,v)):(a=1,o=[0]),i=RI(s,a),i===null)throw new TypeError(NI("invalid argument. First argument must have a recognized data type. Value: `%s`.",s));return new r.constructor(s,i,t,o,AI(t,o),v)}W2.exports=CI});var rp=C(function(FM,$2){"use strict";var LI=H2();$2.exports=LI});var ap=C(function(YM,ep){"use strict";var qr=require("@stdlib/utils/define-read-only-property"),hr={};qr(hr,"assert",Pn());qr(hr,"binaryLoopOrder",Kn());qr(hr,"binaryBlockSize",Wn());qr(hr,"bind2vind",au());qr(hr,"broadcastArray",ma());qr(hr,"broadcastScalar",fu());qr(hr,"broadcastShapes",yu());qr(hr,"buffer",Qr());qr(hr,"bufferCtors",Ve());qr(hr,"bufferDataType",oa());qr(hr,"bufferDataTypeEnum",hu());qr(hr,"bytesPerElement",ue());qr(hr,"char2dtype",ku());qr(hr,"clampIndex",Ba());qr(hr,"ndarray",$r());qr(hr,"dtypeChar",ii());qr(hr,"dtypeDesc",zu());qr(hr,"dtypeEnum2Str",ea());qr(hr,"dtypeResolveEnum",si());qr(hr,"dtypeResolveStr",ie());qr(hr,"dtypeStr2Enum",Pe());qr(hr,"dtype2c",Ku());qr(hr,"dtypes2signatures",ni());qr(hr,"empty",$u());qr(hr,"emptyLike",tf());qr(hr,"expandDimensions",uf());qr(hr,"scalar2ndarray",cf());qr(hr,"ind",be());qr(hr,"ind2sub",ha());qr(hr,"iterationOrder",te());qr(hr,"maxViewBufferIndex",Sf());qr(hr,"maybeBroadcastArray",Of());qr(hr,"metaDataProps",Af());qr(hr,"minViewBufferIndex",Cf());qr(hr,"minmaxViewBufferIndex",ne());qr(hr,"ndarraylike2object",Ke());qr(hr,"nonsingletonDimensions",Uf());qr(hr,"nullary",z0());qr(hr,"nullaryLoopOrder",Vr());qr(hr,"nullaryBlockSize",Br());qr(hr,"numel",Pr());qr(hr,"outputPolicyEnum2Str",ga());qr(hr,"outputPolicyResolveEnum",al());qr(hr,"outputPolicyResolveStr",sl());qr(hr,"outputPolicyStr2Enum",ba());qr(hr,"prependSingletonDimensions",fl());qr(hr,"removeSingletonDimensions",yl());qr(hr,"serializeMetaData",Sl());qr(hr,"shape2strides",Yr());qr(hr,"singletonDimensions",El());qr(hr,"slice",Xe());qr(hr,"sliceAssign",Sa());qr(hr,"strides2offset",Gr());qr(hr,"strides2order",Re());qr(hr,"sub2ind",hi());qr(hr,"ndarray2array",qi());qr(hr,"transpose",ry());qr(hr,"unary",mi());qr(hr,"unaryBy",U2());qr(hr,"unaryLoopOrder",kr());qr(hr,"unaryOutputDataType",G2());qr(hr,"unaryBlockSize",Ar());qr(hr,"vind2bind",le());qr(hr,"wrapIndex",Ua());qr(hr,"zeros",Q2());qr(hr,"zerosLike",rp());ep.exports=hr});var tp=C(function(KM,ip){"use strict";function zI(r,e,a,i,v,t,o,s,u){var f,n,d,p;for(f=t,d=0;d1){if(e=arguments[1],!ZI(e))throw new TypeError(gi("invalid argument. Options argument must be an object. Value: `%s`.",e));wa(e,"dtype")?a=e.dtype:a=lp,wa(e,"order")?i=e.order:i=cp,wa(e,"mode")&&(t.mode=e.mode),wa(e,"submode")&&(t.submode=e.submode)}else a=lp,i=cp;if(typeof r=="number")f=[r];else if(JI(r))f=r;else throw new TypeError(gi("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(s=$I(f),s!==s||s<0)throw new TypeError(gi("invalid argument. First argument must be either a nonnegative integer or an array of nonnegative integers. Value: `%s`.",r));u=XI(f,i)}else s=1,u=[0];return a==="binary"?o=HI(s):o=WI(s,a),new rk(a,o,f,u,QI(f,u),i,t)}pp.exports=ek});var hp=C(function(XM,xp){"use strict";var ak=mp();xp.exports=ak});var gp=C(function(QM,qp){"use strict";var ik=require("@stdlib/assert/is-ndarray-like"),tk=require("@stdlib/assert/is-plain-object"),vk=require("@stdlib/assert/is-nonnegative-integer-array").primitives,He=require("@stdlib/assert/has-own-property"),sk=Yr(),ok=Gr(),nk=Pr(),uk=ae(),fk=require("@stdlib/array/empty"),dk=require("@stdlib/buffer/alloc-unsafe"),bi=require("@stdlib/string/format");function lk(r){var e,a,i,v,t,o,s,u,f;if(!ik(r))throw new TypeError(bi("invalid argument. First argument must be an ndarray-like object. Value: `%s`.",r));if(t={},arguments.length>1){if(e=arguments[1],!tk(e))throw new TypeError(bi("invalid argument. Options argument must be an object. Value: `%s`.",e));if(He(e,"dtype")?a=e.dtype:a=r.dtype,He(e,"shape")){if(f=e.shape,typeof f=="number"&&(f=[f]),!vk(f))throw new TypeError(bi("invalid option. `%s` option must be a nonnegative integer or an array of nonnegative integers. Option: `%s`.","shape",f))}else f=r.shape;He(e,"order")?i=e.order:i=r.order,He(e,"mode")&&(t.mode=e.mode),He(e,"submode")&&(t.submode=e.submode)}else a=r.dtype,f=r.shape,i=r.order;return v=f.length,v>0?(s=nk(f),s<0&&(s=0),u=sk(f,i)):(s=1,u=[0]),a==="binary"?o=dk(s):o=fk(s,a),new uk(a,o,f,u,ok(f,u),i,t)}qp.exports=lk});var Sp=C(function(WM,bp){"use strict";var ck=gp();bp.exports=ck});var Si=C(function(HM,wp){"use strict";var yk=/^-?[0-9]+$/;wp.exports=yk});var wi=C(function($M,jp){"use strict";var pk=/:/;jp.exports=pk});var Ep=C(function(rV,_p){"use strict";var mk=require("@stdlib/string/base/trim"),xk=require("@stdlib/string/base/replace"),ji=require("@stdlib/slice/multi"),hk=require("@stdlib/slice/base/str2multislice"),qk=require("@stdlib/slice/base/seq2multislice"),gk=require("@stdlib/slice/base/str2slice"),he=require("@stdlib/string/format"),bk=Si(),Sk=wi();function wk(r,e){var a,i,v,t;if(i=mk(e),v=i[0],v==="S"){if(t=gk(e),t===null)throw new Error(he("invalid operation. Unsupported slice operation. Value: `%s`.",e));t=new ji(t)}else if(v==="M"){if(t=hk(i),t===null)throw new Error(he("invalid operation. Unsupported slice operation. Value: `%s`.",e))}else if(bk.test(i))t=parseInt(i,10),t=new ji(t);else if(Sk.test(i)){if(a=r.shape,t=qk(i,a,!0),t.code)throw t.code==="ERR_SLICE_INVALID_INCREMENT"?new Error(he("invalid operation. A subsequence increment must be a non-zero integer. Value: `%s`.",e)):t.code==="ERR_SLICE_INVALID_ELLIPSIS"?new Error(he("invalid operation. A subsequence may only include a single ellipsis. Value: `%s`.",e)):t.code==="ERR_SLICE_INVALID_SUBSEQUENCE"?new Error(he("invalid operation. Unsupported slice operation. Value: `%s`.",e)):new RangeError(he("invalid operation. Number of slice dimensions does not match the number of array dimensions. Array shape: (%s). Slice dimensions: %u.",a.join(","),xk(i,/\.\.\.,/,"").split(",").length))}else if(i.length===0||i==="...")t=new ji;else throw new Error(he("invalid operation. Unsupported slice operation. Value: `%s`.",e));return t}_p.exports=wk});var kp=C(function(eV,Ip){"use strict";var jk=require("@stdlib/string/base/trim"),_k=require("@stdlib/string/base/replace"),Op=require("@stdlib/slice/multi"),Ek=require("@stdlib/slice/base/str2multislice"),Tp=require("@stdlib/slice/base/seq2multislice"),Ok=require("@stdlib/slice/base/str2slice"),pe=require("@stdlib/string/format"),Tk=Si();function Ik(r,e,a){var i,v,t,o;if(v=jk(e),t=v[0],t==="S"){if(o=Ok(e),o===null)throw new Error(pe("invalid operation. Unsupported slice operation. Value: `%s`.",e));o=new Op(o)}else if(t==="M"){if(o=Ek(v),o===null)throw new Error(pe("invalid operation. Unsupported slice operation. Value: `%s`.",e))}else if(Tk.test(v))o=parseInt(v,10),o=new Op(o);else if(v.length>0){if(i=r.shape,o=Tp(v,i,!0),o.code){if(o.code==="ERR_SLICE_INVALID_INCREMENT")throw new Error(pe("invalid operation. A subsequence increment must be a non-zero integer. Value: `%s`.",e));if(o.code==="ERR_SLICE_INVALID_ELLIPSIS")throw new Error(pe("invalid operation. A subsequence may only include a single ellipsis. Value: `%s`.",e));if(o.code==="ERR_SLICE_INVALID_SUBSEQUENCE")throw new Error(pe("invalid operation. Unsupported slice operation. Value: `%s`.",e));if(o.code==="ERR_SLICE_TOO_MANY_DIMENSIONS")throw new RangeError(pe("invalid operation. Number of slice dimensions does not match the number of array dimensions. Array shape: (%s). Slice dimensions: %u.",r.shape.join(","),_k(v,/\.\.\.,/,"").split(",").length));if(o.code==="ERR_SLICE_OUT_OF_BOUNDS"){if(a)throw new RangeError(pe("invalid operation. Slice exceeds array bounds. Array shape: (%s).",i.join(",")));o=Tp(v,i,!1)}}}else throw new RangeError(pe("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 o}Ip.exports=Ik});var Np=C(function(aV,Rp){"use strict";var kk=require("@stdlib/string/base/trim"),Ak=require("@stdlib/slice/base/str2multislice"),Ap=require("@stdlib/slice/base/seq2multislice"),Rk=require("@stdlib/slice/base/sargs2multislice"),Oe=require("@stdlib/string/format"),Nk=wi();function Dk(r,e,a){var i,v,t,o;if(v=kk(e),t=v[0],t==="M"){if(o=Ak(v),o===null)throw new Error(Oe("invalid operation. Unsupported slice operation. Value: `%s`.",e))}else if(Nk.test(v)||v==="..."){if(i=r.shape,o=Ap(v,i,!0),o.code){if(o.code==="ERR_SLICE_INVALID_INCREMENT")throw new Error(Oe("invalid operation. A subsequence increment must be a non-zero integer. Value: `%s`.",e));if(o.code==="ERR_SLICE_INVALID_ELLIPSIS")throw new Error(Oe("invalid operation. A subsequence may only include a single ellipsis. Value: `%s`.",e));if(o.code==="ERR_SLICE_INVALID_SUBSEQUENCE")throw new Error(Oe("invalid operation. Unsupported slice operation. Value: `%s`.",e));if(o.code==="ERR_SLICE_OUT_OF_BOUNDS"){if(a)throw new RangeError(Oe("invalid operation. Slice exceeds array bounds. Array shape: (%s).",i.join(",")));o=Ap(v,i,!1)}}}else if(o=Rk(v),o===null)throw new Error(Oe("invalid operation. Unsupported slice operation. Value: `%s`.",e));return o}Rp.exports=Dk});var _i=C(function(iV,Dp){"use strict";var Ck=require("@stdlib/utils/properties-in"),Lk=require("@stdlib/array/base/assert/contains").factory,zk=ae(),Pk=ve(),Mk=Lk(Ck(new zk("generic",[0],[],[0],0,Pk.get("order"))));Dp.exports=Mk});var Lp=C(function(tV,Cp){"use strict";var Vk=require("@stdlib/assert/is-function");function Bk(r,e,a){var i=r[e];if(Vk(i))return v;return i;function v(){var t,o;for(t=[],o=0;o=sA&&r<=vA?"float32":"float64":r>-ja&&r=oA?"int8":r>=nA?"int16":r>=uA?"int32":"float64":r<=fA?"uint8":r<=dA?"uint16":r<=lA?"uint32":"float64":r>-ja&&r1){if(e=arguments[1],!pA(e))throw new TypeError(Hp("invalid argument. Options argument must be an object. Value: `%s`.",e));Ii(e,"dtype")&&(a.dtype=e.dtype),Ii(e,"order")&&(a.order=e.order),Ii(e,"readonly")&&(a.readonly=e.readonly)}if(v=mA(r),a.dtype===""?v?o="float64":xA(r)?o="complex128":o="generic":o=a.dtype,i=bA(o,1),i===null)throw new TypeError(Hp("invalid option. `%s` option must be a recognized data type. Option: `%s`.","dtype",o));return/^complex/.test(o)&&v?s=[r,0]:s=r,hA(i)?t=qA(o):t=gA(o),t(i,0,s),new SA(o,i,[],[0],0,a.order,a)}$p.exports=_A});var ki=C(function(cV,em){"use strict";var EA=rm();em.exports=EA});var tm=C(function(yV,im){"use strict";var OA=Sa(),TA=require("@stdlib/assert/is-ndarray-like"),IA=require("@stdlib/assert/is-number").isPrimitive,kA=require("@stdlib/assert/is-integer").isPrimitive,AA=require("@stdlib/assert/is-complex-like"),RA=Ue(),NA=Fe(),DA=la(),CA=da(),am=Me(),LA=require("@stdlib/constants/int8/max"),zA=require("@stdlib/constants/int16/max"),PA=require("@stdlib/constants/int32/max"),_a=Ti(),MA=require("@stdlib/complex/dtype"),Te=ki(),qe=require("@stdlib/string/format"),VA=Ei(),BA=Oi();function Ie(r){return{dtype:r}}function UA(r,e,a,i,v){var t,o,s,u,f;if(!TA(a))if(s=r.dtype,s==="generic")a=Te(a,Ie(s));else if(IA(a))if(NA(s))a=Te(a,Ie(s));else if(DA(s))if(o=_a(a),am(o,s))a=Te(a,Ie(s));else throw new TypeError(qe("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",o,s));else if(CA(s)){if(!kA(a))throw new TypeError(qe("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",_a(a),s));if(a<0?o=_a(a):a<=LA?o="int8":a<=zA?o="int16":a<=PA?o="int32":o="float64",am(o,s))a=Te(a,Ie(s));else throw new TypeError(qe("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",o,s))}else if(s==="binary")if(o=_a(a),o==="uint8")a=Te(a,Ie(s));else throw new TypeError(qe("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",o,s));else throw new TypeError(qe("invalid operation. Unsupported target array data type. Data type: `%s`.",s));else if(AA(a)){if(!RA(s))throw new TypeError(qe("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",MA(a),s));a=Te(a,Ie(s))}else throw new TypeError(qe("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",typeof a,s));t=!1,f=v(r,e,t);try{return OA(a,i,f,t),!0}catch(n){throw u=BA(n),new u(VA(n.message))}}im.exports=UA});var sm=C(function(pV,vm){"use strict";var FA=_i(),YA=Yp(),KA=tm();function GA(r){return e;function e(a,i,v,t){return FA(i)?YA(a,i,v):KA(a,i,v,t,r)}}vm.exports=GA});var cm=C(function(mV,lm){"use strict";var ZA=require("@stdlib/utils/define-nonenumerable-read-only-property"),nm=ae(),JA=require("@stdlib/utils/inherit"),om=require("@stdlib/proxy/ctor"),um=Ep(),fm=kp(),dm=Np(),Ai=Up(),Ri=sm(),XA=Ai(um),QA=Ri(um),WA=Ai(fm),HA=Ri(fm),$A=Ai(dm),rR=Ri(dm);function ke(r,e,a,i,v,t,o){var s,u,f;return u=arguments.length,this instanceof ke?(nm.call(this,r,e,a,i,v,t,u<7?{}:o),om?(f=a.length,s={},f===0?(s.get=XA,s.set=QA):f===1?(s.get=WA,s.set=HA):(s.get=$A,s.set=rR),new om(this,s)):(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,o)}JA(ke,nm);ZA(ke,"name","ndarray");lm.exports=ke});var pm=C(function(xV,ym){"use strict";var eR=cm();ym.exports=eR});var Ni=C(function(hV,aR){aR.exports={mode:"throw",order:"row-major"}});var Ci=C(function(qV,xm){"use strict";var iR=require("@stdlib/assert/is-plain-object"),mm=require("@stdlib/assert/has-own-property"),tR=ge(),vR=Le(),Di=require("@stdlib/string/format");function sR(r,e){return iR(e)?mm(e,"mode")&&(r.mode=e.mode,!vR(r.mode))?new TypeError(Di("invalid option. `%s` option must be a supported/recognized mode. Option: `%s`.","mode",r.mode)):mm(e,"order")&&(r.order=e.order,!tR(r.order))?new TypeError(Di("invalid option. `%s` option must be a supported/recognized order. Option: `%s`.","order",r.order)):null:new TypeError(Di("invalid argument. Options argument must be an object. Value: `%s`.",e))}xm.exports=sR});var bm=C(function(gV,gm){"use strict";var oR=require("@stdlib/assert/is-nonnegative-integer-array").primitives,nR=require("@stdlib/assert/is-integer").isPrimitive,uR=Yr(),fR=ha(),hm=require("@stdlib/string/format"),qm=Ni(),dR=Ci();function lR(r,e,a){var i,v;if(i={},i.mode=qm.mode,i.order=qm.order,arguments.length>2&&(v=dR(i,a),v))throw v;if(!oR(r))throw new TypeError(hm("invalid argument. Shape argument must be an array-like object containing nonnegative integers. Value: `%s`.",r));if(!nR(e))throw new TypeError(hm("invalid argument. Linear index must be integer valued. Value: `%s`.",e));return fR(r,uR(r,i.order),0,i.order,e,i.mode)}gm.exports=lR});var jm=C(function(bV,wm){"use strict";var cR=require("@stdlib/assert/is-nonnegative-integer-array").primitives,yR=require("@stdlib/assert/is-integer").isPrimitive,pR=Yr(),mR=ha().assign,Ea=require("@stdlib/string/format"),Sm=Ni(),xR=Ci();function hR(r,e,a,i){var v,t,o;if(v={},v.mode=Sm.mode,v.order=Sm.order,arguments.length===4){if(o=xR(v,arguments[2]),o)throw o;if(typeof i!="object"||i===null)throw new TypeError(Ea("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(Ea("invalid argument. Output argument must be either an array, typed array, or object. Value: `%s`.",t));if(!cR(r))throw new TypeError(Ea("invalid argument. Shape argument must be an array-like object containing nonnegative integers. Value: `%s`.",r));if(!yR(e))throw new TypeError(Ea("invalid argument. Linear index must be integer valued. Value: `%s`.",e));return mR(r,pR(r,v.order),0,v.order,e,v.mode,t)}wm.exports=hR});var Om=C(function(SV,Em){"use strict";var qR=require("@stdlib/utils/define-nonenumerable-read-only-property"),_m=bm(),gR=jm();qR(_m,"assign",gR);Em.exports=_m});var Tm=C(function(wV,bR){bR.exports={float64:-1,float32:"float64",int32:-1,int16:"int32",int8:"int16",uint32:-1,uint16:"uint32",uint8:"uint16",uint8c:"uint16",complex64:"complex128",complex128:-1,generic:-1,binary:-1}});var km=C(function(jV,Im){"use strict";var SR=require("@stdlib/utils/keys"),wR=require("@stdlib/assert/has-own-property"),jR=ie(),Oa=Tm();function _R(){var r,e,a,i;for(a={},r=SR(Oa),e=r.length,i=0;i0)throw new RangeError(Ia("invalid argument. Number of slice dimensions does not match the number of array dimensions. Array shape: (%s). Slice dimensions: %u.",r.shape.join(","),0))}if(DR(e)){if(o=e,i>2)throw new Error("invalid invocation. Too many arguments.")}else{if(CR(e)){if(t=e,i>2)throw new Error("invalid invocation. Too many arguments.")}else for(t=[],s=1;s