| import "../math/number"; | |
| import "ascending"; | |
| import "quantile"; | |
| d3.median = function(array, f) { | |
| var numbers = [], | |
| n = array.length, | |
| a, | |
| i = -1; | |
| if (arguments.length === 1) { | |
| while (++i < n) if (d3_numeric(a = d3_number(array[i]))) numbers.push(a); | |
| } else { | |
| while (++i < n) if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) numbers.push(a); | |
| } | |
| if (numbers.length) return d3.quantile(numbers.sort(d3_ascending), 0.5); | |
| }; | |
Xet Storage Details
- Size:
- 464 Bytes
- Xet hash:
- 9df7c93a9babbdf995cfd04b5d92d4cda7a658504e040146f77453250e83fb29
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.