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

map!, similar and eltype for DArray and SharedArrays #5914

Merged
merged 1 commit into from
Feb 25, 2014
Merged

map!, similar and eltype for DArray and SharedArrays #5914

merged 1 commit into from
Feb 25, 2014

Conversation

amitmurthy
Copy link
Contributor

Context - https://groups.google.com/d/msg/julia-dev/MqJbvGiJ9dc/SqNL-esi3kcJ

Also closes #5893. It doesn't address the larger issue of a portable interface across Array, DArray and SharedArrays.

@amitmurthy
Copy link
Contributor Author

Will merge this in a day, if there are no concerns.

@timholy
Copy link
Sponsor Member

timholy commented Feb 24, 2014

LGTM

amitmurthy added a commit that referenced this pull request Feb 25, 2014
map!, similar and eltype for DArray and SharedArrays
@amitmurthy amitmurthy merged commit 7975b98 into JuliaLang:master Feb 25, 2014
@amitmurthy amitmurthy deleted the amitm/map! branch February 25, 2014 05:12
similar{T}(d::DArray{T}, dims::Dims)= similar(d, T, dims)
similar{T}(d::DArray{T})= similar(d, T, size(d))

eltype{T}(d::DArray{T}) = T
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Shouldn't be necessary --- DArray will inherit the definition from AbstractArray.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. Removed in 8854bad

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.

The similar method for SharedArray returns an Array
3 participants