diff --git a/array/coverage.ndjson b/array/coverage.ndjson index ef635bd9b8..7c002ce161 100644 --- a/array/coverage.ndjson +++ b/array/coverage.ndjson @@ -7,3 +7,4 @@ [721,721,100,1,1,100,0,0,100,721,721,100,"68413e05376206b18c4ff8662a8568a189dad77e","2024-01-09 18:51:05 -0800"] [730,730,100,1,1,100,0,0,100,730,730,100,"74e8faa7a531123f28b662d5cd1278caaa36f40a","2024-01-18 14:42:55 -0800"] [739,739,100,1,1,100,0,0,100,739,739,100,"2771f9ec78932b40f1f002121c7cc737be37475e","2024-01-18 14:55:48 -0800"] +[748,748,100,1,1,100,0,0,100,748,748,100,"1edcd857cddcac22c1546b48e7978823969321b1","2024-01-18 16:05:36 -0800"] diff --git a/array/index.html b/array/index.html index eeb14a51fe..6571078a17 100644 --- a/array/index.html +++ b/array/index.html @@ -25,7 +25,7 @@

All files array/lib

100% Statements - 739/739 + 748/748
@@ -46,7 +46,7 @@

All files array/lib

100% Lines - 739/739 + 748/748
@@ -84,13 +84,13 @@

All files array/lib

100% - 739/739 + 748/748 100% 1/1 100% 0/0 100% - 739/739 + 748/748 @@ -101,7 +101,7 @@

All files array/lib

+ + + + + + \ No newline at end of file diff --git a/array/zero-to-like/index.js.html b/array/zero-to-like/index.js.html new file mode 100644 index 0000000000..374a9ca25d --- /dev/null +++ b/array/zero-to-like/index.js.html @@ -0,0 +1,223 @@ + + + + + + Code coverage report for array/zero-to-like/lib/index.js + + + + + + + + + +
+
+

All files / array/zero-to-like/lib index.js

+
+ +
+ 100% + Statements + 46/46 +
+ + +
+ 100% + Branches + 1/1 +
+ + +
+ 100% + Functions + 0/0 +
+ + +
+ 100% + Lines + 46/46 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +471x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x + 
/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+ 
+'use strict';
+ 
+/**
+* Generate a linearly spaced numeric array whose elements increment by 1 starting from zero and having the same length and data type as a provided input array.
+*
+* @module @stdlib/array/zero-to-like
+*
+* @example
+* var zeroToLike = require( '@stdlib/array/zero-to-like' );
+*
+* var arr = zeroToLike( [ 0.0, 0.0 ] );
+* // returns [ 0.0, 1.0 ]
+*
+* @example
+* var zeroToLike = require( '@stdlib/array/zero-to-like' );
+*
+* var arr = zeroToLike( [ 0.0, 0.0 ], 'float32' );
+* // returns <Float32Array>[ 0.0, 1.0 ]
+*/
+ 
+// MODULES //
+ 
+var main = require( './main.js' );
+ 
+ 
+// EXPORTS //
+ 
+module.exports = main;
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/array/zero-to-like/main.js.html b/array/zero-to-like/main.js.html new file mode 100644 index 0000000000..0d57e67e21 --- /dev/null +++ b/array/zero-to-like/main.js.html @@ -0,0 +1,268 @@ + + + + + + Code coverage report for array/zero-to-like/lib/main.js + + + + + + + + + +
+
+

All files / array/zero-to-like/lib main.js

+
+ +
+ 100% + Statements + 61/61 +
+ + +
+ 100% + Branches + 6/6 +
+ + +
+ 100% + Functions + 1/1 +
+ + +
+ 100% + Lines + 61/61 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+ +
+
+

+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +621x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +1x +60x +60x +60x +20x +20x +60x +28x +28x +40x +60x +1x +1x +1x +1x +1x + 
/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*    http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+ 
+'use strict';
+ 
+// MODULES //
+ 
+var zeroTo = require( '@stdlib/array/zero-to' );
+var dtype = require( '@stdlib/array/dtype' );
+var format = require( '@stdlib/string/format' );
+ 
+ 
+// MAIN //
+ 
+/**
+* Generates a linearly spaced numeric array whose elements increment by 1 starting from zero and having the same length and data type as a provided input array.
+*
+* @param {(TypedArray|Array|ComplexArray)} x - input array
+* @param {string} [dtype="float64"] - data type
+* @throws {TypeError} first argument must be an array or typed array
+* @throws {TypeError} second argument must be a recognized data type
+* @returns {(TypedArray|Array|ComplexArray)} array or typed array
+*
+* @example
+* var arr = zeroToLike( [ 0.0, 0.0 ] );
+* // returns [ 0.0, 1.0 ]
+*
+* @example
+* var arr = zeroToLike( [ 0.0, 0.0 ], 'float32' );
+* // returns <Float32Array>[ 0.0, 1.0 ]
+*/
+function zeroToLike( x ) {
+	var dt = dtype( x ); // delegate input argument validation to dtype resolution
+	if ( dt === null ) {
+		throw new TypeError( format( 'invalid argument. First argument must be either an array, typed array, or complex typed array. Value: `%s`.', x ) );
+	}
+	if ( arguments.length > 1 ) {
+		dt = arguments[ 1 ];
+	}
+	return zeroTo( x.length, dt );
+}
+ 
+ 
+// EXPORTS //
+ 
+module.exports = zeroToLike;
+ 
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/namespace/alias2pkg/coverage.ndjson b/namespace/alias2pkg/coverage.ndjson index c7a2e4bcdc..f3b227ce23 100644 --- a/namespace/alias2pkg/coverage.ndjson +++ b/namespace/alias2pkg/coverage.ndjson @@ -65,3 +65,4 @@ [95,95,100,7,7,100,1,1,100,95,95,100,"9f7eb57ca2732c54dcf42b65b027f9422e8fce30","2024-01-17 18:24:32 -0800"] [95,95,100,7,7,100,1,1,100,95,95,100,"74e8faa7a531123f28b662d5cd1278caaa36f40a","2024-01-18 14:42:55 -0800"] [95,95,100,7,7,100,1,1,100,95,95,100,"2771f9ec78932b40f1f002121c7cc737be37475e","2024-01-18 14:55:48 -0800"] +[95,95,100,7,7,100,1,1,100,95,95,100,"1edcd857cddcac22c1546b48e7978823969321b1","2024-01-18 16:05:36 -0800"] diff --git a/namespace/alias2pkg/index.html b/namespace/alias2pkg/index.html index 2d0d2f5b6d..0925354968 100644 --- a/namespace/alias2pkg/index.html +++ b/namespace/alias2pkg/index.html @@ -116,7 +116,7 @@

All files namespace/alias2pkg/lib