DimensionalData.jl icon indicating copy to clipboard operation
DimensionalData.jl copied to clipboard

Feature request: `order` kwarg for `size`

Open asinghvi17 opened this issue 1 year ago • 2 comments

It would be nice if this worked:

resolution = size(earth_ras; order = (X, Y))

instead, we currently have to do:

resolution = length.(dims(earth_ras, (X, Y)))

and order seems to be a standard kwarg in DimPoints etc.

asinghvi17 avatar Dec 16 '24 11:12 asinghvi17

Yes that seems nice. I guess axes and maybe a few other methods will need it too to be consistent

rafaqz avatar Dec 16 '24 11:12 rafaqz

Probably it would just be size(earth_ras, (X, Y)) as size(A, X) already works. I think we don't have it because Base doesn't have size(A, (1, 3)).

rafaqz avatar Jan 25 '25 23:01 rafaqz