Mir Slice.shape is not consistent with the actual array shape

Pavel Shkadzko p.shkadzko at gmail.com
Sun May 24 18:39:44 UTC 2020


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;

I posted in a rush. There should be "auto arrSlice = a.sliced;" 
and "writeln(a.getShape);".


More information about the Digitalmars-d-learn mailing list