8000 BUG: Fix apply_along_axis() for when func1d() returns a non-ndarray by bennyrowland · Pull Request #8426 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

BUG: Fix apply_along_axis() for when func1d() returns a non-ndarray #8426

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 2 commits into from
Dec 31, 2016

Conversation

bennyrowland
Copy link
Contributor

Fixes issue in apply_along_axis() where func1d() returns a non ndarray

Fixes issue in apply_along_axis() where func1d() returns a non ndarray
@charris charris changed the title BUG: Closes issue #8419 BUG: Fix apply_along_axis() for when func1d() returns a non-ndarray Dec 31, 2016
@@ -58,6 +58,10 @@ class MinimalSubclass(np.ndarray):
assert isinstance(res, MinimalSubclass)
assert_array_equal(res, np.array([6, 6, 6]).view(MinimalSubclass))

def test_tuple_func1d(self):
res = np.apply_along_axis((lambda x: (x[1], x[0])), 1, np.array([[1, 2], [3, 4]]))
Copy link
Member

Choose a reason for hiding this comment

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

Line is too long, please keep under 80 characters.

@charris
Copy link
Member
charris commented Dec 31, 2016

Fix the long line, otherwise LGTM. The commit message summary line is pretty uninformative, note the edited title, andCloses #8419 should be in the message body.

Closes issue numpy#8419. Fixes issue in apply_along_axis() where
func1d() returns a non ndarray by calling asanyarray() on
result. This commit fixes a too long line in the test case.
@charris charris merged commit b1b67d6 into numpy:master Dec 31, 2016
@charris
Copy link
Member
charris commented Dec 31, 2016

Thanks @bennyrowland. I did a squash merge here. You can do the squashing yourself next time by using git rebase -i, which is well worth the time to become familiar with.

charris pushed a commit to charris/numpy that referenced this pull request Dec 31, 2016
…umpy#8426)

* BUG: Closes issue numpy#8419

Fixes issue in apply_along_axis() where func1d() returns a non ndarray

* BUG: Fix apply_along_axis() when func1d() returns a non-ndarray

Closes issue numpy#8419. Fixes issue in apply_along_axis() where
func1d() returns a non ndarray by calling asanyarray() on
result. This commit fixes a too long line in the test case.
@charris charris removed this from the 1.12.0 release milestone Dec 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0