Skip to content

Commit edeb33f

Browse files
committed
[Example] Update comments
1 parent 14a004f commit edeb33f

12 files changed

+20
-20
lines changed

python/examples/add_example.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
# Matrix initialization
99
#
1010

11-
shape = (3, 3) # Adjacency matrices shape
11+
shape = (3, 3) # Matrix shape
1212
a = cb.Matrix.empty(shape=shape)
1313
a[0, 0] = True
1414
a[2, 0] = True
1515

16-
shape = (3, 3) # Adjacency matrices shape
16+
shape = (3, 3) # Matrix shape
1717
b = cb.Matrix.empty(shape=shape)
1818
b[1, 1] = True
1919
b[1, 2] = True

python/examples/create_example.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Creation an empty matrix of a known form
99
#
1010

11-
shape = (3, 3) # Adjacency matrices shape
11+
shape = (3, 3) # Matrix shape
1212
a = cb.Matrix.empty(shape=shape) # Creating matrix
1313

1414
#
@@ -27,7 +27,7 @@
2727
# Creation an empty matrix of known shape and filling with given arrays of indices
2828
#
2929

30-
shape = (3, 3) # Adjacency matrices shape
30+
shape = (3, 3) # Matrix shape
3131
a = cb.Matrix.empty(shape=shape) # Creating matrix
3232
rows = [0, 1, 1, 1] # Row indices of values
3333
cols = [0, 0, 1, 2] # Column indices of values
@@ -40,7 +40,7 @@
4040
# Creating a matrix via shape and arrays of significant element indices
4141
#
4242

43-
shape = (3, 3) # Adjacency matrices shape
43+
shape = (3, 3) # Matrix shape
4444
rows = [0, 1, 1, 1] # Row indices of values
4545
cols = [0, 0, 1, 2] # Column indices of values
4646
a = cb.Matrix.from_lists(shape=shape, rows=rows, cols=cols)
@@ -53,7 +53,7 @@
5353
# Generate random matrix by determining the shape and density - the percentage of non-zeros elements
5454
#
5555

56-
shape = (4, 4) # Adjacency matrices shape
56+
shape = (4, 4) # Matrix shape
5757
density = 0.5 # Matrix filling density
5858
a = cb.Matrix.generate(shape=shape, density=density)
5959

python/examples/dup_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Matrix initialization
99
#
1010

11-
shape = (3, 3) # Adjacency matrices shape
11+
shape = (3, 3) # Matrix shape
1212
a = cb.Matrix.empty(shape=shape)
1313
a[1, 0] = True
1414
a[1, 1] = True

python/examples/export_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Matrix initialization
99
#
1010

11-
a = cb.Matrix.empty(shape=(3, 3)) # Adjacency matrices shape
11+
a = cb.Matrix.empty(shape=(3, 3)) # Creating an empty matrix of a given shape
1212
a[1, 0] = True
1313
a[1, 1] = True
1414
a[1, 2] = True

python/examples/iteration_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Matrix initialization
99
#
1010

11-
shape = (3, 3) # Adjacency matrices shape
11+
shape = (3, 3) # Matrix shape
1212
a = cb.Matrix.empty(shape=shape)
1313
a[1, 0] = True
1414
a[1, 1] = True

python/examples/kronecker_example.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
# Matrix initialization
99
#
1010

11-
a = cb.Matrix.empty(shape=(2, 2)) # Adjacency matrices shape
11+
a = cb.Matrix.empty(shape=(2, 2)) # Creating an empty matrix of a given shape
1212
a[0, 0] = True
1313
a[1, 0] = True
1414

15-
b = cb.Matrix.empty(shape=(2, 2)) # Adjacency matrices shape
15+
b = cb.Matrix.empty(shape=(2, 2)) # Creating an empty matrix of a given shape
1616
b[1, 1] = True
1717
b[1, 0] = True
1818

python/examples/log_example.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
# Matrix initialization
1616
#
1717

18-
a = cb.Matrix.empty(shape=(3, 3))
18+
a = cb.Matrix.empty(shape=(3, 3)) # Creating an empty matrix of a given shape
1919
a[1, 0] = True
2020
a[1, 1] = True
2121
a[1, 2] = True
2222
a[0, 0] = True
2323

2424
a.set_marker("a-log-example-matrix") # Set debug marker for "a" matrix
2525

26-
b = cb.Matrix.empty(shape=(3, 3))
26+
b = cb.Matrix.empty(shape=(3, 3)) # Creating an empty matrix of a given shape
2727
b[0, 1] = True
2828
b[0, 2] = True
2929

python/examples/mxm_example.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@
88
# Matrix initialization
99
#
1010

11-
a = cb.Matrix.empty(shape=(3, 3))
11+
a = cb.Matrix.empty(shape=(3, 3)) # Creating an empty matrix of a given shape
1212
a[1, 0] = True
1313
a[1, 1] = True
1414
a[1, 2] = True
1515
a[0, 0] = True
1616

17-
b = cb.Matrix.empty(shape=(3, 3))
17+
b = cb.Matrix.empty(shape=(3, 3)) # Creating an empty matrix of a given shape
1818
b[0, 1] = True
1919
b[0, 2] = True
2020

2121
#
2222
# Simple matrix multiplication
2323
#
2424

25-
result = a.mxm(b) # result = a * b
25+
result = a.mxm(b) # result = a * b
2626

2727
print("Simple matrix multiplication:")
2828
print(result, sep='\n') # Matrix output

python/examples/reduce_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Matrix initialization
99
#
1010

11-
a = cb.Matrix.empty(shape=(3, 3)) # Adjacency matrices shape
11+
a = cb.Matrix.empty(shape=(3, 3)) # Creating an empty matrix of a given shape
1212
a[1, 0] = True
1313
a[1, 1] = True
1414
a[1, 2] = True

python/examples/submatrix_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Matrix initialization
99
#
1010

11-
shape = (3, 3) # Adjacency matrices shape
11+
shape = (3, 3) # Matrix shape
1212
a = cb.Matrix.empty(shape=shape)
1313
a[1, 0] = True
1414
a[1, 1] = True

0 commit comments

Comments
 (0)