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

Behaviour of slicing for zero and one? #1247

Closed
olivierverdier opened this issue Nov 24, 2017 · 1 comment
Closed

Behaviour of slicing for zero and one? #1247

olivierverdier opened this issue Nov 24, 2017 · 1 comment

Comments

@olivierverdier
Copy link
Contributor

Is this test supposed to pass or to fail? (it currently fails)

def test_one_slice():
    space = odl.uniform_discr([0,0,0],[1,1,1],(10,20,30))
    x = space.one()
    x.shape # (10,20,30)
    assert x[0].shape == (20,30) # False, x[0] is a scalar
@adler-j
Copy link
Member

adler-j commented Nov 24, 2017

It is currently supposed to fail, but should be fixed by #1113 (for which I guess this issue is a duplicate).

PR #1238 should solve this.

@adler-j adler-j closed this as completed Nov 24, 2017
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

2 participants