Skip to content

Commit 02c2ec9

Browse files
committed
fix example with timeseries
1 parent bdb3d06 commit 02c2ec9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/mir/timeseries.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ unittest
2222
{
2323
import std.datetime: Date;
2424
import std.algorithm.setops: nWayUnion;
25+
import std.algorithm.iteration: uniq;
2526
import std.array: array;
2627
import mir.ndslice.slice: sliced;
2728
import mir.ndslice.allocation: slice;
@@ -42,7 +43,7 @@ unittest
4243
auto data1 = [10.0, 20, 50].sliced;
4344
auto series1 = time1.series(data1);
4445

45-
auto time = [time0, time1].nWayUnion.array.sliced;
46+
auto time = [time0, time1].nWayUnion.uniq.array.sliced;
4647
auto data = slice!double([time.length, 2], 0); // initialized to 0 value
4748
auto series = time.series(data);
4849

@@ -51,7 +52,6 @@ unittest
5152

5253
assert(data == [
5354
[1, 10],
54-
[0, 0],
5555
[0, 20],
5656
[3, 0],
5757
[4, 0],

0 commit comments

Comments
 (0)