MCPcopy
hub / github.com/quantopian/zipline / create_categories

Method create_categories

tests/test_labelarray.py:420–428  ·  view source on GitHub ↗
(width, plus_one)

Source from the content-addressed store, hash-verified

418
419 @staticmethod
420 def create_categories(width, plus_one):
421 length = int(width / 8) + plus_one
422 return [
423 ''.join(cs)
424 for cs in take(
425 2 ** width + plus_one,
426 product([chr(c) for c in range(256)], repeat=length),
427 )
428 ]
429
430 def test_narrow_code_storage(self):
431 create_categories = self.create_categories

Calls 2

rangeClass · 0.85
joinMethod · 0.80

Tested by

no test coverage detected