Lines Matching refs:addon
137 for addon in args:
138 if type(addon) not in [ListType, TupleType]:
139 addon = [addon]
140 if len(addon) < len(source): # is source list longer?
141 if len(source) % len(addon) == 0: # are they integer multiples?
142 repeats = len(source) / len(addon) # repeat addon n times
143 origadd = copy.deepcopy(addon)
145 addon = addon + origadd
147 repeats = len(source) / len(addon) + 1 # repeat addon x times,
148 origadd = copy.deepcopy(addon) # x is NOT an integer
150 addon = addon + origadd
151 addon = addon[0:len(source)]
152 elif len(source) < len(addon): # is addon list longer?
153 if len(addon) % len(source) == 0: # are they integer multiples?
154 repeats = len(addon) / len(source) # repeat source n times
159 repeats = len(addon) / len(source) + 1 # repeat source x times,
163 source = source[0:len(addon)]
165 source = simpleabut(source, addon)
169 def simpleabut(source, addon): argument
183 if type(addon) not in [ListType, TupleType]:
184 addon = [addon]
185 minlen = min(len(source), len(addon))
188 if type(addon[0]) not in [ListType, TupleType]:
190 list[i] = [source[i]] + [addon[i]] # source/addon = column
193 list[i] = [source[i]] + addon[i] # addon=list-of-lists
195 if type(addon[0]) not in [ListType, TupleType]:
197 list[i] = source[i] + [addon[i]] # source=list-of-lists
200 list[i] = source[i] + addon[i] # source/addon = list-of-lists
750 for addon in args:
751 if len(addon.shape) == 1:
753 addon = N.resize(addon, [source.shape[0], width])
756 if len(addon) < len(source):
757 addon = N.resize(addon, [source.shape[0], addon.shape[1]])
758 elif len(source) < len(addon):
759 source = N.resize(source, [addon.shape[0], source.shape[1]])
760 source = N.concatenate((source, addon), 1)