JuliaArrays / AxisArrays.jl

Performant arrays where each dimension can have a named axis with values
http://JuliaArrays.github.io/AxisArrays.jl/latest/
Other
200 stars 42 forks source link

Added Base.endof method for Axis type #61

Closed Balinus closed 7 years ago

Balinus commented 7 years ago

Title says it all.

edit - Just not sure I putted the function into the right file.

mbauman commented 7 years ago

Thanks! The definition looks good, but you're right - I think I'd prefer to have this placed alongside the other Axis methods: https://github.com/JuliaArrays/AxisArrays.jl/blob/8f0a8a252b4ab9471553103d17a27aed16e6858c/src/core.jl#L64

While you're at it, would you mind adding a test, too? Just a simple line here would be perfect: https://github.com/JuliaArrays/AxisArrays.jl/blob/8f0a8a252b4ab9471553103d17a27aed16e6858c/test/core.jl#L167

Edit: that button is in a terrible place... sorry for the duplicate email.

Balinus commented 7 years ago

Great!

I've moved the endof definition to core.jl and added a small test for it.