-
Notifications
You must be signed in to change notification settings - Fork 19
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
Port to Julia 0.7/1.0 #28
Conversation
test/freqtable.jl
Outdated
@@ -24,24 +24,24 @@ pt = @inferred prop(tab) | |||
0.075 0.05 0.05 0.075; | |||
0.05 0.075 0.075 0.05; | |||
0.05 0.075 0.075 0.05] | |||
pt = @inferred prop(tab, 2) |
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.
We should find the origin of the inference regression so that we can keep these checks.
Use the new Name wrapper from NamedArrays 0.9.0 when indexing to avoid ambiguity with Integer names.
@@ -214,14 +215,13 @@ julia> sum(pt, (1, 2)) | |||
|
|||
``` | |||
""" | |||
|
|||
prop(tbl::AbstractArray{<:Number}) = tbl / sum(tbl) | |||
|
|||
function prop(tbl::AbstractArray{<:Number,N}, margin::Integer...) where N |
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.
We should decide whether margin
should become a keyword argument, and if yes whether we should keep this name.
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.
Good point - maybe dims
as keyword argument?
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.
Yeah, maybe. However, the meaning is a bit different, and indeed the argument isn't passed to dims
as-is. Maybe that's not an issue though.
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.
We can always fix it later as it is non breaking.
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.
Sure. #30
Use the new
Name
wrapper from NamedArrays 0.9.0 when indexing to avoid ambiguity withInteger
names.Currently blocked by davidavdav/NamedArrays.jl#73.
Fixes #27.