@stdlib/ndarray-base-unary-reduce-strided1d 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/LICENSE +177 -0
  2. package/NOTICE +1 -0
  3. package/README.md +302 -0
  4. package/SECURITY.md +5 -0
  5. package/dist/index.js +101 -0
  6. package/dist/index.js.map +7 -0
  7. package/lib/0d.js +114 -0
  8. package/lib/0d_accessors.js +119 -0
  9. package/lib/10d.js +291 -0
  10. package/lib/10d_accessors.js +299 -0
  11. package/lib/10d_blocked.js +413 -0
  12. package/lib/10d_blocked_accessors.js +421 -0
  13. package/lib/1d.js +167 -0
  14. package/lib/1d_accessors.js +175 -0
  15. package/lib/2d.js +193 -0
  16. package/lib/2d_accessors.js +201 -0
  17. package/lib/2d_blocked.js +227 -0
  18. package/lib/2d_blocked_accessors.js +235 -0
  19. package/lib/3d.js +205 -0
  20. package/lib/3d_accessors.js +213 -0
  21. package/lib/3d_blocked.js +252 -0
  22. package/lib/3d_blocked_accessors.js +260 -0
  23. package/lib/4d.js +217 -0
  24. package/lib/4d_accessors.js +225 -0
  25. package/lib/4d_blocked.js +275 -0
  26. package/lib/4d_blocked_accessors.js +283 -0
  27. package/lib/5d.js +229 -0
  28. package/lib/5d_accessors.js +237 -0
  29. package/lib/5d_blocked.js +298 -0
  30. package/lib/5d_blocked_accessors.js +306 -0
  31. package/lib/6d.js +243 -0
  32. package/lib/6d_accessors.js +251 -0
  33. package/lib/6d_blocked.js +321 -0
  34. package/lib/6d_blocked_accessors.js +329 -0
  35. package/lib/7d.js +255 -0
  36. package/lib/7d_accessors.js +263 -0
  37. package/lib/7d_blocked.js +344 -0
  38. package/lib/7d_blocked_accessors.js +352 -0
  39. package/lib/8d.js +267 -0
  40. package/lib/8d_accessors.js +275 -0
  41. package/lib/8d_blocked.js +367 -0
  42. package/lib/8d_blocked_accessors.js +375 -0
  43. package/lib/9d.js +279 -0
  44. package/lib/9d_accessors.js +287 -0
  45. package/lib/9d_blocked.js +390 -0
  46. package/lib/9d_blocked_accessors.js +398 -0
  47. package/lib/factory.js +126 -0
  48. package/lib/increment_offsets.js +46 -0
  49. package/lib/index.js +161 -0
  50. package/lib/initialize_array_views.js +57 -0
  51. package/lib/main.js +498 -0
  52. package/lib/nd.js +177 -0
  53. package/lib/nd_accessors.js +185 -0
  54. package/lib/offsets.js +42 -0
  55. package/lib/reshape_strategy.js +260 -0
  56. package/lib/set_view_offsets.js +52 -0
  57. package/package.json +90 -0
@@ -0,0 +1,185 @@
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
+ // MODULES //
22
+
23
+ var numel = require( '@stdlib/ndarray-base-numel' );
24
+ var vind2bind = require( '@stdlib/ndarray-base-vind2bind' );
25
+ var copyIndexed = require( '@stdlib/array-base-copy-indexed' );
26
+ var zeros = require( '@stdlib/array-base-zeros' );
27
+ var setViewOffsets = require( './set_view_offsets.js' );
28
+ var offsets = require( './offsets.js' );
29
+
30
+
31
+ // VARIABLES //
32
+
33
+ var MODE = 'throw';
34
+
35
+
36
+ // MAIN //
37
+
38
+ /**
39
+ * Performs a reduction over an input ndarray and assigns results to a provided output ndarray.
40
+ *
41
+ * @private
42
+ * @param {Function} fcn - wrapper for a one-dimensional strided array reduction function
43
+ * @param {Array<Object>} arrays - ndarrays
44
+ * @param {Array<Object>} views - initialized ndarray-like objects representing sub-array views
45
+ * @param {IntegerArray} strides - loop dimension strides for the input ndarray
46
+ * @param {Function} strategy - input ndarray reshape strategy
47
+ * @param {Options} opts - function options
48
+ * @returns {void}
49
+ *
50
+ * @example
51
+ * var toAccessorArray = require( '@stdlib/array-base-to-accessor-array' );
52
+ * var accessors = require( '@stdlib/array-base-accessors' );
53
+ * var Float64Array = require( '@stdlib/array-float64' );
54
+ * var ndarray2array = require( '@stdlib/ndarray-base-to-array' );
55
+ * var getStride = require( '@stdlib/ndarray-base-stride' );
56
+ * var getOffset = require( '@stdlib/ndarray-base-offset' );
57
+ * var getData = require( '@stdlib/ndarray-base-data-buffer' );
58
+ * var numelDimension = require( '@stdlib/ndarray-base-numel-dimension' );
59
+ * var gsum = require( '@stdlib/blas-ext-base-gsum' ).ndarray;
60
+ *
61
+ * function wrapper( arrays ) {
62
+ * var x = arrays[ 0 ];
63
+ * return gsum( numelDimension( x, 0 ), getData( x ), getStride( x, 0 ), getOffset( x ) );
64
+ * }
65
+ *
66
+ * // Create data buffers:
67
+ * var xbuf = toAccessorArray( new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ) );
68
+ * var ybuf = toAccessorArray( new Float64Array( [ 0.0, 0.0, 0.0 ] ) );
69
+ *
70
+ * // Define the array shapes:
71
+ * var xsh = [ 3, 2, 2 ];
72
+ * var ysh = [ 3 ];
73
+ *
74
+ * // Define the array strides:
75
+ * var sx = [ 4, 2, 1 ];
76
+ * var sy = [ 1 ];
77
+ *
78
+ * // Define the index offsets:
79
+ * var ox = 0;
80
+ * var oy = 0;
81
+ *
82
+ * // Create an input ndarray-like object:
83
+ * var x = {
84
+ * 'dtype': 'float64',
85
+ * 'data': xbuf,
86
+ * 'shape': xsh,
87
+ * 'strides': sx,
88
+ * 'offset': ox,
89
+ * 'order': 'row-major',
90
+ * 'accessors': accessors( xbuf ).accessors
91
+ * };
92
+ *
93
+ * // Create an output ndarray-like object:
94
+ * var y = {
95
+ * 'dtype': 'float64',
96
+ * 'data': ybuf,
97
+ * 'shape': ysh,
98
+ * 'strides': sy,
99
+ * 'offset': oy,
100
+ * 'order': 'row-major',
101
+ * 'accessors': accessors( ybuf ).accessors
102
+ * };
103
+ *
104
+ * // Initialize ndarray-like objects representing sub-array views:
105
+ * var views = [
106
+ * {
107
+ * 'dtype': x.dtype,
108
+ * 'data': x.data,
109
+ * 'shape': [ 2, 2 ],
110
+ * 'strides': [ 2, 1 ],
111
+ * 'offset': x.offset,
112
+ * 'order': x.order
113
+ * }
114
+ * ];
115
+ *
116
+ * // Define a reshape strategy:
117
+ * function strategy( x ) {
118
+ * return {
119
+ * 'dtype': x.dtype,
120
+ * 'data': x.data,
121
+ * 'shape': [ 4 ],
122
+ * 'strides': [ 1 ],
123
+ * 'offset': x.offset,
124
+ * 'order': x.order
125
+ * };
126
+ * }
127
+ *
128
+ * // Perform a reduction:
129
+ * unarynd( wrapper, [ x, y ], views, [ 4 ], strategy, {} );
130
+ *
131
+ * var arr = ndarray2array( y.data, y.shape, y.strides, y.offset, y.order );
132
+ * // returns [ 10.0, 26.0, 42.0 ]
133
+ */
134
+ function unarynd( fcn, arrays, views, strides, strategy, opts ) {
135
+ var ybuf;
136
+ var len;
137
+ var arr;
138
+ var set;
139
+ var sh;
140
+ var iv;
141
+ var io;
142
+ var N;
143
+ var y;
144
+ var v;
145
+ var i;
146
+ var j;
147
+
148
+ N = arrays.length;
149
+
150
+ // Resolve the output ndarray and associated shape:
151
+ y = arrays[ 1 ];
152
+ sh = y.shape;
153
+
154
+ // Compute the total number of elements over which to iterate:
155
+ len = numel( sh );
156
+
157
+ // Resolve a list of pointers to the first indexed elements in the respective ndarrays:
158
+ iv = offsets( arrays );
159
+
160
+ // Shallow copy the list of views to an internal array so that we can update with reshaped views without impacting the original list of views:
161
+ v = copyIndexed( views );
162
+
163
+ // Cache a reference to the output ndarray buffer:
164
+ ybuf = y.data;
165
+
166
+ // Cache accessors:
167
+ set = y.accessors[ 1 ];
168
+
169
+ // Iterate based on the linear **view** index, regardless as to how the data is stored in memory...
170
+ io = zeros( N );
171
+ for ( i = 0; i < len; i++ ) {
172
+ for ( j = 0; j < N; j++ ) {
173
+ arr = arrays[ j ];
174
+ io[ j ] = vind2bind( sh, arr.strides, iv[ j ], arr.order, i, MODE );
175
+ }
176
+ setViewOffsets( views, io );
177
+ v[ 0 ] = strategy( views[ 0 ] );
178
+ set( ybuf, io[1], fcn( v, opts ) );
179
+ }
180
+ }
181
+
182
+
183
+ // EXPORTS //
184
+
185
+ module.exports = unarynd;
package/lib/offsets.js ADDED
@@ -0,0 +1,42 @@
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;
@@ -0,0 +1,260 @@
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
+ // MODULES //
22
+
23
+ var iterationOrder = require( '@stdlib/ndarray-base-iteration-order' );
24
+ var minmaxViewBufferIndex = require( '@stdlib/ndarray-base-minmax-view-buffer-index' ).assign;
25
+ var ndarraylike2object = require( '@stdlib/ndarray-base-ndarraylike2object' );
26
+ var assign = require( '@stdlib/ndarray-base-assign' );
27
+ var ndarraylike2ndarray = require( '@stdlib/ndarray-base-ndarraylike2ndarray' );
28
+ var emptyLike = require( '@stdlib/ndarray-base-empty-like' );
29
+
30
+
31
+ // FUNCTIONS //
32
+
33
+ /**
34
+ * Returns an input ndarray.
35
+ *
36
+ * @private
37
+ * @param {ndarrayLike} x - input ndarray
38
+ * @returns {ndarrayLike} input ndarray
39
+ */
40
+ function identity( x ) {
41
+ return x;
42
+ }
43
+
44
+ /**
45
+ * Broadcasts a zero-dimensional ndarray to a one-dimensional ndarray view containing a single element.
46
+ *
47
+ * @private
48
+ * @param {ndarrayLike} x - input ndarray
49
+ * @returns {ndarrayLike} broadcasted ndarray view
50
+ */
51
+ function broadcast( x ) {
52
+ // NOTE: the following properties must be set in the exact same order as in `x` in order to ensure that the returned object has the same hidden shape as the input ndarray-like object...
53
+ return {
54
+ 'dtype': x.dtype,
55
+ 'data': x.data,
56
+ 'shape': [ 1 ],
57
+ 'strides': [ 0 ],
58
+ 'offset': x.offset,
59
+ 'order': x.order
60
+ };
61
+ }
62
+
63
+ /**
64
+ * Returns a function which returns an ndarray view in which the singleton dimensions are removed from an input ndarray having only a single non-singleton dimension.
65
+ *
66
+ * @private
67
+ * @param {ndarrayLike} arr - original ndarray
68
+ * @param {NonNegativeInteger} index - index of the non-singleton dimension
69
+ * @returns {Function} function for returning an ndarray view
70
+ */
71
+ function squeeze( arr, index ) {
72
+ var sh = [ arr.shape[ index ] ];
73
+ var sx = [ arr.strides[ index ] ];
74
+ return reshape;
75
+
76
+ /**
77
+ * Returns an ndarray view in which the singleton dimensions are removed from an input ndarray having only a single non-singleton dimension.
78
+ *
79
+ * @private
80
+ * @param {ndarrayLike} x - input ndarray
81
+ * @returns {ndarrayLike} a squeezed ndarray view
82
+ */
83
+ function reshape( x ) {
84
+ // NOTE: the following properties must be set in the exact same order as in `arr` in order to ensure that the returned object has the same hidden shape as the input ndarray-like object...
85
+ return {
86
+ 'dtype': x.dtype,
87
+ 'data': x.data,
88
+ 'shape': sh,
89
+ 'strides': sx,
90
+ 'offset': x.offset,
91
+ 'order': x.order
92
+ };
93
+ }
94
+ }
95
+
96
+ /**
97
+ * Returns a function which returns a one-dimensional ndarray view of a contiguous input ndarray having more than one dimension.
98
+ *
99
+ * @private
100
+ * @param {NonNegativeInteger} len - number of elements in an ndarray
101
+ * @param {integer} iox - iteration order
102
+ * @returns {Function} function for returning a one-dimensional ndarray view
103
+ */
104
+ function contiguous( len, iox ) {
105
+ var xmmv;
106
+ var ind;
107
+ var sh;
108
+ var sx;
109
+
110
+ // Resolve the index of the min/max view buffer element which is the first indexed element...
111
+ if ( iox === 1 ) {
112
+ ind = 0;
113
+ } else {
114
+ ind = 1;
115
+ }
116
+ // Initialize an array for storing the min/max view buffer elements:
117
+ xmmv = [ 0, 0 ]; // [ min, max ]
118
+
119
+ // Initialize the output one-dimensional view's shape and strides:
120
+ sh = [ len ];
121
+ sx = [ iox ];
122
+
123
+ return reshape;
124
+
125
+ /**
126
+ * Returns a one-dimensional ndarray view of a contiguous input ndarray having more than one dimension.
127
+ *
128
+ * @private
129
+ * @param {ndarrayLike} x - input ndarray
130
+ * @returns {ndarrayLike} a one-dimensional ndarray view
131
+ */
132
+ function reshape( x ) {
133
+ // Resolve the minimum and maximum linear indices in the underlying data buffer which are accessible to the input ndarray view:
134
+ minmaxViewBufferIndex( x.shape, x.strides, x.offset, xmmv );
135
+
136
+ // NOTE: the following properties must be set in the exact same order as in `x` in order to ensure that the returned object has the same hidden shape as the input ndarray-like object...
137
+ return {
138
+ 'dtype': x.dtype,
139
+ 'data': x.data,
140
+ 'shape': sh,
141
+ 'strides': sx,
142
+ 'offset': xmmv[ ind ], // the index of the first indexed element
143
+ 'order': x.order
144
+ };
145
+ }
146
+ }
147
+
148
+ /**
149
+ * Returns a function which copies an input ndarray to a contiguous ndarray workspace.
150
+ *
151
+ * @private
152
+ * @param {NonNegativeInteger} len - number of elements in an ndarray
153
+ * @param {ndarrayLike} workspace - ndarray workspace
154
+ * @returns {Function} function which copies an input ndarray to a contiguous ndarray workspace
155
+ */
156
+ function copy( len, workspace ) {
157
+ // NOTE: the following properties must be set in the exact same order as in the input ndarray-like object in order to ensure that the returned object has the same hidden shape...
158
+ var view = {
159
+ 'dtype': workspace.dtype,
160
+ 'data': workspace.data,
161
+ 'shape': [ len ],
162
+ 'strides': [ 1 ],
163
+ 'offset': workspace.offset,
164
+ 'order': workspace.order
165
+ };
166
+ return reshape;
167
+
168
+ /**
169
+ * Copies an input ndarray to a contiguous ndarray workspace and returns a one-dimensional workspace view.
170
+ *
171
+ * @private
172
+ * @param {ndarrayLike} x - input ndarray
173
+ * @returns {ndarrayLike} one-dimensional workspace view
174
+ */
175
+ function reshape( x ) {
176
+ assign( [ x, workspace ] );
177
+ return view;
178
+ }
179
+ }
180
+
181
+
182
+ // MAIN //
183
+
184
+ /**
185
+ * Returns a function for reshaping input ndarrays which have the same data type, shape, and strides as a provided ndarray.
186
+ *
187
+ * @private
188
+ * @param {ndarrayLike} x - input ndarray
189
+ * @param {string} x.dtype - input ndarray data type
190
+ * @param {Collection} x.data - input ndarray data buffer
191
+ * @param {NonNegativeIntegerArray} x.shape - input ndarray shape
192
+ * @param {IntegerArray} x.strides - input ndarray strides
193
+ * @param {NonNegativeInteger} x.offset - input ndarray index offset
194
+ * @param {string} x.order - input ndarray memory layout
195
+ * @returns {Function} function implementing a reshape strategy
196
+ */
197
+ function strategy( x ) {
198
+ var ndims;
199
+ var xmmv;
200
+ var len;
201
+ var iox;
202
+ var sh;
203
+ var ns;
204
+ var i;
205
+
206
+ // Resolve the number of array dimensions:
207
+ sh = x.shape;
208
+ ndims = sh.length;
209
+
210
+ // Check whether the ndarray is zero-dimensional...
211
+ if ( ndims === 0 ) {
212
+ return broadcast;
213
+ }
214
+ // Check whether the ndarray is already one-dimensional...
215
+ if ( ndims === 1 ) {
216
+ return identity;
217
+ }
218
+ // Determine the number of singleton dimensions...
219
+ len = 1; // number of elements
220
+ ns = 0; // number of singleton dimensions
221
+ for ( i = 0; i < ndims; i++ ) {
222
+ // Check whether the current dimension is a singleton dimension...
223
+ if ( sh[ i ] === 1 ) {
224
+ ns += 1;
225
+ }
226
+ len *= sh[ i ];
227
+ }
228
+ // Determine whether the ndarray has only **one** non-singleton dimension (e.g., ndims=4, shape=[10,1,1,1]) so that we can simply create an ndarray view without the singleton dimensions...
229
+ if ( ns === ndims-1 ) {
230
+ // Get the index of the non-singleton dimension...
231
+ for ( i = 0; i < ndims; i++ ) {
232
+ if ( sh[ i ] !== 1 ) {
233
+ break;
234
+ }
235
+ }
236
+ return squeeze( x, i );
237
+ }
238
+ iox = iterationOrder( x.strides ); // +/-1
239
+
240
+ // Determine whether we can avoid copying data...
241
+ if ( iox !== 0 ) {
242
+ // Determine the minimum and maximum linear indices which are accessible by the ndarray view:
243
+ xmmv = minmaxViewBufferIndex( sh, x.strides, x.offset, [ 0, 0 ] );
244
+
245
+ // Determine whether we can ignore shape (and strides) and create a new one-dimensional ndarray view...
246
+ if ( len === ( xmmv[1]-xmmv[0]+1 ) ) {
247
+ return contiguous( len, iox );
248
+ }
249
+ // The ndarray is non-contiguous, so we cannot directly interpret as a one-dimensional ndarray...
250
+
251
+ // Fall-through to copying to a workspace ndarray...
252
+ }
253
+ // At this point, we're dealing with a non-contiguous multi-dimensional ndarray, so we need to copy to a contiguous workspace:
254
+ return copy( len, ndarraylike2object( emptyLike( ndarraylike2ndarray( x ) ) ) ); // eslint-disable-line max-len
255
+ }
256
+
257
+
258
+ // EXPORTS //
259
+
260
+ module.exports = strategy;
@@ -0,0 +1,52 @@
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
+ * Sets view offsets according to a list of index offsets.
25
+ *
26
+ * ## Notes
27
+ *
28
+ * - This function skips the second element in the list of index offsets, as that is assumed to correspond to the output ndarray which does not have a corresponding view. Meaning, the list of views is expected to have `N` elements, and the list of index offsets is expected to have `N+1` elements.
29
+ * - This function mutates the provides view objects.
30
+ *
31
+ * @private
32
+ * @param {Array<Object>} views - list of ndarray-like objects representing ndarray views
33
+ * @param {NonNegativeIntegerArray} offsets - list of index offsets
34
+ * @returns {Array<Object>} updated views
35
+ */
36
+ function setViewOffsets( views, offsets ) {
37
+ var i;
38
+ var j;
39
+ for ( i = 0, j = 0; i < offsets.length; i++ ) {
40
+ if ( i === 1 ) { // note: expected to correspond to the output ndarray which does not have a corresponding view
41
+ continue;
42
+ }
43
+ views[ j ].offset = offsets[ i ];
44
+ j += 1;
45
+ }
46
+ return views;
47
+ }
48
+
49
+
50
+ // EXPORTS //
51
+
52
+ module.exports = setViewOffsets;
package/package.json ADDED
@@ -0,0 +1,90 @@
1
+ {
2
+ "name": "@stdlib/ndarray-base-unary-reduce-strided1d",
3
+ "version": "0.1.0",
4
+ "description": "Perform a reduction over a list of specified dimensions in an input ndarray via a one-dimensional strided array reduction function and assign results to a provided output ndarray.",
5
+ "license": "Apache-2.0",
6
+ "author": {
7
+ "name": "The Stdlib Authors",
8
+ "url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
9
+ },
10
+ "contributors": [
11
+ {
12
+ "name": "The Stdlib Authors",
13
+ "url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
14
+ }
15
+ ],
16
+ "main": "./lib",
17
+ "directories": {
18
+ "doc": "./docs",
19
+ "lib": "./lib",
20
+ "dist": "./dist"
21
+ },
22
+ "types": "./docs/types",
23
+ "scripts": {},
24
+ "homepage": "https://stdlib.io",
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git://github.com/stdlib-js/ndarray-base-unary-reduce-strided1d.git"
28
+ },
29
+ "bugs": {
30
+ "url": "https://github.com/stdlib-js/stdlib/issues"
31
+ },
32
+ "dependencies": {
33
+ "@stdlib/array-base-copy-indexed": "^0.2.2",
34
+ "@stdlib/array-base-indices-complement": "^0.1.0",
35
+ "@stdlib/array-base-join": "^0.1.1",
36
+ "@stdlib/array-base-take-indexed": "^0.2.2",
37
+ "@stdlib/array-base-take-indexed2": "^0.1.0",
38
+ "@stdlib/array-base-without": "github:stdlib-js/array-base-without#main",
39
+ "@stdlib/array-base-zeros": "^0.2.2",
40
+ "@stdlib/assert-is-function": "^0.2.2",
41
+ "@stdlib/ndarray-base-assign": "^0.1.1",
42
+ "@stdlib/ndarray-base-empty-like": "^0.3.0",
43
+ "@stdlib/ndarray-base-iteration-order": "^0.2.2",
44
+ "@stdlib/ndarray-base-minmax-view-buffer-index": "^0.2.2",
45
+ "@stdlib/ndarray-base-ndarraylike2ndarray": "github:stdlib-js/ndarray-base-ndarraylike2ndarray#main",
46
+ "@stdlib/ndarray-base-ndarraylike2object": "^0.2.2",
47
+ "@stdlib/ndarray-base-numel": "^0.2.2",
48
+ "@stdlib/ndarray-base-strides2order": "^0.2.2",
49
+ "@stdlib/ndarray-base-to-unique-normalized-indices": "^0.1.0",
50
+ "@stdlib/ndarray-base-unary-loop-interchange-order": "^0.2.1",
51
+ "@stdlib/ndarray-base-unary-tiling-block-size": "^0.2.2",
52
+ "@stdlib/ndarray-base-vind2bind": "^0.2.2",
53
+ "@stdlib/string-format": "^0.2.2",
54
+ "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2",
55
+ "@stdlib/error-tools-fmtprodmsg": "^0.2.2"
56
+ },
57
+ "devDependencies": {},
58
+ "engines": {
59
+ "node": ">=0.10.0",
60
+ "npm": ">2.7.0"
61
+ },
62
+ "os": [
63
+ "aix",
64
+ "darwin",
65
+ "freebsd",
66
+ "linux",
67
+ "macos",
68
+ "openbsd",
69
+ "sunos",
70
+ "win32",
71
+ "windows"
72
+ ],
73
+ "keywords": [
74
+ "stdlib",
75
+ "base",
76
+ "strided",
77
+ "array",
78
+ "ndarray",
79
+ "unary",
80
+ "reduce",
81
+ "reduction",
82
+ "accumulate",
83
+ "accumulation",
84
+ "vector"
85
+ ],
86
+ "funding": {
87
+ "type": "opencollective",
88
+ "url": "https://opencollective.com/stdlib"
89
+ }
90
+ }