diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index 72b0788..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2023-08-01T02:13:21.924Z diff --git a/.github/workflows/productionize.yml b/.github/workflows/productionize.yml index 334eb59..91f2b93 100644 --- a/.github/workflows/productionize.yml +++ b/.github/workflows/productionize.yml @@ -82,21 +82,6 @@ jobs: id: transform-error-messages uses: stdlib-js/transform-errors-action@main - # Format error messages: - - name: 'Replace double quotes with single quotes in rewritten format string error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \; - - # Format string literal error messages: - - name: 'Replace double quotes with single quotes in rewritten string literal error messages' - run: | - find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \; - - # Format code: - - name: 'Replace double quotes with single quotes in inserted `require` calls' - run: | - find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \; - # Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency: - name: 'Update dependencies in package.json' run: | diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 0000000..248635e --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,3 @@ +/// +import dnannsumors from '../docs/types/index'; +export = dnannsumors; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 0000000..225010c --- /dev/null +++ b/dist/index.js @@ -0,0 +1,9 @@ +"use strict";var p=function(v,a){return function(){return a||v((a={exports:{}}).exports,a),a.exports}};var _=p(function(I,R){ +var j=require('@stdlib/math-base-assert-is-nan/dist');function x(v,a,m,e,r){var s,q,n,f,i;if(m<0?q=(1-v)*m:q=0,r<0?n=-r:n=0,s=0,v<=0)return e[n]=s,e[n+r]=0,e;if(v===1||m===0)return j(a[q])?(e[n]=s,e[n+r]=0,e):(e[n]=a[q],e[n+r]=1,e);for(f=0,i=0;i[ 1.0, 3 ]\n*/\nfunction dnannsumors( N, x, strideX, out, strideOut ) {\n\tvar sum;\n\tvar ix;\n\tvar io;\n\tvar n;\n\tvar i;\n\n\tif ( strideX < 0 ) {\n\t\tix = (1-N) * strideX;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( strideOut < 0 ) {\n\t\tio = -strideOut;\n\t} else {\n\t\tio = 0;\n\t}\n\tsum = 0.0;\n\tif ( N <= 0 ) {\n\t\tout[ io ] = sum;\n\t\tout[ io+strideOut ] = 0;\n\t\treturn out;\n\t}\n\tif ( N === 1 || strideX === 0 ) {\n\t\tif ( isnan( x[ ix ] ) ) {\n\t\t\tout[ io ] = sum;\n\t\t\tout[ io+strideOut ] = 0;\n\t\t\treturn out;\n\t\t}\n\t\tout[ io ] = x[ ix ];\n\t\tout[ io+strideOut ] = 1;\n\t\treturn out;\n\t}\n\tn = 0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tif ( isnan( x[ ix ] ) === false ) {\n\t\t\tsum += x[ ix ];\n\t\t\tn += 1;\n\t\t}\n\t\tix += strideX;\n\t}\n\tout[ io ] = sum;\n\tout[ io+strideOut ] = n;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnannsumors;\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// MODULES //\n\nvar isnan = require( '@stdlib/math-base-assert-is-nan' );\n\n\n// MAIN //\n\n/**\n* Computes the sum of double-precision floating-point strided array elements, ignoring `NaN` values and using ordinary recursive summation.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float64Array} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - `x` starting index\n* @param {Float64Array} out - output array\n* @param {integer} strideOut - `out` stride length\n* @param {NonNegativeInteger} offsetOut - `out` starting index\n* @returns {Float64Array} output array\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var floor = require( '@stdlib/math-base-special-floor' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var out = new Float64Array( 2 );\n*\n* var N = floor( x.length / 2 );\n*\n* var v = dnannsumors( N, x, 2, 1, out, 1, 0 );\n* // returns [ 5.0, 4 ]\n*/\nfunction dnannsumors( N, x, strideX, offsetX, out, strideOut, offsetOut ) {\n\tvar sum;\n\tvar ix;\n\tvar io;\n\tvar n;\n\tvar i;\n\n\tix = offsetX;\n\tio = offsetOut;\n\n\tsum = 0.0;\n\tif ( N <= 0 ) {\n\t\tout[ io ] = sum;\n\t\tout[ io+strideOut ] = 0;\n\t\treturn out;\n\t}\n\tif ( N === 1 || strideX === 0 ) {\n\t\tif ( isnan( x[ ix ] ) ) {\n\t\t\tout[ io ] = sum;\n\t\t\tout[ io+strideOut ] = 0;\n\t\t\treturn out;\n\t\t}\n\t\tout[ io ] = x[ ix ];\n\t\tout[ io+strideOut ] = 1;\n\t\treturn out;\n\t}\n\tn = 0;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tif ( isnan( x[ ix ] ) === false ) {\n\t\t\tsum += x[ ix ];\n\t\t\tn += 1;\n\t\t}\n\t\tix += strideX;\n\t}\n\tout[ io ] = sum;\n\tout[ io+strideOut ] = n;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnannsumors;\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// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar dnannsumors = require( './dnannsumors.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( dnannsumors, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = dnannsumors;\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* Compute the sum of double-precision floating-point strided array elements, ignoring `NaN` values and using ordinary recursive summation.\n*\n* @module @stdlib/blas-ext-base-dnannsumors\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var dnannsumors = require( '@stdlib/blas-ext-base-dnannsumors' );\n*\n* var x = new Float64Array( [ 1.0, -2.0, NaN, 2.0 ] );\n* var out = new Float64Array( 2 );\n*\n* var v = dnannsumors( x.length, x, 1, out, 1 );\n* // returns [ 1.0, 3 ]\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var floor = require( '@stdlib/math-base-special-floor' );\n* var dnannsumors = require( '@stdlib/blas-ext-base-dnannsumors' );\n*\n* var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );\n* var out = new Float64Array( 2 );\n*\n* var N = floor( x.length / 2 );\n*\n* var v = dnannsumors.ndarray( N, x, 2, 1, out, 1, 0 );\n* // returns [ 5.0, 4 ]\n*/\n\n// MODULES //\n\nvar join = require( 'path' ).join;\nvar tryRequire = require( '@stdlib/utils-try-require' );\nvar isError = require( '@stdlib/assert-is-error' );\nvar main = require( './main.js' );\n\n\n// MAIN //\n\nvar dnannsumors;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tdnannsumors = main;\n} else {\n\tdnannsumors = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = dnannsumors;\n\n// exports: { \"ndarray\": \"dnannsumors.ndarray\" }\n"], + "mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAQ,QAAS,iCAAkC,EAwBvD,SAASC,EAAaC,EAAGC,EAAGC,EAASC,EAAKC,EAAY,CACrD,IAAIC,EACAC,EACAC,EACAC,EACA,EAaJ,GAXKN,EAAU,EACdI,GAAM,EAAEN,GAAKE,EAEbI,EAAK,EAEDF,EAAY,EAChBG,EAAK,CAACH,EAENG,EAAK,EAENF,EAAM,EACDL,GAAK,EACT,OAAAG,EAAKI,CAAG,EAAIF,EACZF,EAAKI,EAAGH,CAAU,EAAI,EACfD,EAER,GAAKH,IAAM,GAAKE,IAAY,EAC3B,OAAKJ,EAAOG,EAAGK,CAAG,CAAE,GACnBH,EAAKI,CAAG,EAAIF,EACZF,EAAKI,EAAGH,CAAU,EAAI,EACfD,IAERA,EAAKI,CAAG,EAAIN,EAAGK,CAAG,EAClBH,EAAKI,EAAGH,CAAU,EAAI,EACfD,GAGR,IADAK,EAAI,EACE,EAAI,EAAG,EAAIR,EAAG,IACdF,EAAOG,EAAGK,CAAG,CAAE,IAAM,KACzBD,GAAOJ,EAAGK,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AAW,aAAc,CAAE,EAClDE,EAASG,CAAI,EACjBD,EAAcD,EAEdC,EAAcC,EAMf,OAAO,QAAUD", + "names": ["require_dnannsumors", "__commonJSMin", "exports", "module", "isnan", "dnannsumors", "N", "x", "strideX", "out", "strideOut", "sum", "ix", "io", "n", "require_ndarray", "__commonJSMin", "exports", "module", "isnan", "dnannsumors", "N", "x", "strideX", "offsetX", "out", "strideOut", "offsetOut", "sum", "ix", "io", "n", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "dnannsumors", "ndarray", "join", "tryRequire", "isError", "main", "dnannsumors", "tmp"] +} diff --git a/docs/types/index.d.ts b/docs/types/index.d.ts index 50f4a4b..11f364e 100644 --- a/docs/types/index.d.ts +++ b/docs/types/index.d.ts @@ -16,7 +16,7 @@ * limitations under the License. */ -// TypeScript Version: 2.0 +// TypeScript Version: 4.1 /** * Interface describing `dnannsumors`.