Skip to content
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

Merged
merged 4 commits into from
Sep 5, 2018
Merged

Port to Julia 0.7/1.0 #28

merged 4 commits into from
Sep 5, 2018

Conversation

nalimilan
Copy link
Owner

Use the new Name wrapper from NamedArrays 0.9.0 when indexing to avoid ambiguity with Integer names.

Currently blocked by davidavdav/NamedArrays.jl#73.

Fixes #27.

@@ -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)
Copy link
Owner Author

@nalimilan nalimilan Sep 5, 2018

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.

@nalimilan nalimilan mentioned this pull request Sep 5, 2018
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
Copy link
Owner Author

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.

Copy link
Collaborator

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?

Copy link
Owner Author

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.

Copy link
Collaborator

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.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. #30

@coveralls
Copy link

coveralls commented Sep 5, 2018

Coverage Status

Coverage increased (+2.1%) to 96.97% when pulling 264d224 on nl/0.7 into 45067fc on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants