[GSoC] Dataframes for D

jmh530 john.michael.hall at gmail.com
Tue Jun 25 21:07:35 UTC 2019


On Tuesday, 25 June 2019 at 20:44:43 UTC, Prateek Nayak wrote:
> [snip]
> 2) Sure, the overload can be made but what are you specifically 
> looking for?
> apply(f, axis)(indexes) ?
> [snip]

I see
void apply(alias Fn, int axis, T)(T index)
and
void apply(alias Fn)()
in the current implementation.

I think you interpreted what I am asking as something like
void apply(alias Fn, int axis, T[])(T[] indices)
which also might make sense.

But I guess I was suggesting a little simpler as
void apply(alias Fn, int axis)()
so that it applies to all the rows or columns.

This is particularly relevant in the homogeneous data case. My 
motivation reflects a common use case of the apply function in R 
to calculate summary statistics of an array/matrix by column or 
row. For instance, I might want to calculate the standard 
deviation of every column.


More information about the Digitalmars-d mailing list