Pretty-printing D arrays with Mir
mw
mingwu at gmail.com
Sun May 31 23:34:20 UTC 2020
On Sunday, 31 May 2020 at 23:10:44 UTC, jmh530 wrote:
> On Sunday, 31 May 2020 at 22:40:09 UTC, tastyminerals wrote:
>> I often print arrays to see how they look and their contents.
>> NumPy has a nice way of pretty-printing the arrays, and I was
>> lacking this in D.
>> ┌ ┐
>> │┌ ┐│
>> ││ 1 2 3 4 5 6││
>> ││ 7 8 9 10 11 12││
>> │└ ┘│
>> │┌ ┐│
>> ││13 14 15 16 17 18││
>> ││19 20 21 22 23 24││
>> │└ ┘│
>> └ ┘
>>
>> https://github.com/tastyminerals/pretty_d_array
> Interesting.
>
> I had done some work in 2018 for numir format facilities. At
> the time mir didn’t have a way to do @nogc formatting, but it
> does now. It might be interesting to either revisit that or
> think about getting this into mir.
Excellent!
👍 D is fun to work with everyday!
I literally, oh no, (obviously :-) visually envision Mir will
beat numpy one day!
More information about the Digitalmars-d-announce
mailing list