Commit 89da3015 authored by pre-commit-ci[bot]'s avatar pre-commit-ci[bot]
Browse files

[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
parent 9e0d6e50
Pipeline #18576 passed with stage
in 21 minutes and 18 seconds
......@@ -40,15 +40,15 @@ def test(mat):
mat0 = mat.copy()
mat_as_C_order = np.array(mat, order="F")
for i, rowsize, colsize in ([0, 3, 2], [1, 1, 2], [0, 3, 1]):
print("taking block [{}:{}, {}:{}]".format(i, rowsize+i, 0, colsize))
print("taking block [{}:{}, {}:{}]".format(i, rowsize + i, 0, colsize))
B = getBlock(mat_as_C_order, i, 0, rowsize, colsize)
lhs = mat_as_C_order[i:rowsize + i, :colsize]
lhs = mat_as_C_order[i : rowsize + i, :colsize]
print("should be:\n{}\ngot:\n{}".format(lhs, B))
assert np.array_equal(lhs, B.reshape(rowsize, colsize))
B[:] = 1.0
rhs = np.ones((rowsize, colsize))
assert np.array_equal(mat_as_C_order[i:rowsize+i, :colsize], rhs)
assert np.array_equal(mat_as_C_order[i : rowsize + i, :colsize], rhs)
mat_as_C_order[:, :] = mat0
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment