From 4fbd69095b6a4a06f8768700080492a9fb085bce Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Tue, 16 Jan 2024 08:37:48 +0000 Subject: [PATCH] Auto-generated commit --- NOTICE | 2 +- dist/index.js | 6 +++--- dist/index.js.map | 6 +++--- lib/main.js | 4 +++- package.json | 1 + 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/NOTICE b/NOTICE index f7aca1b..e6e7482 100644 --- a/NOTICE +++ b/NOTICE @@ -1 +1 @@ -Copyright (c) 2016-2023 The Stdlib Authors. +Copyright (c) 2016-2024 The Stdlib Authors. diff --git a/dist/index.js b/dist/index.js index e320d2b..c17c35b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,5 +1,5 @@ -"use strict";var w=function(i,e){return function(){return e||i((e={exports:{}}).exports,e),e.exports}};var m=w(function(A,d){ -var h=require('@stdlib/assert-is-string/dist').isPrimitive,g=require('@stdlib/assert-is-nonnegative-integer/dist').isPrimitive,f=require('@stdlib/assert-is-collection/dist'),v=require('@stdlib/assert-is-arraybuffer/dist'),y=require('@stdlib/assert-is-object/dist'),u=require('@stdlib/assert-is-function/dist'),c=require('@stdlib/array-ctors/dist'),b=require('@stdlib/blas-ext-base-gfill/dist'),E=require('@stdlib/array-base-filled/dist'),q=require('@stdlib/assert-has-iterator-symbol-support/dist'),s=require('@stdlib/symbol-iterator/dist'),T=require('@stdlib/iter-length/dist'),l=require('@stdlib/error-tools-fmtprodmsg/dist'),p=q();function k(i,e){var a,t;for(a=[];t=i.next(),!t.done;)a.push(e);return a}function M(i,e){var a;for(a=0;a=0&&h(arguments[e])?(a=arguments[e],e-=1):a="float64",t=c(a),t===null)throw new TypeError(l('00j2Y',a));if(a==="generic"){if(e<=0)return[];if(i=arguments[0],r=arguments[1],e===1){if(g(r)?o=r:f(r)&&(o=r.length),o!==void 0)return E(i,o);if(v(r))throw new Error(l('00j04'));if(y(r)){if(p===!1)throw new TypeError(l('00j2Z',r));if(!u(r[s]))throw new TypeError(l('00j2a',r));if(r=r[s](),!u(r.next))throw new TypeError(l('00j2a',r));return k(r,i)}throw new TypeError(l('00j2a',r))}else if(v(r))throw new Error(l('00j04'));throw new TypeError(l('00j2a',r))}if(e<=0)return new t(0);if(e===1)if(r=arguments[1],f(r))n=new t(r.length);else if(v(r))n=new t(r);else if(g(r))n=new t(r);else if(y(r)){if(p===!1)throw new TypeError(l('00j2Z',r));if(!u(r[s]))throw new TypeError(l('00j2a',r));if(r=r[s](),!u(r.next))throw new TypeError(l('00j2a',r));n=new t(T(r))}else throw new TypeError(l('00j2a',r));else e===2?n=new t(arguments[1],arguments[2]):n=new t(arguments[1],arguments[2],arguments[3]);return n.length>0&&(/^complex/.test(a)?M(n,arguments[0]):b(n.length,arguments[0],n,1)),n}d.exports=j -});var V=m();module.exports=V; +"use strict";var w=function(i,e){return function(){return e||i((e={exports:{}}).exports,e),e.exports}};var m=w(function(B,d){ +var h=require('@stdlib/assert-is-string/dist').isPrimitive,g=require('@stdlib/assert-is-nonnegative-integer/dist').isPrimitive,f=require('@stdlib/assert-is-collection/dist'),v=require('@stdlib/assert-is-arraybuffer/dist'),y=require('@stdlib/assert-is-object/dist'),u=require('@stdlib/assert-is-function/dist'),c=require('@stdlib/array-ctors/dist'),b=require('@stdlib/blas-ext-base-gfill/dist'),E=require('@stdlib/array-base-filled/dist'),T=require('@stdlib/assert-has-iterator-symbol-support/dist'),s=require('@stdlib/symbol-iterator/dist'),q=require('@stdlib/iter-length/dist'),k=require('@stdlib/array-defaults/dist'),l=require('@stdlib/error-tools-fmtprodmsg/dist'),p=T(),M=k.get("dtypes.default");function j(i,e){var a,t;for(a=[];t=i.next(),!t.done;)a.push(e);return a}function V(i,e){var a;for(a=0;a=0&&h(arguments[e])?(a=arguments[e],e-=1):a=M,t=c(a),t===null)throw new TypeError(l('00j2Y',a));if(a==="generic"){if(e<=0)return[];if(i=arguments[0],r=arguments[1],e===1){if(g(r)?o=r:f(r)&&(o=r.length),o!==void 0)return E(i,o);if(v(r))throw new Error(l('00j04'));if(y(r)){if(p===!1)throw new TypeError(l('00j2Z',r));if(!u(r[s]))throw new TypeError(l('00j2a',r));if(r=r[s](),!u(r.next))throw new TypeError(l('00j2a',r));return j(r,i)}throw new TypeError(l('00j2a',r))}else if(v(r))throw new Error(l('00j04'));throw new TypeError(l('00j2a',r))}if(e<=0)return new t(0);if(e===1)if(r=arguments[1],f(r))n=new t(r.length);else if(v(r))n=new t(r);else if(g(r))n=new t(r);else if(y(r)){if(p===!1)throw new TypeError(l('00j2Z',r));if(!u(r[s]))throw new TypeError(l('00j2a',r));if(r=r[s](),!u(r.next))throw new TypeError(l('00j2a',r));n=new t(q(r))}else throw new TypeError(l('00j2a',r));else e===2?n=new t(arguments[1],arguments[2]):n=new t(arguments[1],arguments[2],arguments[3]);return n.length>0&&(/^complex/.test(a)?V(n,arguments[0]):b(n.length,arguments[0],n,1)),n}d.exports=A +});var S=m();module.exports=S; /** @license Apache-2.0 */ //# sourceMappingURL=index.js.map diff --git a/dist/index.js.map b/dist/index.js.map index 9b70df5..08a4b31 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../lib/main.js", "../lib/index.js"], - "sourcesContent": ["/**\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 isString = require( '@stdlib/assert-is-string' ).isPrimitive;\nvar isNonNegativeInteger = require( '@stdlib/assert-is-nonnegative-integer' ).isPrimitive;\nvar isCollection = require( '@stdlib/assert-is-collection' );\nvar isArrayBuffer = require( '@stdlib/assert-is-arraybuffer' );\nvar isObject = require( '@stdlib/assert-is-object' );\nvar isFunction = require( '@stdlib/assert-is-function' );\nvar ctors = require( '@stdlib/array-ctors' );\nvar gfill = require( '@stdlib/blas-ext-base-gfill' );\nvar filled = require( '@stdlib/array-base-filled' );\nvar hasIteratorSymbolSupport = require( '@stdlib/assert-has-iterator-symbol-support' );\nvar ITERATOR_SYMBOL = require( '@stdlib/symbol-iterator' );\nvar iterLength = require( '@stdlib/iter-length' );\nvar format = require( '@stdlib/string-format' );\n\n\n// VARIABLES //\n\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Creates a filled \"generic\" array from an iterator.\n*\n* @private\n* @param {Iterator} it - iterator\n* @param {*} value - fill value\n* @returns {Array} filled array\n*/\nfunction filledIterator( it, value ) {\n\tvar arr;\n\tvar v;\n\n\tarr = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tarr.push( value );\n\t}\n\treturn arr;\n}\n\n/**\n* Fills an array exposing accessors for getting and setting array elements.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {*} value - fill value\n* @returns {Collection} input array\n*/\nfunction filledAccessors( arr, value ) {\n\tvar i;\n\tfor ( i = 0; i < arr.length; i++ ) {\n\t\tarr.set( value, i );\n\t}\n\treturn arr;\n}\n\n\n// MAIN //\n\n/**\n* Creates a filled array.\n*\n* @param {*} [value] - fill value\n* @param {(NonNegativeInteger|TypedArray|ArrayLikeObject|ArrayBuffer|Iterable)} [arg] - a length, typed array, array-like object, buffer, or iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} must provide a recognized data type\n* @throws {TypeError} must provide a length, typed array, array-like object, buffer, or iterable\n* @throws {Error} creating a generic array from an `ArrayBuffer` is not supported\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = filledarray();\n* // returns \n*\n* @example\n* var arr = filledarray( 1.0, 2 );\n* // returns [ 1.0, 1.0 ]\n*\n* @example\n* var arr = filledarray( 1.0, 2, 'float32' );\n* // returns [ 1.0, 1.0 ]\n*\n* @example\n* var arr = filledarray( 1.0, 2, 'generic' );\n* // returns [ 1.0, 1.0 ]\n*\n* @example\n* var arr = filledarray( 1.0, [ 0.5, 0.5 ] );\n* // returns [ 1.0, 1.0 ]\n*\n* @example\n* var arr = filledarray( 1, [ 5, -3 ], 'int32' );\n* // returns [ 1, 1 ]\n*\n* @example\n* var arr1 = filledarray( 2, [ 5, 3 ], 'int32' );\n* var arr2 = filledarray( 1.0, arr1 );\n* // returns [ 1.0, 1.0 ]\n*\n* @example\n* var arr1 = filledarray( 2, [ 5, 3 ], 'int32' );\n* var arr2 = filledarray( 1, arr1, 'uint32' );\n* // returns [ 1, 1 ]\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = filledarray( 1.0, buf );\n* // returns [ 1.0, 1.0 ]\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = filledarray( 1.0, buf, 'float32' );\n* // returns [ 1.0, 1.0, 1.0, 1.0 ]\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = filledarray( 1.0, buf, 8 );\n* // returns [ 1.0 ]\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = filledarray( 1.0, buf, 8, 'float32' );\n* // returns [ 1.0, 1.0 ]\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = filledarray( 1.0, buf, 8, 2 );\n* // returns [ 1.0, 1.0 ]\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = filledarray( 1, buf, 8, 2, 'int32' );\n* // returns [ 1, 1 ]\n*/\nfunction filledarray() {\n\tvar value;\n\tvar nargs;\n\tvar dtype;\n\tvar ctor;\n\tvar arr;\n\tvar len;\n\tvar arg;\n\n\tnargs = arguments.length;\n\tnargs -= 1;\n\tif ( nargs >= 0 && isString( arguments[ nargs ] ) ) {\n\t\tdtype = arguments[ nargs ];\n\t\tnargs -= 1;\n\t} else {\n\t\tdtype = 'float64';\n\t}\n\tctor = ctors( dtype );\n\tif ( ctor === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a recognized data type. Value: `%s`.', dtype ) );\n\t}\n\tif ( dtype === 'generic' ) {\n\t\tif ( nargs <= 0 ) {\n\t\t\treturn [];\n\t\t}\n\t\tvalue = arguments[ 0 ];\n\t\targ = arguments[ 1 ];\n\t\tif ( nargs === 1 ) {\n\t\t\tif ( isNonNegativeInteger( arg ) ) {\n\t\t\t\tlen = arg;\n\t\t\t} else if ( isCollection( arg ) ) {\n\t\t\t\tlen = arg.length;\n\t\t\t}\n\t\t\tif ( len !== void 0 ) {\n\t\t\t\treturn filled( value, len );\n\t\t\t}\n\t\t\tif ( isArrayBuffer( arg ) ) {\n\t\t\t\tthrow new Error( 'invalid arguments. Creating a generic array from an ArrayBuffer is not supported.' );\n\t\t\t}\n\t\t\tif ( isObject( arg ) ) {\n\t\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, typed array, or array-like object. Value: `%s`.', arg ) );\n\t\t\t\t}\n\t\t\t\tif ( !isFunction( arg[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.', arg ) );\n\t\t\t\t}\n\t\t\t\targ = arg[ ITERATOR_SYMBOL ]();\n\t\t\t\tif ( !isFunction( arg.next ) ) {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.', arg ) );\n\t\t\t\t}\n\t\t\t\treturn filledIterator( arg, value );\n\t\t\t}\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.', arg ) );\n\t\t} else if ( isArrayBuffer( arg ) ) {\n\t\t\tthrow new Error( 'invalid arguments. Creating a generic array from an ArrayBuffer is not supported.' );\n\t\t}\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.', arg ) );\n\t}\n\tif ( nargs <= 0 ) {\n\t\treturn new ctor( 0 );\n\t}\n\tif ( nargs === 1 ) { // length || array-like || ArrayBuffer || iterable\n\t\targ = arguments[ 1 ];\n\t\tif ( isCollection( arg ) ) {\n\t\t\tarr = new ctor( arg.length );\n\t\t} else if ( isArrayBuffer( arg ) ) {\n\t\t\tarr = new ctor( arg );\n\t\t} else if ( isNonNegativeInteger( arg ) ) {\n\t\t\tarr = new ctor( arg );\n\t\t} else if ( isObject( arg ) ) {\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, typed array, or array-like object. Value: `%s`.', arg ) );\n\t\t\t}\n\t\t\tif ( !isFunction( arg[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.', arg ) );\n\t\t\t}\n\t\t\targ = arg[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( arg.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.', arg ) );\n\t\t\t}\n\t\t\tarr = new ctor( iterLength( arg ) );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.', arg ) );\n\t\t}\n\t} else if ( nargs === 2 ) {\n\t\tarr = new ctor( arguments[1], arguments[2] ); // (ArrayBuffer, byteOffset)\n\t} else {\n\t\tarr = new ctor( arguments[1], arguments[2], arguments[3] ); // (ArrayBuffer, byteOffset, length)\n\t}\n\tif ( arr.length > 0 ) {\n\t\tif ( /^complex/.test( dtype ) ) {\n\t\t\tfilledAccessors( arr, arguments[ 0 ] );\n\t\t} else {\n\t\t\tgfill( arr.length, arguments[ 0 ], arr, 1 );\n\t\t}\n\t}\n\treturn arr;\n}\n\n\n// EXPORTS //\n\nmodule.exports = filledarray;\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* Create a filled array.\n*\n* @module @stdlib/array-filled\n*\n* @example\n* var filledarray = require( '@stdlib/array-filled' );\n*\n* var arr = filledarray();\n* // returns \n*\n* @example\n* var filledarray = require( '@stdlib/array-filled' );\n*\n* var arr = filledarray( 1.0, 2 );\n* // returns [ 1.0, 1.0 ]\n*\n* @example\n* var filledarray = require( '@stdlib/array-filled' );\n*\n* var arr = filledarray( 1.0, 2, 'float32' );\n* // returns [ 1.0, 1.0 ]\n*\n* @example\n* var filledarray = require( '@stdlib/array-filled' );\n*\n* var arr = filledarray( 1.0, 2, 'generic' );\n* // returns [ 1.0, 1.0 ]\n*\n* @example\n* var filledarray = require( '@stdlib/array-filled' );\n*\n* var arr = filledarray( 1.0, [ 0.5, 0.5 ] );\n* // returns [ 1.0, 1.0 ]\n*\n* @example\n* var filledarray = require( '@stdlib/array-filled' );\n*\n* var arr = filledarray( 1, [ 5, -3 ], 'int32' );\n* // returns [ 1, 1 ]\n*\n* @example\n* var filledarray = require( '@stdlib/array-filled' );\n*\n* var arr1 = filledarray( 10, [ 5, 3 ], 'int32' );\n* var arr2 = filledarray( 1.0, arr1 );\n* // returns [ 1.0, 1.0 ]\n*\n* @example\n* var filledarray = require( '@stdlib/array-filled' );\n*\n* var arr1 = filledarray( 1, [ 5, 3 ], 'int32' );\n* var arr2 = filledarray( 2, arr1, 'uint32' );\n* // returns [ 2, 2 ]\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n* var filledarray = require( '@stdlib/array-filled' );\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = filledarray( 1.0, buf );\n* // returns [ 1.0, 1.0 ]\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n* var filledarray = require( '@stdlib/array-filled' );\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = filledarray( 1.0, buf, 'float32' );\n* // returns [ 1.0, 1.0, 1.0, 1.0 ]\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n* var filledarray = require( '@stdlib/array-filled' );\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = filledarray( 1.0, buf, 8 );\n* // returns [ 1.0 ]\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n* var filledarray = require( '@stdlib/array-filled' );\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = filledarray( 1.0, buf, 8, 'float32' );\n* // returns [ 1.0, 1.0 ]\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n* var filledarray = require( '@stdlib/array-filled' );\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = filledarray( 1.0, buf, 8, 2 );\n* // returns [ 1.0, 1.0 ]\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n* var filledarray = require( '@stdlib/array-filled' );\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = filledarray( 1, buf, 8, 2, 'int32' );\n* // returns [ 1, 1 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"], - "mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAW,QAAS,0BAA2B,EAAE,YACjDC,EAAuB,QAAS,uCAAwC,EAAE,YAC1EC,EAAe,QAAS,8BAA+B,EACvDC,EAAgB,QAAS,+BAAgC,EACzDC,EAAW,QAAS,0BAA2B,EAC/CC,EAAa,QAAS,4BAA6B,EACnDC,EAAQ,QAAS,qBAAsB,EACvCC,EAAQ,QAAS,6BAA8B,EAC/CC,EAAS,QAAS,2BAA4B,EAC9CC,EAA2B,QAAS,4CAA6C,EACjFC,EAAkB,QAAS,yBAA0B,EACrDC,EAAa,QAAS,qBAAsB,EAC5CC,EAAS,QAAS,uBAAwB,EAK1CC,EAAsBJ,EAAyB,EAanD,SAASK,EAAgBC,EAAIC,EAAQ,CACpC,IAAIC,EACAC,EAGJ,IADAD,EAAM,CAAC,EAENC,EAAIH,EAAG,KAAK,EACP,CAAAG,EAAE,MAGPD,EAAI,KAAMD,CAAM,EAEjB,OAAOC,CACR,CAUA,SAASE,EAAiBF,EAAKD,EAAQ,CACtC,IAAII,EACJ,IAAMA,EAAI,EAAGA,EAAIH,EAAI,OAAQG,IAC5BH,EAAI,IAAKD,EAAOI,CAAE,EAEnB,OAAOH,CACR,CA8FA,SAASI,GAAc,CACtB,IAAIL,EACAM,EACAC,EACAC,EACAP,EACAQ,EACAC,EAWJ,GATAJ,EAAQ,UAAU,OAClBA,GAAS,EACJA,GAAS,GAAKtB,EAAU,UAAWsB,CAAM,CAAE,GAC/CC,EAAQ,UAAWD,CAAM,EACzBA,GAAS,GAETC,EAAQ,UAETC,EAAOlB,EAAOiB,CAAM,EACfC,IAAS,KACb,MAAM,I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AAUsB,CAAI,EAAI,CAC7B,GAAKb,IAAwB,GAC5B,MAAM,IAAI,UAAWD,EAAQ,sIAAuIc,CAAI,CAAE,EAE3K,GAAK,CAACrB,EAAYqB,EAAKhB,CAAgB,CAAE,EACxC,MAAM,IAAI,UAAWE,EAAQ,wGAAyGc,CAAI,CAAE,EAG7I,GADAA,EAAMA,EAAKhB,CAAgB,EAAE,EACxB,CAACL,EAAYqB,EAAI,IAAK,EAC1B,MAAM,IAAI,UAAWd,EAAQ,wGAAyGc,CAAI,CAAE,EAE7IT,EAAM,IAAIO,EAAMb,EAAYe,CAAI,CAAE,CACnC,KACC,OAAM,IAAI,UAAWd,EAAQ,wGAAyGc,CAAI,CAAE,OAElIJ,IAAU,EACrBL,EAAM,IAAIO,EAAM,UAAU,CAAC,EAAG,UAAU,CAAC,CAAE,EAE3CP,EAAM,IAAIO,EAAM,UAAU,CAAC,EAAG,UAAU,CAAC,EAAG,UAAU,CAAC,CAAE,EAE1D,OAAKP,EAAI,OAAS,IACZ,WAAW,KAAMM,CAAM,EAC3BJ,EAAiBF,EAAK,UAAW,CAAE,CAAE,EAErCV,EAAOU,EAAI,OAAQ,UAAW,CAAE,EAAGA,EAAK,CAAE,GAGrCA,CACR,CAKAlB,EAAO,QAAUsB,ICvJjB,IAAIM,EAAO,IAKX,OAAO,QAAUA", - "names": ["require_main", "__commonJSMin", "exports", "module", "isString", "isNonNegativeInteger", "isCollection", "isArrayBuffer", "isObject", "isFunction", "ctors", "gfill", "filled", "hasIteratorSymbolSupport", "ITERATOR_SYMBOL", "iterLength", "format", "HAS_ITERATOR_SYMBOL", "filledIterator", "it", "value", "arr", "v", "filledAccessors", "i", "filledarray", "nargs", "dtype", "ctor", "len", "arg", "main"] + "sourcesContent": ["/**\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 isString = require( '@stdlib/assert-is-string' ).isPrimitive;\nvar isNonNegativeInteger = require( '@stdlib/assert-is-nonnegative-integer' ).isPrimitive;\nvar isCollection = require( '@stdlib/assert-is-collection' );\nvar isArrayBuffer = require( '@stdlib/assert-is-arraybuffer' );\nvar isObject = require( '@stdlib/assert-is-object' );\nvar isFunction = require( '@stdlib/assert-is-function' );\nvar ctors = require( '@stdlib/array-ctors' );\nvar gfill = require( '@stdlib/blas-ext-base-gfill' );\nvar filled = require( '@stdlib/array-base-filled' );\nvar hasIteratorSymbolSupport = require( '@stdlib/assert-has-iterator-symbol-support' );\nvar ITERATOR_SYMBOL = require( '@stdlib/symbol-iterator' );\nvar iterLength = require( '@stdlib/iter-length' );\nvar defaults = require( '@stdlib/array-defaults' );\nvar format = require( '@stdlib/string-format' );\n\n\n// VARIABLES //\n\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\nvar DEFAULT_DTYPE = defaults.get( 'dtypes.default' );\n\n\n// FUNCTIONS //\n\n/**\n* Creates a filled \"generic\" array from an iterator.\n*\n* @private\n* @param {Iterator} it - iterator\n* @param {*} value - fill value\n* @returns {Array} filled array\n*/\nfunction filledIterator( it, value ) {\n\tvar arr;\n\tvar v;\n\n\tarr = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tarr.push( value );\n\t}\n\treturn arr;\n}\n\n/**\n* Fills an array exposing accessors for getting and setting array elements.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {*} value - fill value\n* @returns {Collection} input array\n*/\nfunction filledAccessors( arr, value ) {\n\tvar i;\n\tfor ( i = 0; i < arr.length; i++ ) {\n\t\tarr.set( value, i );\n\t}\n\treturn arr;\n}\n\n\n// MAIN //\n\n/**\n* Creates a filled array.\n*\n* @param {*} [value] - fill value\n* @param {(NonNegativeInteger|TypedArray|ArrayLikeObject|ArrayBuffer|Iterable)} [arg] - a length, typed array, array-like object, buffer, or iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @param {string} [dtype=\"float64\"] - data type\n* @throws {TypeError} must provide a recognized data type\n* @throws {TypeError} must provide a length, typed array, array-like object, buffer, or iterable\n* @throws {Error} creating a generic array from an `ArrayBuffer` is not supported\n* @returns {(TypedArray|Array|ComplexArray)} array or typed array\n*\n* @example\n* var arr = filledarray();\n* // returns \n*\n* @example\n* var arr = filledarray( 1.0, 2 );\n* // returns [ 1.0, 1.0 ]\n*\n* @example\n* var arr = filledarray( 1.0, 2, 'float32' );\n* // returns [ 1.0, 1.0 ]\n*\n* @example\n* var arr = filledarray( 1.0, 2, 'generic' );\n* // returns [ 1.0, 1.0 ]\n*\n* @example\n* var arr = filledarray( 1.0, [ 0.5, 0.5 ] );\n* // returns [ 1.0, 1.0 ]\n*\n* @example\n* var arr = filledarray( 1, [ 5, -3 ], 'int32' );\n* // returns [ 1, 1 ]\n*\n* @example\n* var arr1 = filledarray( 2, [ 5, 3 ], 'int32' );\n* var arr2 = filledarray( 1.0, arr1 );\n* // returns [ 1.0, 1.0 ]\n*\n* @example\n* var arr1 = filledarray( 2, [ 5, 3 ], 'int32' );\n* var arr2 = filledarray( 1, arr1, 'uint32' );\n* // returns [ 1, 1 ]\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = filledarray( 1.0, buf );\n* // returns [ 1.0, 1.0 ]\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = filledarray( 1.0, buf, 'float32' );\n* // returns [ 1.0, 1.0, 1.0, 1.0 ]\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = filledarray( 1.0, buf, 8 );\n* // returns [ 1.0 ]\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = filledarray( 1.0, buf, 8, 'float32' );\n* // returns [ 1.0, 1.0 ]\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = filledarray( 1.0, buf, 8, 2 );\n* // returns [ 1.0, 1.0 ]\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = filledarray( 1, buf, 8, 2, 'int32' );\n* // returns [ 1, 1 ]\n*/\nfunction filledarray() {\n\tvar value;\n\tvar nargs;\n\tvar dtype;\n\tvar ctor;\n\tvar arr;\n\tvar len;\n\tvar arg;\n\n\tnargs = arguments.length;\n\tnargs -= 1;\n\tif ( nargs >= 0 && isString( arguments[ nargs ] ) ) {\n\t\tdtype = arguments[ nargs ];\n\t\tnargs -= 1;\n\t} else {\n\t\tdtype = DEFAULT_DTYPE;\n\t}\n\tctor = ctors( dtype );\n\tif ( ctor === null ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a recognized data type. Value: `%s`.', dtype ) );\n\t}\n\tif ( dtype === 'generic' ) {\n\t\tif ( nargs <= 0 ) {\n\t\t\treturn [];\n\t\t}\n\t\tvalue = arguments[ 0 ];\n\t\targ = arguments[ 1 ];\n\t\tif ( nargs === 1 ) {\n\t\t\tif ( isNonNegativeInteger( arg ) ) {\n\t\t\t\tlen = arg;\n\t\t\t} else if ( isCollection( arg ) ) {\n\t\t\t\tlen = arg.length;\n\t\t\t}\n\t\t\tif ( len !== void 0 ) {\n\t\t\t\treturn filled( value, len );\n\t\t\t}\n\t\t\tif ( isArrayBuffer( arg ) ) {\n\t\t\t\tthrow new Error( 'invalid arguments. Creating a generic array from an ArrayBuffer is not supported.' );\n\t\t\t}\n\t\t\tif ( isObject( arg ) ) {\n\t\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, typed array, or array-like object. Value: `%s`.', arg ) );\n\t\t\t\t}\n\t\t\t\tif ( !isFunction( arg[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.', arg ) );\n\t\t\t\t}\n\t\t\t\targ = arg[ ITERATOR_SYMBOL ]();\n\t\t\t\tif ( !isFunction( arg.next ) ) {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.', arg ) );\n\t\t\t\t}\n\t\t\t\treturn filledIterator( arg, value );\n\t\t\t}\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.', arg ) );\n\t\t} else if ( isArrayBuffer( arg ) ) {\n\t\t\tthrow new Error( 'invalid arguments. Creating a generic array from an ArrayBuffer is not supported.' );\n\t\t}\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.', arg ) );\n\t}\n\tif ( nargs <= 0 ) {\n\t\treturn new ctor( 0 );\n\t}\n\tif ( nargs === 1 ) { // length || array-like || ArrayBuffer || iterable\n\t\targ = arguments[ 1 ];\n\t\tif ( isCollection( arg ) ) {\n\t\t\tarr = new ctor( arg.length );\n\t\t} else if ( isArrayBuffer( arg ) ) {\n\t\t\tarr = new ctor( arg );\n\t\t} else if ( isNonNegativeInteger( arg ) ) {\n\t\t\tarr = new ctor( arg );\n\t\t} else if ( isObject( arg ) ) {\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, typed array, or array-like object. Value: `%s`.', arg ) );\n\t\t\t}\n\t\t\tif ( !isFunction( arg[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.', arg ) );\n\t\t\t}\n\t\t\targ = arg[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( arg.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.', arg ) );\n\t\t\t}\n\t\t\tarr = new ctor( iterLength( arg ) );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.', arg ) );\n\t\t}\n\t} else if ( nargs === 2 ) {\n\t\tarr = new ctor( arguments[1], arguments[2] ); // (ArrayBuffer, byteOffset)\n\t} else {\n\t\tarr = new ctor( arguments[1], arguments[2], arguments[3] ); // (ArrayBuffer, byteOffset, length)\n\t}\n\tif ( arr.length > 0 ) {\n\t\tif ( /^complex/.test( dtype ) ) {\n\t\t\tfilledAccessors( arr, arguments[ 0 ] );\n\t\t} else {\n\t\t\tgfill( arr.length, arguments[ 0 ], arr, 1 );\n\t\t}\n\t}\n\treturn arr;\n}\n\n\n// EXPORTS //\n\nmodule.exports = filledarray;\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* Create a filled array.\n*\n* @module @stdlib/array-filled\n*\n* @example\n* var filledarray = require( '@stdlib/array-filled' );\n*\n* var arr = filledarray();\n* // returns \n*\n* @example\n* var filledarray = require( '@stdlib/array-filled' );\n*\n* var arr = filledarray( 1.0, 2 );\n* // returns [ 1.0, 1.0 ]\n*\n* @example\n* var filledarray = require( '@stdlib/array-filled' );\n*\n* var arr = filledarray( 1.0, 2, 'float32' );\n* // returns [ 1.0, 1.0 ]\n*\n* @example\n* var filledarray = require( '@stdlib/array-filled' );\n*\n* var arr = filledarray( 1.0, 2, 'generic' );\n* // returns [ 1.0, 1.0 ]\n*\n* @example\n* var filledarray = require( '@stdlib/array-filled' );\n*\n* var arr = filledarray( 1.0, [ 0.5, 0.5 ] );\n* // returns [ 1.0, 1.0 ]\n*\n* @example\n* var filledarray = require( '@stdlib/array-filled' );\n*\n* var arr = filledarray( 1, [ 5, -3 ], 'int32' );\n* // returns [ 1, 1 ]\n*\n* @example\n* var filledarray = require( '@stdlib/array-filled' );\n*\n* var arr1 = filledarray( 10, [ 5, 3 ], 'int32' );\n* var arr2 = filledarray( 1.0, arr1 );\n* // returns [ 1.0, 1.0 ]\n*\n* @example\n* var filledarray = require( '@stdlib/array-filled' );\n*\n* var arr1 = filledarray( 1, [ 5, 3 ], 'int32' );\n* var arr2 = filledarray( 2, arr1, 'uint32' );\n* // returns [ 2, 2 ]\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n* var filledarray = require( '@stdlib/array-filled' );\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = filledarray( 1.0, buf );\n* // returns [ 1.0, 1.0 ]\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n* var filledarray = require( '@stdlib/array-filled' );\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = filledarray( 1.0, buf, 'float32' );\n* // returns [ 1.0, 1.0, 1.0, 1.0 ]\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n* var filledarray = require( '@stdlib/array-filled' );\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = filledarray( 1.0, buf, 8 );\n* // returns [ 1.0 ]\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n* var filledarray = require( '@stdlib/array-filled' );\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = filledarray( 1.0, buf, 8, 'float32' );\n* // returns [ 1.0, 1.0 ]\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n* var filledarray = require( '@stdlib/array-filled' );\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = filledarray( 1.0, buf, 8, 2 );\n* // returns [ 1.0, 1.0 ]\n*\n* @example\n* var ArrayBuffer = require( '@stdlib/array-buffer' );\n* var filledarray = require( '@stdlib/array-filled' );\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = filledarray( 1, buf, 8, 2, 'int32' );\n* // returns [ 1, 1 ]\n*/\n\n// MODULES //\n\nvar main = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = main;\n"], + "mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAW,QAAS,0BAA2B,EAAE,YACjDC,EAAuB,QAAS,uCAAwC,EAAE,YAC1EC,EAAe,QAAS,8BAA+B,EACvDC,EAAgB,QAAS,+BAAgC,EACzDC,EAAW,QAAS,0BAA2B,EAC/CC,EAAa,QAAS,4BAA6B,EACnDC,EAAQ,QAAS,qBAAsB,EACvCC,EAAQ,QAAS,6BAA8B,EAC/CC,EAAS,QAAS,2BAA4B,EAC9CC,EAA2B,QAAS,4CAA6C,EACjFC,EAAkB,QAAS,yBAA0B,EACrDC,EAAa,QAAS,qBAAsB,EAC5CC,EAAW,QAAS,wBAAyB,EAC7CC,EAAS,QAAS,uBAAwB,EAK1CC,EAAsBL,EAAyB,EAC/CM,EAAgBH,EAAS,IAAK,gBAAiB,EAanD,SAASI,EAAgBC,EAAIC,EAAQ,CACpC,IAAIC,EACAC,EAGJ,IADAD,EAAM,CAAC,EAENC,EAAIH,EAAG,KAAK,EACP,CA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R,CAKApB,EAAO,QAAUwB,ICzJjB,IAAIM,EAAO,IAKX,OAAO,QAAUA", + "names": ["require_main", "__commonJSMin", "exports", "module", "isString", "isNonNegativeInteger", "isCollection", "isArrayBuffer", "isObject", "isFunction", "ctors", "gfill", "filled", "hasIteratorSymbolSupport", "ITERATOR_SYMBOL", "iterLength", "defaults", "format", "HAS_ITERATOR_SYMBOL", "DEFAULT_DTYPE", "filledIterator", "it", "value", "arr", "v", "filledAccessors", "i", "filledarray", "nargs", "dtype", "ctor", "len", "arg", "main"] } diff --git a/lib/main.js b/lib/main.js index 03ad19e..1a36607 100644 --- a/lib/main.js +++ b/lib/main.js @@ -32,12 +32,14 @@ var filled = require( '@stdlib/array-base-filled' ); var hasIteratorSymbolSupport = require( '@stdlib/assert-has-iterator-symbol-support' ); var ITERATOR_SYMBOL = require( '@stdlib/symbol-iterator' ); var iterLength = require( '@stdlib/iter-length' ); +var defaults = require( '@stdlib/array-defaults' ); var format = require( '@stdlib/string-format' ); // VARIABLES // var HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport(); +var DEFAULT_DTYPE = defaults.get( 'dtypes.default' ); // FUNCTIONS // @@ -188,7 +190,7 @@ function filledarray() { dtype = arguments[ nargs ]; nargs -= 1; } else { - dtype = 'float64'; + dtype = DEFAULT_DTYPE; } ctor = ctors( dtype ); if ( ctor === null ) { diff --git a/package.json b/package.json index c3d67e0..e220eb1 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "dependencies": { "@stdlib/array-base-filled": "^0.1.0", "@stdlib/array-ctors": "^0.1.0", + "@stdlib/array-defaults": "^0.1.0", "@stdlib/assert-has-iterator-symbol-support": "^0.1.1", "@stdlib/assert-is-arraybuffer": "^0.1.1", "@stdlib/assert-is-collection": "^0.1.0",