-
Notifications
You must be signed in to change notification settings - Fork 113
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
Possible: Rename dimensionality to size #12
Comments
Do you mean For a 3x3 matrix, dimensionality is 2 (it's a 2D matrix) and dimensions are [3 3] Apart from that I like the word size in principle but the only main I was cautious about size was ambiguity: it might get confused with the total number of items in the matrix. That it what it means in NumPy at least..... Any examples of what other matrix libraries use? |
Sorry, yes, I mean dimensions. For this R uses dim, MATLAB uses size, mathematica uses Dimensions. So no consensus there :) For the total number of elements matlab provides numel (i think its a bit ugly). How about count, or card ? |
numpy uses "ndim" for the number of array dimensions, and "shape" for the tuple of sizes along those dimensions. It also uses the term "axis" a lot in its API for a specific dimension of an ndarray |
I quite like "shape" as an alternative to "dimensions"
|
Yes, shape is nice, sounds like quorum to me :) ecount I think is a problem. The e_verb_ convention is to apply verb to each element of the matrix, thus wouldn't ecount imply: apply the function count to each element ? The count we want is not an elementwise op, but a collectionwise op. Admittedly, this might be inferring too much from the convention. I still think count or card are better. |
OK sounds agreed dimensions -> shape OTOH I don't think
Without having a specific formal definition in mind, I was interpreting e_something_ as "version of This is good discussion though - let's keep pushing this, naming is so important for any API. |
Anyone want to do a patch for dimensions -> shape? Happy to do it myself, but I'm conscious that other people may want to get involved with hacking the API and this is probably a good one to start with..... |
e_verb_. I see your point. I need to think about this a bit. |
Seems like we can close this one. |
This is a more common name, and shorter ! Rename it ?
https://github.com/mikera/matrix-api/blob/master/src/main/clojure/core/matrix.clj#L78
The text was updated successfully, but these errors were encountered: