-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathrepl.txt
More file actions
34 lines (28 loc) · 901 Bytes
/
repl.txt
File metadata and controls
34 lines (28 loc) · 901 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{{alias}}( arrays, p )
Computes the p-th quantile of a sorted one-dimensional ndarray.
The quantile is the value below which a fraction `p` of the data falls.
The input array must be sorted in ascending order.
If provided an empty ndarray, the function returns `NaN`.
Parameters
----------
arrays: ArrayLikeObject<ndarray>
Array-like object containing a sorted one-dimensional input ndarray.
p: number
Quantile probability in the interval [0,1].
Returns
-------
out: number
Quantile value.
Examples
--------
> var xbuf = [ 1.0, 2.0, 3.0, 4.0 ];
> var dt = 'generic';
> var sh = [ xbuf.length ];
> var sx = [ 1 ];
> var ox = 0;
> var ord = 'row-major';
> var x = new {{alias:@stdlib/ndarray/ctor}}( dt, xbuf, sh, sx, ox, ord );
> {{alias}}( [ x ], 0.5 )
2.5
See Also
--------