-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove amap, each_row etc. #2204
Comments
There are two basic functions: the The second one is what's needed for These functions should be called something like |
I like |
Hey guys, I just updated Julia and I found mean(array, dims) and amap disappeared. I found mean(array, dims) in Stats.jl but could you tell me where is amap now? Or what's the new name? I wrote a LARS algorithm in Julia and my program depends on those two function. Thank you! |
You can get to it with |
Cell array is OK if original array is two dimensional. In R, if x is 4_5_6 array, apply(x, c(1, 2), mean) will return a 4*5 array. It seems amap cannot do this now. What's your plan about this kind of functions? |
As a R user, I can't live without *ply series functions. |
My plan would be to do that with |
You mention two basic styles, "mapslices" and "mapvecs". The second question is, if one should be able to apply array-valued functions with mapsices. |
@mschauer What would be a good name for that function? |
Hm, I think about it. APL/J uses the rather idiosyncratic notion of "rank" of a function as the dimension of the subarrays ("cells") the function is working on. http://en.wikipedia.org/wiki/Rank_(J_programming_language) Maybe |
How about |
Be aware about rank notion in statistics: http://en.wikipedia.org/wiki/Ranking |
That's a fair point, and we don't use |
All of these cases seem like they could collapse into a single one: The middle case might be improved by defining a |
Excellent observation. We should probably just provide that, and optimize the common cases. |
I think that |
Indeed, that looks nice - with the slight regret, that as we have column major, the cache friendly access |
We could just invert the meaning of the third argument; it specifies either the |
It would be great to have some documentation on |
Here it is? c09d568#L2R2294 PS: "this is a beautifully general function": justified 👍 |
We have
amap
,each_row
,each_col
, andeach_vec
, all of which can be combined into a single function that applies a function over some dimension. Let the bikeshedding begin.The text was updated successfully, but these errors were encountered: