You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**x**: a 1-dimensional [`ndarray`][@stdlib/ndarray/array] or an array-like object. If provided an array-like object or [`ndarray`][@stdlib/ndarray/array] whose underlying data type is **not**`float64`, the value is cast to a 1-dimensional [`ndarray`][@stdlib/ndarray/array] whose data type is `float64`.
68
-
-**y**: a 1-dimensional [`ndarray`][@stdlib/ndarray/array] or an array-like object. If provided an array-like object or [`ndarray`][@stdlib/ndarray/array] whose underlying data type is **not**`float64`, the value is cast to a 1-dimensional [`ndarray`][@stdlib/ndarray/array] whose data type is `float64`.
69
-
70
-
The function accepts the following `options`:
71
-
72
-
-`casting`: specifies the casting rule used to determine acceptable casts. The option may be one of the following values:
73
-
74
-
-`none`: only allow casting between identical types.
75
-
-`equiv`: allow casting between identical and byte swapped types.
76
-
-`safe`: only allow ["safe"][@stdlib/ndarray/safe-casts] casts.
77
-
-`same-kind`: allow ["safe"][@stdlib/ndarray/safe-casts] casts and casts within the same kind (e.g., between signed integers or between floats).
78
-
-`unsafe`: allow casting between all types (including between integers and floats).
79
-
80
-
Default: `'safe'`.
81
-
82
-
-`codegen`: `boolean` indicating whether to use code generation. Default: `true`.
83
-
84
-
Provided vectors may be either [`ndarrays`][@stdlib/ndarray/array] or array-like objects. By default, however, only array-like objects which can be [safely cast][@stdlib/ndarray/safe-casts] to `float64` are supported. In order to operate on numeric data stored in array-like objects which cannot be [safely cast][@stdlib/ndarray/safe-casts], one must explicitly set the `casting` option to `'unsafe'`. For example, because generic arrays can contain arbitrary data (including non-numeric types), thus allowing for potentially "unsafe" casts (e.g., strings representing integer values, such as "big integers", which cannot be accurately stored as double-precision floating-point numbers), one must explicitly set the `casting` option.
85
-
86
-
```javascript
87
-
var x = [ 4.0, 2.0, -3.0, 5.0, -1.0 ];
88
-
var y = [ 2.0, 6.0, -1.0, -4.0, 8.0 ];
89
-
90
-
var opts = {
91
-
'casting':'unsafe'
92
-
};
93
-
var z =ddot( x, y, opts );
94
-
// returns -5.0
95
-
```
67
+
-**x**: a 1-dimensional [`ndarray`][@stdlib/ndarray/array] whose underlying data type is `float64`.
68
+
-**y**: a 1-dimensional [`ndarray`][@stdlib/ndarray/array] whose underlying data type is `float64`.
96
69
97
70
If provided empty vectors, the function returns `0.0`.
98
71
@@ -116,9 +89,6 @@ var z = ddot( x, y );
116
89
## Notes
117
90
118
91
-`ddot()` provides a higher-level interface to the [BLAS][blas] level 1 function [`ddot`][@stdlib/blas/base/ddot].
119
-
- For best performance, provide 1-dimensional [`ndarrays`][@stdlib/ndarray/array] whose underlying data type is `float64`.
120
-
- Options are only applicable when either `x` or `y` is not already an `ndarray` whose underlying data type is `float64`.
121
-
- Code generation can boost performance, but may be problematic in browser contexts enforcing a strict [content security policy][mdn-csp] (CSP). If running in or targeting an environment with a CSP, set the `codegen` option to `false`.
0 commit comments