-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
rename indices
?
#23434
Comments
There is also |
|
However |
I like the idea of switching our terminology to "axes" to refer to what we sometimes call "dimensions." The problem with dimensions is that it both means "number of dimensions" (as in "n-dimensional") and "the dimensions of this room" (aka, With AxisArrays, @mbauman has played with making I wonder if the distinction you're working towards is the difference between the set of all indices, an iterator to generate all indices, and the "basis vectors" for constructing (via reshape&broadcasting) all possible indices. Given that arrays have rectangular/Cartesian indexing, all valid indices can be constructed from the "basis vectors". Maybe call it |
There might be some more inconsistencies in how properties of arrays are named. I could see that size in singular refers to both individual an individual On a more philosophical level, I would say that the current nomenclature for array properties is very much oriented towards arrays representing data on a discretised grid in space(time), i.e. the rank of the tensor is referred to as That use of indices and dimensions is exactly opposite to how tensors are often described and used in physics. A tensor has a number of indices (the rank of the tensor), which are abstract objects (not the actual values they take), and the All of this just as a side note, as I am not actually voting to change the current convention. |
Would existing users of an |
I made a prototype PR of changing this name at #25057 - it's pretty easy to choose a new name on that branch, as desired. I'll cross-post a discussion I made there:
|
I prefer the "index" terminology as well – "index" sounds right for both arrays and dicts (although it's a bit non-standard for dicts), whereas "key" sounds quite wrong for arrays. |
Has the name julia> dims(rand(3, 4))
(Base.OneTo(3), Base.OneTo(4))
julia> dims(rand(3, 4), 1)
Base.OneTo(3)
julia> ndims(rand(3, 4))
2 |
With |
I had thought of However maybe |
FWIF, I prefer |
Just looked into this - |
Wasn't this precisely what Tim Holy's comment above addressed? Or am I missing something? |
Closed via #25057 |
I propose renaming this to
axes
, since it basically returns a description of each axis of an array. The current name makes me think it gives you, well, the indices (which is whatkeys
does).The text was updated successfully, but these errors were encountered: