-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.mjs
4 lines (4 loc) · 2.2 KB
/
index.mjs
1
2
3
4
// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0
/// <reference types="./index.d.ts" />
import{isPrimitive as s}from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-number@v0.2.2-esm/index.mjs";import e from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-ndarray-like@v0.2.2-esm/index.mjs";import r from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-plain-object@v0.2.2-esm/index.mjs";import{primitives as t}from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-nonnegative-integer-array@v0.2.2-esm/index.mjs";import d from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-is-empty-collection@v0.2.2-esm/index.mjs";import i from"https://cdn.jsdelivr.net/gh/stdlib-js/assert-has-own-property@v0.2.2-esm/index.mjs";import n from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-shape2strides@v0.2.2-esm/index.mjs";import m from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-strides2offset@v0.2.2-esm/index.mjs";import o from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-buffer@v0.3.0-esm/index.mjs";import p from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-base-numel@v0.2.2-esm/index.mjs";import j from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-dtype@v0.2.2-esm/index.mjs";import l from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-shape@v0.2.2-esm/index.mjs";import a from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-order@v0.2.2-esm/index.mjs";import h from"https://cdn.jsdelivr.net/gh/stdlib-js/ndarray-ctor@v0.2.2-esm/index.mjs";import v from"https://cdn.jsdelivr.net/gh/stdlib-js/error-tools-fmtprodmsg@v0.2.2-esm/index.mjs";function f(f){var b,y,c,g,x,u,w,k;if(!e(f))throw new TypeError(v("0kH5t",f));if(g={},arguments.length>1){if(!r(b=arguments[1]))throw new TypeError(v("0kH2V",b));if(y=i(b,"dtype")?b.dtype:j(f),i(b,"shape")){if(k=b.shape,s(k)&&(k=[k]),!t(k)&&!d(k))throw new TypeError(v("0kHDs","shape",k))}else k=l(f);c=i(b,"order")?b.order:a(f),i(b,"mode")&&(g.mode=b.mode),i(b,"submode")&&(g.submode=b.submode),i(b,"readonly")&&(g.readonly=b.readonly)}else y=j(f),k=l(f),c=a(f);if(k.length>0?(u=p(k),w=n(k,c)):(u=1,w=[0]),null===(x=o(y,u)))throw new TypeError(v("0kH5L",y));return new h(y,x,k,w,m(k,w),c,g)}export{f as default};
//# sourceMappingURL=index.mjs.map