(start, end, n)
| 1323 | return array.reduce((a, b) => a.concat(b), []); |
| 1324 | } |
| 1325 | linspace(start, end, n) { |
| 1326 | const diff = end - start; |
| 1327 | const step = diff / n; |
| 1328 | return this.arange(start, end, step); |
| 1329 | } |
| 1330 | arange(start, end, step, offset) { |
| 1331 | const len = (Math.abs(end - start) + ((offset || 0) * 2)) / (step || 1) + 1; |
| 1332 | const direction = start < end ? 1 : -1; |