Skip to content
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 function dim -> dims #10

Closed
nickrobinson251 opened this issue Apr 18, 2019 · 4 comments
Closed

rename function dim -> dims #10

nickrobinson251 opened this issue Apr 18, 2019 · 4 comments

Comments

@nickrobinson251
Copy link
Contributor

I know this is a bike-shed-y naming issue, but...

I think dims would be really nice, to go with ndims, permutedims, dropdims, etc.

We might have to do something ugly in the source code, like write NamedDims.dims all over or define an alias like const _dims = dims, but it might be worth doing if it's a nicer API for the user.

@oxinabox
Copy link
Member

The main use of the dim function is dim(A, :x)==1 though.

@nickrobinson251
Copy link
Contributor Author

it's a fair point - lets leave this open to see if anyone else has an opinion, and otherwise keep as is?

@oxinabox
Copy link
Member

when #21 is merged this can likely be closed as the version of the function that returns NamedTuples of the function will be gone.

Though the version that accepts tuples dim((:a, :b)) = (1,2)
will remain,
so maybe there is still an argument to have this called dims?

@nickrobinson251
Copy link
Contributor Author

I'm happy enough for this to stay as dim :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants