Skip to content

Commit a1ced57

Browse files
committed
Update artifacts
1 parent 62aa42f commit a1ced57

File tree

4 files changed

+51
-45
lines changed

4 files changed

+51
-45
lines changed

ndarray/copy/coverage.ndjson

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[166,166,100,21,21,100,1,1,100,166,166,100,"62b9955f7b5f64b608e094384712f01c65bb9721","2025-11-10 13:57:33 +0500"]
1+
[168,168,100,21,21,100,1,1,100,168,168,100,"ca4e0db0f330e00f21c426c67026727d9c8110fe","2025-11-11 23:01:37 -0800"]

ndarray/copy/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ <h1>All files</h1>
2525
<div class='fl pad1y space-right2'>
2626
<span class="strong">100% </span>
2727
<span class="quiet">Statements</span>
28-
<span class='fraction'>166/166</span>
28+
<span class='fraction'>168/168</span>
2929
</div>
3030

3131

@@ -46,7 +46,7 @@ <h1>All files</h1>
4646
<div class='fl pad1y space-right2'>
4747
<span class="strong">100% </span>
4848
<span class="quiet">Lines</span>
49-
<span class='fraction'>166/166</span>
49+
<span class='fraction'>168/168</span>
5050
</div>
5151

5252

@@ -99,13 +99,13 @@ <h1>All files</h1>
9999
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
100100
</td>
101101
<td data-value="100" class="pct high">100%</td>
102-
<td data-value="118" class="abs high">118/118</td>
102+
<td data-value="120" class="abs high">120/120</td>
103103
<td data-value="100" class="pct high">100%</td>
104104
<td data-value="20" class="abs high">20/20</td>
105105
<td data-value="100" class="pct high">100%</td>
106106
<td data-value="1" class="abs high">1/1</td>
107107
<td data-value="100" class="pct high">100%</td>
108-
<td data-value="118" class="abs high">118/118</td>
108+
<td data-value="120" class="abs high">120/120</td>
109109
</tr>
110110

111111
</tbody>
@@ -116,7 +116,7 @@ <h1>All files</h1>
116116
<div class='footer quiet pad2 space-top1 center small'>
117117
Code coverage generated by
118118
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
119-
at 2025-11-10T09:04:13.378Z
119+
at 2025-11-12T07:04:13.800Z
120120
</div>
121121
<script src="prettify.js"></script>
122122
<script>

ndarray/copy/index.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ <h1><a href="index.html">All files</a> index.js</h1>
214214
<div class='footer quiet pad2 space-top1 center small'>
215215
Code coverage generated by
216216
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
217-
at 2025-11-10T09:04:13.378Z
217+
at 2025-11-12T07:04:13.800Z
218218
</div>
219219
<script src="prettify.js"></script>
220220
<script>

ndarray/copy/main.js.html

Lines changed: 44 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ <h1><a href="index.html">All files</a> main.js</h1>
2525
<div class='fl pad1y space-right2'>
2626
<span class="strong">100% </span>
2727
<span class="quiet">Statements</span>
28-
<span class='fraction'>118/118</span>
28+
<span class='fraction'>120/120</span>
2929
</div>
3030

3131

@@ -46,7 +46,7 @@ <h1><a href="index.html">All files</a> main.js</h1>
4646
<div class='fl pad1y space-right2'>
4747
<span class="strong">100% </span>
4848
<span class="quiet">Lines</span>
49-
<span class='fraction'>118/118</span>
49+
<span class='fraction'>120/120</span>
5050
</div>
5151

5252

@@ -181,7 +181,9 @@ <h1><a href="index.html">All files</a> main.js</h1>
181181
<a name='L116'></a><a href='#L116'>116</a>
182182
<a name='L117'></a><a href='#L117'>117</a>
183183
<a name='L118'></a><a href='#L118'>118</a>
184-
<a name='L119'></a><a href='#L119'>119</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
184+
<a name='L119'></a><a href='#L119'>119</a>
185+
<a name='L120'></a><a href='#L120'>120</a>
186+
<a name='L121'></a><a href='#L121'>121</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
185187
<span class="cline-any cline-yes">1x</span>
186188
<span class="cline-any cline-yes">1x</span>
187189
<span class="cline-any cline-yes">1x</span>
@@ -246,44 +248,43 @@ <h1><a href="index.html">All files</a> main.js</h1>
246248
<span class="cline-any cline-yes">1x</span>
247249
<span class="cline-any cline-yes">1x</span>
248250
<span class="cline-any cline-yes">1x</span>
249-
<span class="cline-any cline-yes">1x</span>
250-
<span class="cline-any cline-yes">1x</span>
251-
<span class="cline-any cline-yes">90x</span>
252-
<span class="cline-any cline-yes">90x</span>
253-
<span class="cline-any cline-yes">90x</span>
254-
<span class="cline-any cline-yes">90x</span>
255-
<span class="cline-any cline-yes">90x</span>
256-
<span class="cline-any cline-yes">90x</span>
257-
<span class="cline-any cline-yes">90x</span>
251+
<span class="cline-any cline-yes">94x</span>
252+
<span class="cline-any cline-yes">94x</span>
253+
<span class="cline-any cline-yes">94x</span>
254+
<span class="cline-any cline-yes">94x</span>
255+
<span class="cline-any cline-yes">94x</span>
256+
<span class="cline-any cline-yes">94x</span>
257+
<span class="cline-any cline-yes">94x</span>
258+
<span class="cline-any cline-yes">94x</span>
258259
<span class="cline-any cline-yes">20x</span>
259260
<span class="cline-any cline-yes">20x</span>
260-
<span class="cline-any cline-yes">70x</span>
261-
<span class="cline-any cline-yes">70x</span>
262-
<span class="cline-any cline-yes">90x</span>
263-
<span class="cline-any cline-yes">56x</span>
264-
<span class="cline-any cline-yes">56x</span>
261+
<span class="cline-any cline-yes">74x</span>
262+
<span class="cline-any cline-yes">94x</span>
263+
<span class="cline-any cline-yes">60x</span>
264+
<span class="cline-any cline-yes">60x</span>
265265
<span class="cline-any cline-yes">8x</span>
266266
<span class="cline-any cline-yes">8x</span>
267-
<span class="cline-any cline-yes">56x</span>
268-
<span class="cline-any cline-yes">20x</span>
269-
<span class="cline-any cline-yes">9x</span>
270-
<span class="cline-any cline-yes">9x</span>
267+
<span class="cline-any cline-yes">52x</span>
268+
<span class="cline-any cline-yes">60x</span>
269+
<span class="cline-any cline-yes">24x</span>
270+
<span class="cline-any cline-yes">13x</span>
271+
<span class="cline-any cline-yes">13x</span>
271272
<span class="cline-any cline-yes">11x</span>
272-
<span class="cline-any cline-yes">56x</span>
273+
<span class="cline-any cline-yes">60x</span>
273274
<span class="cline-any cline-yes">28x</span>
274275
<span class="cline-any cline-yes">28x</span>
275-
<span class="cline-any cline-yes">56x</span>
276+
<span class="cline-any cline-yes">60x</span>
276277
<span class="cline-any cline-yes">21x</span>
277-
<span class="cline-any cline-yes">56x</span>
278+
<span class="cline-any cline-yes">60x</span>
278279
<span class="cline-any cline-yes">18x</span>
279280
<span class="cline-any cline-yes">18x</span>
280-
<span class="cline-any cline-yes">56x</span>
281+
<span class="cline-any cline-yes">60x</span>
281282
<span class="cline-any cline-yes">10x</span>
282283
<span class="cline-any cline-yes">10x</span>
283-
<span class="cline-any cline-yes">56x</span>
284+
<span class="cline-any cline-yes">60x</span>
284285
<span class="cline-any cline-yes">9x</span>
285286
<span class="cline-any cline-yes">9x</span>
286-
<span class="cline-any cline-yes">90x</span>
287+
<span class="cline-any cline-yes">94x</span>
287288
<span class="cline-any cline-yes">14x</span>
288289
<span class="cline-any cline-yes">14x</span>
289290
<span class="cline-any cline-yes">14x</span>
@@ -293,7 +294,10 @@ <h1><a href="index.html">All files</a> main.js</h1>
293294
<span class="cline-any cline-yes">53x</span>
294295
<span class="cline-any cline-yes">53x</span>
295296
<span class="cline-any cline-yes">53x</span>
296-
<span class="cline-any cline-yes">90x</span>
297+
<span class="cline-any cline-yes">53x</span>
298+
<span class="cline-any cline-yes">53x</span>
299+
<span class="cline-any cline-yes">53x</span>
300+
<span class="cline-any cline-yes">94x</span>
297301
<span class="cline-any cline-yes">1x</span>
298302
<span class="cline-any cline-yes">1x</span>
299303
<span class="cline-any cline-yes">1x</span>
@@ -336,20 +340,18 @@ <h1><a href="index.html">All files</a> main.js</h1>
336340
// MAIN //
337341
&nbsp;
338342
/**
339-
* Copy an input ndarray to a new ndarray having the same shape and data type.
343+
* Copies an input ndarray to a new ndarray having the same shape and data type.
340344
*
341345
* @param {ndarray} x - input array
342346
* @param {Options} [options] - function options
343-
* @param {string} [options.dtype] - output array data type (overrides the input array's inferred data type)
347+
* @param {*} [options.dtype] - output array data type (overrides the input array's inferred data type)
344348
* @param {string} [options.order] - specifies whether the output array should be 'row-major' (C-style) or 'column-major' (Fortran-style) (overrides the input array's inferred order)
345-
* @param {(NonNegativeIntegerArray|NonNegativeInteger)} [options.shape] - output array shape (overrides the input array's inferred shape)
346349
* @param {string} [options.mode="throw"] - specifies how to handle indices which exceed array dimensions
347350
* @param {StringArray} [options.submode=["throw"]] - specifies how to handle subscripts which exceed array dimensions on a per dimension basis
348351
* @throws {TypeError} first argument must be an ndarray-like object
349352
* @throws {TypeError} options argument must be an object
350353
* @throws {TypeError} `dtype` option must be a supported ndarray data type
351354
* @throws {TypeError} `order` option must be a supported order
352-
* @throws {TypeError} `shape` option must be either a nonnegative integer or an array of nonnegative integers
353355
* @throws {TypeError} must provide valid options
354356
* @returns {ndarray} ndarray
355357
*
@@ -370,25 +372,26 @@ <h1><a href="index.html">All files</a> main.js</h1>
370372
var options;
371373
var opts;
372374
var sh;
375+
var dt;
373376
var o;
374377
&nbsp;
375378
if ( !isndarrayLike( x ) ) {
376379
throw new TypeError( format( 'invalid argument. First argument must be an ndarray-like object. Value: `%s`.', x ) );
377380
}
378-
// Resolve function options:
379381
opts = {};
380382
if ( arguments.length &gt; 1 ) {
381383
options = arguments[ 1 ];
382384
if ( !isPlainObject( options ) ) {
383385
throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );
384386
}
387+
dt = getDType( x );
385388
if ( hasOwnProp( options, 'dtype' ) ) {
386-
if ( !isMostlySafeCast( getDType( x ), options.dtype ) ) {
387-
throw new TypeError( format( 'invalid option. `%s` option must be safely castable. Option: `%s`.', 'dtype', options.dtype ) );
389+
if ( !isMostlySafeCast( dt, options.dtype ) ) {
390+
throw new TypeError( format( 'invalid option. First argument cannot be safely cast to the specified data type. Input data type: %s. Option: `%s`.', String( dt ), String( options.dtype ) ) );
388391
}
389392
opts.dtype = options.dtype;
390393
} else {
391-
opts.dtype = getDType( x );
394+
opts.dtype = dt;
392395
}
393396
if ( hasOwnProp( options, 'order' ) ) {
394397
opts.order = options.order;
@@ -407,9 +410,12 @@ <h1><a href="index.html">All files</a> main.js</h1>
407410
}
408411
sh = getShape( x );
409412
&nbsp;
410-
// Create a copy of the input ndarray:
413+
// Initialize an output array:
411414
o = empty( sh, opts );
415+
&nbsp;
416+
// Copy the input array to the output array:
412417
assign( [ x, o ] );
418+
&nbsp;
413419
return o;
414420
}
415421
&nbsp;
@@ -424,7 +430,7 @@ <h1><a href="index.html">All files</a> main.js</h1>
424430
<div class='footer quiet pad2 space-top1 center small'>
425431
Code coverage generated by
426432
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
427-
at 2025-11-10T09:04:13.378Z
433+
at 2025-11-12T07:04:13.800Z
428434
</div>
429435
<script src="prettify.js"></script>
430436
<script>

0 commit comments

Comments
 (0)