JuliaStats/DataArrays.jl — pull request #62 by simonster (2014-01-20 01:14:04+00:00)
Title: WIP: Clean up indexing

Currently, `DataArray(Int, 3, 1)[:, 1] = @data [1, 2, NA]` fails, so I started cleaning up the `setindex!` functions. Unfortunately, while this is more concise than the old indexing functions, handles a larger variety of cases, and passes tests, the generated code looks pretty bad (not that it looked particularly good before). I'm also missing `setindex!(DataArray, AbstractDataArray, inds...)` (the general case of this bug), which should probably use Cartesian, as should `setindex!(PooledDataArray, AbstractArray, inds...)`, where I'm currently doing allocation.

@johnmyleswhite Is it really necessary to document each method of `getindex` and `setindex!`? Could we just specify that they will behave the same way for DataArrays as they do for Arrays? Right now I've got about twice as much documentation here as I have methods.