8000 ENH: Added `fill` option to `np.atleast_2d` and `np.atleast_3d` by eliegoudout · Pull Request #25126 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

ENH: Added fill option to np.atleast_2d and np.atleast_3d #25126

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

Closed
wants to merge 0 commits into from

Conversation

eliegoudout
Copy link
Contributor
@eliegoudout eliegoudout commented Nov 12, 2023
  • Ready for review

Added optional keyword argument fill to np.atleast_2d and np.atleast_3d, to specify where the missing dimension(s) should be added.

  • Default values are consistent with current behaviours,
  • I didn't add it to np.atleast_1d for obvious reasons, but if signature consistency is an issue, it can be done,
  • Implementation: I parse the non-default behaviours first, so that illegal values are mapped to default behaviour.

This can be useful when working with Fortan convention for example, or for locally-specifi reasons.

@eliegoudout eliegoudout changed the title Added fill option to np.atleast_2d and np.atleast_3d Added fill option to np.atleast_2d and np.atleast_3d Nov 12, 2023
@eliegoudout eliegoudout changed the title Added fill option to np.atleast_2d and np.atleast_3d ENH: Added fill option to np.atleast_2d and np.atleast_3d Nov 15, 2023
@eliegoudout
Copy link
Contributor Author

I don't quite know how to fix the failing tests (if it is a dispatcher signature problem, I tried to guess from other functions I could look at, but I don't exactly understand how they work).

Some help + review would be appreciated :)

@melissawm
Copy link
Member

Hi @eliegoudout - there's a couple of things. First, you created this PR on top of you main branch, and that is not recommended. Ideally, you could move your changes to a new branch and re-submit this PR. Please check out our contributing guide for more instructions 😄

@eliegoudout
Copy link
Contributor Author

Thanks, @melissawm, I did just that: #25170. Also, thanks for the pointer to the doc, but I dont think you can expect everyone to read it in full. It is still a great ressource when one knows what to look for!

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

Successfully merging this pull request may close these issues.

3 participants
0