8000 Tests for exceptions needed in vstack, row_stack, hstack, column_stack, dstack, etc. · Issue #6542 · numpy/numpy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Tests for exceptions needed in vstack, row_stack, hstack, column_stack, dstack, etc. #6542

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
charris opened this issue Oct 21, 2015 · 0 comments

Comments

@charris
Copy link
Member
charris commented Oct 21, 2015

Example of exception for which there is no test.

In [1]: hstack(1)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-1-3896849f7526> in <module>()
----> 1 hstack(1)

/home/charris/.local/lib/python2.7/site-packages/numpy/core/shape_base.pyc in hstack(tup)
    273 
    274     """
--> 275     arrs = [atleast_1d(_m) for _m in tup]
    276     # As a special case, dimension 0 of 1-dimensional arrays is "horizontal"
    277     if arrs[0].ndim == 1:

TypeError: 'int' object is not iterable

The vstack, row_stack, hstack, column_stack, dstack, and
hsplit functions, as well as their masked cousins, all seem to need such tests.

gkBCCN added a commit to gkBCCN/numpy that referenced this issue Feb 25, 2016
gkBCCN added a commit to gkBCCN/numpy that referenced this issue Feb 25, 2016
...for hsplit, vsplit, dsplit, dstack
gkBCCN added a commit to gkBCCN/numpy that referenced this issue Feb 28, 2016
gkBCCN added a commit to gkBCCN/numpy that referenced this issue Feb 28, 2016
...for hsplit, vsplit, dsplit, dstack
gkBCCN added a commit to gkBCCN/numpy that referenced this issue Feb 28, 2016
...use assert_raises() instead of catching the exception itself.
gkBCCN added a commit to gkBCCN/numpy that referenced this issue Feb 29, 2016
...to hstack, vstack, stack,
   hsplit, vsplit, dsplit, dstack
   that check that they raise exceptions.
@charris charris closed this as completed in 4aac3ae Mar 2, 2016
charris added a commit that referenced this issue Mar 2, 2016
TST: fix #6542, add tests to check non-iterable argument raises in hstack and related functions.
jaimefrio pushed a commit to jaimefrio/numpy that referenced this issue Mar 22, 2016
...to hstack, vstack, stack,
   hsplit, vsplit, dsplit, dstack
   that check that they raise exceptions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant
0