@@ -63,14 +63,14 @@ def make_matrix(data, expected_rank, entries, column_names=None):
6363 termlist = make_termlist (* entries )
6464 def iter_maker ():
6565 yield data
66- builders = design_matrix_builders ([termlist ], iter_maker , eval_env = 0 )
67- matrices = build_design_matrices (builders , data )
66+ design_infos = design_matrix_builders ([termlist ], iter_maker , eval_env = 0 )
67+ matrices = build_design_matrices (design_infos , data )
6868 matrix = matrices [0 ]
69- assert (builders [0 ]. design_info .term_slices
69+ assert (design_infos [0 ].term_slices
7070 == matrix .design_info .term_slices )
71- assert (builders [0 ]. design_info .column_names
71+ assert (design_infos [0 ].column_names
7272 == matrix .design_info .column_names )
73- assert matrix .design_info . builder is builders [0 ]
73+ assert matrix .design_info is design_infos [0 ]
7474 check_design_matrix (matrix , expected_rank , termlist ,
7575 column_names = column_names )
7676 return matrix
@@ -310,11 +310,11 @@ def test_NA_drop_preserves_levels():
310310 data = {"x" : [1.0 , np .nan , 3.0 ], "c" : ["c1" , "c2" , "c3" ]}
311311 def iter_maker ():
312312 yield data
313- builder = design_matrix_builders ([make_termlist ("x" , "c" )], iter_maker , 0 )[0 ]
313+ design_info = design_matrix_builders ([make_termlist ("x" , "c" )], iter_maker , 0 )[0 ]
314314
315- assert builder . design_info .column_names == ["c[c1]" , "c[c2]" , "c[c3]" , "x" ]
315+ assert design_info .column_names == ["c[c1]" , "c[c2]" , "c[c3]" , "x" ]
316316
317- mat , = build_design_matrices ([builder ], data )
317+ mat , = build_design_matrices ([design_info ], data )
318318
319319 assert mat .shape == (2 , 4 )
320320 assert np .array_equal (mat , [[1.0 , 0.0 , 0.0 , 1.0 ],
@@ -683,14 +683,14 @@ def iter_maker():
683683 full_matrix = build_design_matrices ([all_builder ], all_data )[0 ]
684684
685685 def t (which_terms , variables , columns ):
686- sub_builder = all_builder .subset (which_terms )
686+ sub_design_info = all_builder .subset (which_terms )
687687 sub_data = {}
688688 for variable in variables :
689689 sub_data [variable ] = all_data [variable ]
690- sub_matrix = build_design_matrices ([sub_builder ], sub_data )[0 ]
690+ sub_matrix = build_design_matrices ([sub_design_info ], sub_data )[0 ]
691691 sub_full_matrix = full_matrix [:, columns ]
692692 if not isinstance (which_terms , six .string_types ):
693- assert len (which_terms ) == len (sub_builder . design_info .terms )
693+ assert len (which_terms ) == len (sub_design_info .terms )
694694 assert np .array_equal (sub_matrix , sub_full_matrix )
695695
696696 t ("~ 0 + x + y + z" , ["x" , "y" , "z" ], slice (None ))
0 commit comments