-
Notifications
You must be signed in to change notification settings - Fork 2
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
Added implementation of kurt #23
Added implementation of kurt #23
Conversation
f8095fe
to
33c8735
Compare
bff087f
to
77e8617
Compare
77e8617
to
1098143
Compare
99bdb1b
to
1275111
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, it's a good job; I only have those minor questions 👍
return q( | ||
'{[tab]' | ||
f'r:{{[tab; x] ({key_str}x; {kurt_str} {val_str}tab[x])}}[tab;] each {query_str};' | ||
f'(,/) {{(enlist x 0)!(enlist x 1)}} each r{where_str}}}', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you use (,/)
instead of using raze
? Same length and I think it's easier to understand
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps I would keep it consistent with the functions the KX team already implemented. Even if some amount of boilerplate is generated, they seem to stick to using this design pattern (for instance, in the implementation of median
, or mean
). Then after the fact, should they make a refactorization or an improvement on the design pattern, to be implemented on all of the existing functions that use it. What do you think?
return q( | ||
'{[tab]' | ||
f'r:{{[tab; x] ({key_str}x; {kurt_str} {val_str}tab[x])}}[tab;] each {query_str};' | ||
f'(,/) {{(enlist x 0)!(enlist x 1)}} each r{where_str}}}', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, I think enlist[x 0]!enlist x 1
is shorter and easier to understand
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same argument to be made as for the raze
case. Maybe I would keep it as is for now until they make an adjustment to the design pattern.
e303314
to
44b7063
Compare
44b7063
to
f856311
Compare
* Added implementation of kurt function (#23) * Added implementation of sem function (#22) * Refactored kurt and sem functions --------- Co-authored-by: Miguel Gómez <[email protected]> Co-authored-by: Francisco Tórtola Vivo <[email protected]>
Provides an implementation for the
kurt
method.Solves: /issues/14
Parameters:
Returns:
It follows the pandas definition.