Thread overview | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
January 02, 2016 Re: Using D and std.ndslice as a Numpy Replacement | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jack Stouffer | On 01/02/2016 11:49 AM, Jack Stouffer wrote:
> http://jackstouffer.com/blog/nd_slice.html
>
> https://www.reddit.com/r/programming/comments/3z6f7a/using_d_and_stdndslice_as_a_numpy_replacement/
>
Broken link in "For a more in depth look at ranges, see The official D tutorial's section on ranges".
Ali
|
January 02, 2016 Re: Using D and std.ndslice as a Numpy Replacement | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ali Çehreli | On Saturday, 2 January 2016 at 22:15:03 UTC, Ali Çehreli wrote:
> Broken link in "For a more in depth look at ranges, see The official D tutorial's section on ranges".
>
> Ali
Fixed, thanks!
|
January 02, 2016 Re: Using D and std.ndslice as a Numpy Replacement | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jack Stouffer | On Saturday, 2 January 2016 at 19:49:05 UTC, Jack Stouffer wrote: > http://jackstouffer.com/blog/nd_slice.html > >https://www.reddit.com/r/programming/comments/3z6f7a/using_d_and_stdndslice_as_a_numpy_replacement/ I just wanted to write to you that dip80-ndslice was moved to mir http://code.dlang.org/packages/mir "dependencies": { "dip80-ndslice": "~>0.8.7" }, Ilya |
January 02, 2016 Re: Using D and std.ndslice as a Numpy Replacement | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ilya Yaroshenko | On Saturday, 2 January 2016 at 23:23:38 UTC, Ilya Yaroshenko wrote:
> On Saturday, 2 January 2016 at 19:49:05 UTC, Jack Stouffer wrote:
>> http://jackstouffer.com/blog/nd_slice.html
>>
>>https://www.reddit.com/r/programming/comments/3z6f7a/using_d_and_stdndslice_as_a_numpy_replacement/
>
> I just wanted to write to you that dip80-ndslice was moved to mir http://code.dlang.org/packages/mir
>
> "dependencies": {
> "dip80-ndslice": "~>0.8.7"
> },
>
> Ilya
EDIT:
"dependencies": {
"mir": "~>0.9.0-beta"
}
|
January 02, 2016 Re: Using D and std.ndslice as a Numpy Replacement | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jack Stouffer | On Saturday, 2 January 2016 at 19:49:05 UTC, Jack Stouffer wrote: > http://jackstouffer.com/blog/nd_slice.html > > https://www.reddit.com/r/programming/comments/3z6f7a/using_d_and_stdndslice_as_a_numpy_replacement/ Jack, Thank you for the article! Link to the benchmark at GitHub https://github.com/DlangScience/examples/blob/master/mean_of_columns.d This benchmark is _not_ lazy, so ndslice faster than Numpy only 3.5 times. -- Ilya |
January 03, 2016 Re: Using D and std.ndslice as a Numpy Replacement | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ilya Yaroshenko | On Saturday, 2 January 2016 at 23:51:09 UTC, Ilya Yaroshenko wrote:
> This benchmark is _not_ lazy, so ndslice faster than Numpy only 3.5 times.
I don't know what you mean here, I made sure to call std.array.array to force allocation.
|
January 03, 2016 Re: Using D and std.ndslice as a Numpy Replacement | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jack Stouffer | On Sunday, 3 January 2016 at 00:09:33 UTC, Jack Stouffer wrote:
> On Saturday, 2 January 2016 at 23:51:09 UTC, Ilya Yaroshenko wrote:
>> This benchmark is _not_ lazy, so ndslice faster than Numpy only 3.5 times.
>
> I don't know what you mean here, I made sure to call std.array.array to force allocation.
In the article:
auto means = 100_000.iota <---- 100_000.iota is lazy range
.sliced(100, 1000)
.transposed
.map!(r => sum(r) / r.length)
.array; <---- allocation of the result
In GitHub:
means = data <---- data is allocated array, it is fair test for real world
.sliced(100, 1000)
.transposed
.map!(r => sum(r, 0L) / cast(double) r.length)
.array; <---- allocation of the result
-- Ilya
|
January 02, 2016 Re: Using D and std.ndslice as a Numpy Replacement | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jack Stouffer | On 1/2/2016 11:49 AM, Jack Stouffer wrote: > http://jackstouffer.com/blog/nd_slice.html > > https://www.reddit.com/r/programming/comments/3z6f7a/using_d_and_stdndslice_as_a_numpy_replacement/ > https://news.ycombinator.com/item?id=10828450 (but access through the front page, not this link) |
January 03, 2016 Re: Using D and std.ndslice as a Numpy Replacement | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jack Stouffer | On Saturday, 2 January 2016 at 19:49:05 UTC, Jack Stouffer wrote:
> http://jackstouffer.com/blog/nd_slice.html
>
> https://www.reddit.com/r/programming/comments/3z6f7a/using_d_and_stdndslice_as_a_numpy_replacement/
Great piece. And great work done by those who worked on nd_slice.
|
Copyright © 1999-2021 by the D Language Foundation