MCPcopy Create free account
hub / github.com/numpy/numpy / removeHeader

Function removeHeader

numpy/linalg/lapack_lite/clapack_scrub.py:203–228  ·  view source on GitHub ↗
(source)

Source from the content-addressed store, hash-verified

201 return lines.getValue()
202
203def removeHeader(source):
204 lines = LineQueue()
205
206 def LookingForHeader(line):
207 m = re.match(r'/\*[^\n]*-- translated', line)
208 if m:
209 return InHeader
210 else:
211 lines.add(line)
212 return LookingForHeader
213 def InHeader(line):
214 if line.startswith('*/'):
215 return OutOfHeader
216 else:
217 return InHeader
218 def OutOfHeader(line):
219 if line.startswith('#include "f2c.h"'):
220 pass
221 else:
222 lines.add(line)
223 return OutOfHeader
224
225 state = LookingForHeader
226 for line in UStringIO(source):
227 state = state(line)
228 return lines.getValue()
229
230def removeSubroutinePrototypes(source):
231 # This function has never worked as advertised by its name:

Callers

nothing calls this directly

Calls 2

getValueMethod · 0.95
LineQueueClass · 0.85

Tested by

no test coverage detected