File tree Expand file tree Collapse file tree 3 files changed +60
-11
lines changed
lib/node_modules/@stdlib/ndarray/array/lib Expand file tree Collapse file tree 3 files changed +60
-11
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * @license Apache-2.0
3+ *
4+ * Copyright (c) 2023 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 settings = require ( '@stdlib/ndarray/defaults' ) ;
24+
25+
26+ // MAIN //
27+
28+ /**
29+ * Returns default options.
30+ *
31+ * @private
32+ * @returns {Object } default options
33+ *
34+ * @example
35+ * var o = defaults();
36+ * // returns {...}
37+ */
38+ function defaults ( ) {
39+ return {
40+ 'casting' : settings . get ( 'casting' ) ,
41+ 'copy' : false ,
42+ 'dtype' : settings . get ( 'dtypes.default' ) ,
43+ 'flatten' : true ,
44+ 'mode' : settings . get ( 'index_mode' ) ,
45+ 'ndmin' : 0 ,
46+ 'order' : settings . get ( 'order' ) ,
47+ 'readonly' : false
48+ } ;
49+ }
50+
51+
52+ // EXPORTS //
53+
54+ module . exports = defaults ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -41,13 +41,18 @@ var arrayShape = require( '@stdlib/array/shape' );
4141var flattenArray = require ( '@stdlib/utils/flatten-array' ) ;
4242var format = require ( '@stdlib/string/format' ) ;
4343var isArrayLikeObject = require ( './is_array_like_object.js' ) ;
44- var defaults = require ( './defaults.json ' ) ;
44+ var getDefaults = require ( './defaults.js ' ) ;
4545var castBuffer = require ( './cast_buffer.js' ) ;
4646var copyView = require ( './copy_view.js' ) ;
4747var expandShape = require ( './expand_shape.js' ) ;
4848var expandStrides = require ( './expand_strides.js' ) ;
4949
5050
51+ // VARIABLES //
52+
53+ var defaults = getDefaults ( ) ;
54+
55+
5156// MAIN //
5257
5358/**
You can’t perform that action at this time.
0 commit comments