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

ENH: to/from_scanner() should accept arrays of coords #63

Closed
bennyrowland opened this issue Jul 3, 2017 · 0 comments
Closed

ENH: to/from_scanner() should accept arrays of coords #63

bennyrowland opened this issue Jul 3, 2017 · 0 comments
Assignees

Comments

@bennyrowland
Copy link
Member

Currently the to_scanner() and from_scanner() functions take three arguments: x, y, z and return an numpy array. It would be convenient if the functions could handle a numpy array as an input for consistency, this would also allow passing in an array of coords to be transformed all at once, for example from meshgrid(). On the other hand, in the case where the user wants to pass in simple known x, y and z values, this requires them to be wrapped in a tuple, being called like to_scanner((x, y, z)), similarly to the numpy.ones() function. This could be addressed by permitting either 1 or 3 *args and interpreting either as an ndarray of shape [...3] or 3 floats.

@bennyrowland bennyrowland self-assigned this Jul 3, 2017
bennyrowland added a commit that referenced this issue Jul 3, 2017
The `ImageBase.from_scanner()`/`to_scanner()` functions now accept
`numpy.ndarray`s of coordinates as well as simple x, y, z arguments.

Closes #63
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

1 participant