May 2023
/** * Skipped minification because the original files appears to be already minified. * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files */ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.fromArrayBuffer=fromArrayBuffer;function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function _defineProperties(a,b){for(var c,d=0;d=f?b.readUint16(!0):b.readUint32(!0);var h=10+e;0!=h%16&&console.warn("NPY file header is incorrectly padded. (".concat(h," is not evenly divisible by 16.)"));var i=b.readAndASCIIDecodeBytes(e),j=parseHeaderStr(i);if(j.fortran_order)throw new Error("NPY file is written in Fortran byte order, support for this byte order is not yet implemented.");var k=typedArrayConstructorForDescription(j.descr),l=new k(a,b.offset);return{data:l,shape:j.shape}}function parseHeaderStr(a){var b=a.toLowerCase().replace("(","[").replace("),","]").replace("[,","[1,]").replace(",]",",1]").replace(/'/g,"\"");return JSON.parse(b)}function typedArrayConstructorForDescription(a){switch(a){case"|u1":return Uint8Array;case"