UNPKG

@stdlib/esm

Version:

ES module distribution for Stdlib, a standard library for JavaScript and Node.js.

3 lines 941 B
// This file is a part of stdlib. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 import r from"./../../../utils/define-nonenumerable-read-only-property.js";import e from"./../../../math/base/assert/is-negative-zero.js";import t from"./../../../math/base/assert/is-nan.js";var n=[701,301,132,57,23,10,4,1],o=e,a=t,f=n,i=f.length;function s(r,e,t,n){var s,m,u,l,p,v,d,h;if(r<=0||0===e)return t;for(e<0&&(n*=-1),s=n<0?(1-r)*n:0,v=0;v<i;v++)for(d=u=f[v];d<r;d++)if(l=t[s+d*n],!a(l)){for(m=o(l),h=d;h>=u&&(!((p=t[s+(h-u)*n])<=l)||m&&p===l);h-=u)t[s+h*n]=p;t[s+h*n]=l}return t}var m=e,u=t,l=n,p=l.length;function v(r,e,t,n,o){var a,f,i,s,v,d,h;if(r<=0||0===e)return t;for(e<0&&(o-=(r-1)*(n*=-1)),v=0;v<p;v++)for(d=f=l[v];d<r;d++)if(i=t[o+d*n],!u(i)){for(a=m(i),h=d;h>=f&&(!((s=t[o+(h-f)*n])<=i)||a&&s===i);h-=f)t[o+h*n]=s;t[o+h*n]=i}return t}var d=r,h=s,b=v;d(h,"ndarray",b);export default h; //# sourceMappingURL=dsortsh.js.map