Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ENH: Implemented ma.append #4339

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

Merged
merged 1 commit into from
Mar 13, 2014
Merged

ENH: Implemented ma.append #4339

merged 1 commit into from
Mar 13, 2014

Conversation

abalkin
Copy link
Contributor

@abalkin abalkin commented Feb 21, 2014

Fixes #2219.

@@ -7258,3 +7258,8 @@ def __call__(self, a, *args, **params):
zeros_like = np.zeros_like

###############################################################################
def append(a, b, axis=None):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs a docstring, see other numpy functions for the formatting

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in b134494.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still needs

.. versionadded:: 1.9.0

on line of its own above Parameters, see e.g. np.partition

@abalkin
Copy link
Contributor Author

abalkin commented Feb 23, 2014

I addressed @juliantaylor comments. I also reviewed the implementation of a related function ma.concatenate and decided that it is easier to reuse it rather than reimplement all the subclassing details.

b = np.ma.masked_values([[4, 5, 6], [7, 8, 9]], 7)

# When `axis` is specified, `values` must have the correct shape.
assert_raises(ValueError, np.append, a, b, axis=0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this should be np.ma.append

@juliantaylor
Copy link
Contributor

can you still squash the commits into one please, it simplifies backporting and regression hunting.
you can do that with git rebase -i master

@abalkin
Copy link
Contributor Author

abalkin commented Mar 10, 2014

Sure - I was just waiting for the final go ahead. It is easier to keep track of the comments with multiple commits.

@juliantaylor
Copy link
Contributor

when you make changes to be reviewed please also add a comment, github does not send notifications when a PR changes.

@charris
Copy link
Member

charris commented Mar 13, 2014

@juliantaylor This PR has been updated.

juliantaylor added a commit that referenced this pull request Mar 13, 2014
@juliantaylor juliantaylor merged commit 50b60fe into numpy:master Mar 13, 2014
@juliantaylor
Copy link
Contributor

loooks good, thanks

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

Successfully merging this pull request may close these issues.

Masked array equivalent append function (Trac #1623)
4 participants