Skip to content

Commit addcc8e

Browse files
sakchalsyurkevi
authored andcommitted
fixed print formatting
1 parent 56e3cec commit addcc8e

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

examples/getting_started/intro.py

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -29,48 +29,48 @@
2929
B = af.Array(obj=h_B, shape=(3, 3), dtype=af.int32)
3030

3131
print("\n---- Sub referencing and sub assignment\n")
32-
print(_array_as_str(A))
33-
print(_array_as_str(A[0, :]))
34-
print(_array_as_str(A[:, 0]))
32+
print(A)
33+
print(A[0, :])
34+
print(A[:, 0])
3535
A[0, 0] = 11
3636
A[1] = 100
37-
print(_array_as_str(A))
38-
print(_array_as_str(B))
37+
print(A)
38+
print(B)
3939
A[1, :] = B[2, :]
40-
print(_array_as_str(A))
40+
print(A)
4141

4242
b_A = array("I", (1, 1, 1, 0, 1, 1, 0, 0, 0))
4343
b_B = array("I", (1, 0, 1, 0, 1, 0, 1, 0, 1))
4444

4545
C = af.Array(obj=b_A, shape=(3, 3), dtype=af.uint32)
4646
D = af.Array(obj=b_B, shape=(3, 3), dtype=af.uint32)
47-
print(_array_as_str(C))
48-
print(_array_as_str(D))
47+
print(C)
48+
print(D)
4949

5050
print("\n---- Bitwise operations\n")
51-
print(_array_as_str(af.bitand(C, D)))
52-
print(_array_as_str(af.bitor(C, D)))
53-
print(_array_as_str(af.bitxor(C, D)))
51+
print(af.bitand(C, D))
52+
print(af.bitor(C, D))
53+
print(C, D)
5454

5555
print("\n---- Transpose\n")
56-
print(_array_as_str(A))
57-
print(_array_as_str(af.transpose(A)))
56+
print(A)
57+
print(af.transpose(A))
5858

5959
print("\n---- Flip Vertically / Horizontally\n")
60-
print(_array_as_str(A))
61-
print(_array_as_str(af.flip(A, axis=0)))
62-
print(_array_as_str(af.flip(A, axis=1)))
60+
print(A)
61+
print(af.flip(A, axis=0))
62+
print(af.flip(A, axis=1))
6363

6464
print("\n---- Sum, Min, Max along row / columns\n")
65-
print(_array_as_str(A))
66-
print(_array_as_str(af.min(A, axis=0))) # type: ignore[arg-type]
67-
print(_array_as_str(af.max(A, axis=0))) # type: ignore[arg-type]
65+
print(A)
66+
print(af.min(A, axis=0)) # type: ignore[arg-type]
67+
print(af.max(A, axis=0)) # type: ignore[arg-type]
6868

69-
print(_array_as_str(af.min(A, axis=1))) # type: ignore[arg-type]
70-
print(_array_as_str(af.max(A, axis=1))) # type: ignore[arg-type]
69+
print(af.min(A, axis=1)) # type: ignore[arg-type]
70+
print(af.max(A, axis=1)) # type: ignore[arg-type]
7171

72-
print(_array_as_str(af.sum(A, axis=0))) # type: ignore[arg-type]
73-
print(_array_as_str(af.sum(A, axis=1))) # type: ignore[arg-type]
72+
print(af.sum(A, axis=0)) # type: ignore[arg-type]
73+
print(af.sum(A, axis=1)) # type: ignore[arg-type]
7474

7575
print("\n---- Get minimum with index\n")
7676
(min_val, min_idx) = af.imin(A, axis=0)

0 commit comments

Comments
 (0)