MCPcopy Create free account
hub / github.com/kernc/backtesting.py / shm2s

Method shm2s

backtesting/_util.py:322–325  ·  view source on GitHub ↗
(shm, shape, dtype)

Source from the content-addressed store, hash-verified

320
321 @staticmethod
322 def shm2s(shm, shape, dtype) -> pd.Series:
323 arr = np.ndarray(shape, dtype=dtype.base, buffer=shm.buf)
324 arr.setflags(write=False)
325 return pd.Series(arr, dtype=dtype)
326
327 _DF_INDEX_COL = '__bt_index'
328

Callers 1

shm2dfMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected