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

Method _fixedwidth_splitter

numpy/lib/_iotools.py:207–215  ·  view source on GitHub ↗
(self, line)

Source from the content-addressed store, hash-verified

205 return line.split(self.delimiter)
206
207 def _fixedwidth_splitter(self, line):
208 if self.comments is not None:
209 line = line.split(self.comments)[0]
210 line = line.strip("\r\n")
211 if not line:
212 return []
213 fixed = self.delimiter
214 slices = [slice(i, i + fixed) for i in range(0, len(line), fixed)]
215 return [line[s] for s in slices]
216
217 def _variablewidth_splitter(self, line):
218 if self.comments is not None:

Callers

nothing calls this directly

Calls 2

stripMethod · 0.80
splitMethod · 0.45

Tested by

no test coverage detected