Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ENH: Make layout order an initialization parameter of ArrayProxy#1131

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
effigies merged 8 commits intonipy:masterfromeffigies:enh/arrayproxy_order
Sep 7, 2022
Merged
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
TEST: Check None and invalid order arguments
  • Loading branch information
@effigies
effigies committedAug 31, 2022
commitdcf95664710feebd0a18aed305626a5ecb733c67
5 changes: 5 additions & 0 deletionsnibabel/tests/test_arrayproxy.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -88,6 +88,9 @@ def test_init():
assert ap.shape != shape
# Data stays the same, also
assert_array_equal(np.asarray(ap), arr)
# You wouldn't do this, but order=None explicitly requests the default order
ap2 = ArrayProxy(bio, FunkyHeader(arr.shape), order=None)
assert_array_equal(np.asarray(ap2), arr)
# C order also possible
bio = BytesIO()
bio.seek(16)
Expand All@@ -97,6 +100,8 @@ def test_init():
# Illegal init
with pytest.raises(TypeError):
ArrayProxy(bio, object())
with pytest.raises(ValueError):
ArrayProxy(bio, hdr, order='badval')


def test_tuplespec():
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp