-
Notifications
You must be signed in to change notification settings - Fork 663
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
Allow distance routines to accept an NumPy Array or AtomGroup [Core] #3730
Allow distance routines to accept an NumPy Array or AtomGroup [Core] #3730
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not 100% sure why some of this isn't being picked up by pep8speaks, anyways just a couple of PEP8 changes for the lines that changed (I'm ignoring one of the pep8speaks one because 81 char >> readable than 79 char in that occasion).
Co-authored-by: Irfan Alibay <[email protected]>
Thanks @IAlibay much appreciated. |
Hmmmm still getting what looks to me like NumPy versioning issues on the |
How odd, was developed merged into this branch? |
Yeah it looks all up to date AFAIK. Log shows #3737 as merged in my history. |
@hmacdope - Here we go this is the problem: https://github.com/numpy/numpy/releases/tag/v1.21.0 "A runtime-subcriptable alias has been added for ndarray" Essentially NDArray isn't going to work in 1.20... That's a bit of a pain, I guess our options here are to either vendor the alias somewhere in our code or break NEP29. We should probably move this to a new issue since it's a pretty big decision. |
That's just related to typing, though, right? It looks to me that typing will remain a moving target for some time so my view is to do the best you can within current constraints and then move on. Add a comment how to do it nicely when np 1.21 is lay of the land and then put in something ugly or less specific. I recognize that there are different views and mine is just the one of an outsider as far as typing goes... |
Hugo will open an issue later today, but one of the things we'll need to discuss is what we do with the outreachy typing project since I think they've already started using npt.NDArray |
Ahhh... and that's not been caught in tests with lowest supported versions? Alright, that's discussion that should happen on its own issue. |
Pending discussion on #3748 |
Other than the flaky tests this should be good to go again following discussion in #3748. |
@MDAnalysis/coredevs any chance I could get a second review here? It would be good to get this and #3751 merged soonish. :) |
@hmacdope can you address whatever can be addressed from pep8speaks (all seems reasonable stuff like two lines vs 1). And get CI to run green. I'll review tomorrow once that's done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hmacdope here are all the suggested changes that were left.
I'll eagerly approve with the hope that you'll handle these suggestions before merging this PR.
Co-authored-by: Irfan Alibay <[email protected]>
Fixes #3708
Successor to #3718
Second attempt at addressing #3708 using a python only design. CZI_EOSS4 performance track.
Changes made in this Pull Request:
@check_coords
to take alsoAtomGroups
and return positions@check_coords
must be enabled with argumentallow_atomgroup
with defaultFalse
maintaining current behaviourdistance_array
,self_distance_array
,calc_bonds
,calc_angles
,calc_dihedrals
, andapply_PBC
to take an atomgroupDo we want to also change
nsgrid
functions, and thetransform_
functions? If so is that best done here or separate PR?PR Checklist