File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed
lib/node_modules/@stdlib/ndarray/base/unary-reduce-strided1d-to-struct/lib Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ /**
2
+ * @license Apache-2.0
3
+ *
4
+ * Copyright (c) 2025 The Stdlib Authors.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+
19
+ 'use strict' ;
20
+
21
+ // MAIN //
22
+
23
+ /**
24
+ * Resolves index offsets from a list of ndarray-like objects.
25
+ *
26
+ * @private
27
+ * @param {ArrayLikeObject<Object> } arrays - list of ndarray-like objects
28
+ * @returns {NonNegativeIntegerArray } list of offsets
29
+ */
30
+ function offsets ( arrays ) {
31
+ var out = [ ] ;
32
+ var i ;
33
+ for ( i = 0 ; i < arrays . length ; i ++ ) {
34
+ out . push ( arrays [ i ] . offset ) ;
35
+ }
36
+ return out ;
37
+ }
38
+
39
+
40
+ // EXPORTS //
41
+
42
+ module . exports = offsets ;
You can’t perform that action at this time.
0 commit comments