On Sunday, 24 May 2020 at 15:24:14 UTC, 9il wrote:
On Sunday, 24 May 2020 at 14:17:33 UTC, Pavel Shkadzko wrote:
[...]
BTW, the code example above doesn't compiles.
OT:
Instead of
[...]
you can generate the same common D array using Mir:
auto a = [2, 2, 4].iota!int(1).ndarray;
On Sunday, 24 May 2020 at 14:17:33 UTC, Pavel Shkadzko wrote:
I am confused by the return value of Mir shape.
Consider the following example.
///
import std.stdio;
import std.conv;
import std.array: array;
import std.range:
On Sunday, 24 May 2020 at 14:35:33 UTC, jmh530 wrote:
On Sunday, 24 May 2020 at 14:21:26 UTC, Pavel Shkadzko wrote:
[snip]
Sorry for the typo. It should be "auto arrSlice = a.sliced;"
Try using fuse
/+dub.sdl:
dependency "mir-algorithm" version="*"
+/
import std.stdio;
import std.conv;
On Sunday, 24 May 2020 at 14:17:33 UTC, Pavel Shkadzko wrote:
I am confused by the return value of Mir shape.
Consider the following example.
[...]
`sliced` returns a view on the array data, a 1-dimensional slice
composed of common D arrays. Try to use `fuse` instead of
`sliced`.
On Sunday, 24 May 2020 at 14:21:26 UTC, Pavel Shkadzko wrote:
On Sunday, 24 May 2020 at 14:17:33 UTC, Pavel Shkadzko wrote:
I am confused by the return value of Mir shape.
Consider the following example.
[...]
Sorry for the typo. It should be "auto arrSlice = a.sliced;"
And another typo
On Sunday, 24 May 2020 at 14:21:26 UTC, Pavel Shkadzko wrote:
[snip]
Sorry for the typo. It should be "auto arrSlice = a.sliced;"
Try using fuse
/+dub.sdl:
dependency "mir-algorithm" version="*"
+/
import std.stdio;
import std.conv;
import std.array: array;
import std.range: chunks;
import
On Sunday, 24 May 2020 at 14:17:33 UTC, Pavel Shkadzko wrote:
I am confused by the return value of Mir shape.
Consider the following example.
[...]
Sorry for the typo. It should be "auto arrSlice = a.sliced;"
I am confused by the return value of Mir shape.
Consider the following example.
///
import std.stdio;
import std.conv;
import std.array: array;
import std.range: chunks;
import mir.ndslice;
int[] getShape(T : int)(T obj,