Skip to content

Commit 26f4424

Browse files
authored
modify EV6 to sometimes use R^5 vectors
1 parent 1fc8e3d commit 26f4424

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

source/linear-algebra/exercises/outcomes/EV/EV6/generator.sage

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,16 @@ TBIL.config_matrix_typesetting()
33

44
class Generator(BaseGenerator):
55
def data(self):
6-
#Pick some vectors in R4
7-
n=choice([4,5])
6+
#Choose R^4 or R^5, will use 5 or 4 vectors respectively
7+
base_dim = choice([4,5])
8+
vector_count = 9-base_dim
9+
#answer will be 2 or 3
810
dim=choice([2,3])
9-
A=CheckIt.simple_random_matrix_of_rank(dim,columns=n,rows=4)
11+
A=CheckIt.simple_random_matrix_of_rank(
12+
dim,
13+
columns=vector_count,
14+
rows=base_dim
15+
)
1016
basis=[A.column(i) for i in A.pivots()]
1117

1218
return {

0 commit comments

Comments
 (0)