-
Notifications
You must be signed in to change notification settings - Fork 28
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
Compatibility with multi-dimensional arrays; closes #19 #20
Compatibility with multi-dimensional arrays; closes #19 #20
Conversation
src/NaNMath.jl
Outdated
@@ -44,7 +44,7 @@ using NaNMath as nm | |||
nm.sum([1., 2., NaN]) # result: 3.0 | |||
``` | |||
""" | |||
function sum{T<:AbstractFloat}(x::Vector{T}) | |||
function sum{T<:AbstractFloat}(x::AbstractArray{T}) | |||
if size(x)[1] == 0 |
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.
This check probably needs to change
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.
To length(a)
?
was removed by mistake
🎉 Thanks a lot for working so promptly on this |
When you're happy with what's here, let me know and I can tag a new release. |
I'm quite happy now - it'd be nice to have the two-arg versions of the functions for multi-dim arrays too, but that is quite a lot more involved, of course. See what you think - after merging this (or now, if you'd prefer not to merge that PR) I'd be happy for a release. This seems to have solved my problems downstream in Plots :-) |
No description provided.